
/* 讓短代碼區塊與單一島嶼頁面可突破主題內容容器，真正滿版 */
.entry-content > .jmco-hub,
.entry-content > .jmco-room,
.inside-article > .jmco-hub,
.inside-article > .jmco-room,
.site-main > .jmco-hub,
.site-main > .jmco-room {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.jmco-hub,
.jmco-room {
    box-sizing: border-box;
    position: relative;
    isolation: isolate;
    width: 100%;
    overflow: hidden;
    font-family: "Microsoft JhengHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.jmco-hub *,
.jmco-room * { box-sizing: border-box; }

.jmco-hub {
    min-height: 82vh;
    padding: 110px 20px 90px;
    background-image:
        var(--jmco-sky-image, none),
        radial-gradient(circle at 20% 20%, rgba(255,255,255,.9), transparent 18%),
        radial-gradient(circle at 80% 35%, rgba(255,255,255,.7), transparent 16%),
        linear-gradient(to bottom, #70cfff 0%, #c9f2ff 55%, #f7fbff 100%);
    background-size: cover;
    background-position: center;
    transition: opacity .45s ease, filter .45s ease;
}

.jmco-hub.jmco-leaving { opacity: .08; filter: brightness(1.8); }

.jmco-cloud {
    position: absolute;
    z-index: 0;
    left: -380px;
    border-radius: 999px;
    background: rgba(255,255,255,.62);
    filter: blur(8px);
    pointer-events: none;
    animation: jmco-cloud-move 32s linear infinite;
}
.jmco-cloud-one { width: 220px; height: 70px; top: 18%; }
.jmco-cloud-two { width: 320px; height: 90px; top: 57%; animation-duration: 42s; animation-delay: -12s; }
@keyframes jmco-cloud-move { to { transform: translateX(150vw); } }

.jmco-office-grid {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 48px;
    flex-wrap: wrap;
}

.jmco-office-island {
    position: relative;
    display: block;
    flex: 0 0 350px;
    width: 350px;
    height: 350px;
    color: inherit;
    text-decoration: none !important;
    animation: jmco-float-island 4.2s ease-in-out infinite alternate;
    transition: transform .45s cubic-bezier(.4,0,.2,1), opacity .35s ease;
    contain: layout paint;
}
.jmco-office-island:nth-child(3n+2) { animation-delay: -.9s; }
.jmco-office-island:nth-child(3n) { animation-delay: -1.8s; }
@keyframes jmco-float-island { to { transform: translateY(-14px); } }
.jmco-office-island.jmco-entering { transform: scale(2.35) translateY(-35px); opacity: 0; z-index: 99; animation: none; }
.jmco-office-grid.jmco-fade-others .jmco-office-island:not(.jmco-entering) { opacity: 0; transform: scale(.82); animation: none; }

.jmco-island-glow {
    position: absolute;
    z-index: 1;
    left: 50%;
    bottom: 35px;
    width: 250px;
    height: 55px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: rgba(80,130,170,.18);
    filter: blur(18px);
}

.jmco-island-base {
    position: absolute;
    z-index: 2;
    left: 50%;
    bottom: 24px;
    width: 100%;
    height: 230px;
    object-fit: contain;
    object-position: center bottom;
    transform: translateX(-50%);
}

.jmco-desk-shadow {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 141px;
    width: 150px;
    height: 28px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: rgba(45,60,70,.18);
    filter: blur(7px);
}

.jmco-desk-pictures {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 131px;
    width: 54%;
    height: 180px;
    transform: translateX(-50%);
    transition: transform .3s ease;
}
.jmco-desk-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
    filter: drop-shadow(0 12px 14px rgba(50,70,90,.18));
    transition: opacity .2s ease;
}
.jmco-desk-open { opacity: 0; }
.jmco-office-island:hover .jmco-desk-pictures,
.jmco-office-island:focus-visible .jmco-desk-pictures { transform: translateX(-50%) translateY(-5px) scale(1.04); }
.jmco-office-island:hover .jmco-desk-closed,
.jmco-office-island:focus-visible .jmco-desk-closed { opacity: 0; }
.jmco-office-island:hover .jmco-desk-open,
.jmco-office-island:focus-visible .jmco-desk-open { opacity: 1; }

.jmco-name-board {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 81px;
    min-width: 110px;
    min-height: 42px;
    padding: 9px 15px;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50px;
    background: #fff;
    color: #658ea6;
    box-shadow: 0 8px 16px rgba(135,175,200,.25);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.2;
    white-space: nowrap;
    animation: jmco-float-board 2.6s ease-in-out infinite alternate;
}
.jmco-name-board::before,
.jmco-name-board::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    background: #fff;
}
.jmco-name-board::before { top: -12px; left: 18px; width: 35px; height: 35px; }
.jmco-name-board::after { top: -18px; right: 18px; width: 45px; height: 45px; }
@keyframes jmco-float-board { to { transform: translateX(-50%) translateY(-5px); } }

.jmco-sparkle {
    position: absolute;
    z-index: 6;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 12px #fff;
    animation: jmco-sparkle 2s ease-in-out infinite alternate;
}
.jmco-s1 { top: 90px; left: 55px; }
.jmco-s2 { top: 130px; right: 50px; animation-delay: -.7s; }
.jmco-s3 { bottom: 95px; left: 80px; animation-delay: -1.2s; }
@keyframes jmco-sparkle { from { transform: scale(.6); opacity: .3; } to { transform: scale(1.2); opacity: 1; } }

.jmco-empty-state,
.jmco-admin-hint {
    position: relative;
    z-index: 5;
    max-width: 680px;
    margin: 20px auto;
    padding: 14px 18px;
    border-radius: 12px;
    background: rgba(255,255,255,.84);
    color: #38576a;
    box-shadow: 0 10px 30px rgba(58,113,145,.14);
}

/* 島內頁 */
.jmco-room {
    min-height: 85vh;
    padding: 38px 16px 80px;
    background-image:
        linear-gradient(rgba(32,45,82,.08), rgba(18,24,56,.28)),
        var(--jmco-room-image, none),
        linear-gradient(180deg, #75d3ff 0%, #bcecff 48%, #8885c5 100%);
    background-size: cover;
    background-position: center;
}

.jmco-room-topbar {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.jmco-room-heading {
    margin: 0 !important;
    color: #fff !important;
    font-size: clamp(28px, 5vw, 46px) !important;
    font-weight: 900 !important;
    letter-spacing: 2px;
    text-align: center;
    text-shadow: 0 4px 18px rgba(41,51,91,.4);
}
.jmco-back-link {
    align-self: flex-start;
    padding: 9px 14px;
    border: 1px solid rgba(255,255,255,.45);
    border-radius: 999px;
    background: rgba(255,255,255,.22);
    backdrop-filter: blur(10px);
    color: #fff !important;
    font-weight: 700;
    text-decoration: none !important;
}

.jmco-stone-layer { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.jmco-stone { position: absolute; filter: drop-shadow(0 3px 5px rgba(0,0,0,.25)); opacity: .75; }
.jmco-stone-1 { left: -5%; bottom: -8%; animation: jmco-stone-ur 27s linear infinite; }
.jmco-stone-2 { right: -5%; top: -8%; animation: jmco-stone-dl 23s linear infinite -5s; }
.jmco-stone-3 { right: -5%; bottom: 22%; font-size: 1.8rem; animation: jmco-stone-ul 31s linear infinite -9s; }
.jmco-stone-4 { left: 12%; top: -8%; animation: jmco-stone-dr 29s linear infinite -4s; }
.jmco-stone-5 { left: 45%; bottom: -8%; font-size: 2rem; animation: jmco-stone-up 35s linear infinite -12s; }
@keyframes jmco-stone-ur { to { transform: translate(115vw,-110vh) rotate(360deg); } }
@keyframes jmco-stone-dl { to { transform: translate(-115vw,110vh) rotate(-360deg); } }
@keyframes jmco-stone-ul { to { transform: translate(-115vw,-110vh) rotate(360deg); } }
@keyframes jmco-stone-dr { to { transform: translate(115vw,110vh) rotate(-360deg); } }
@keyframes jmco-stone-up { to { transform: translate(0,-115vh) rotate(360deg); } }

.jmco-drawers-container {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 340px));
    justify-content: center;
    gap: 42px 34px;
    max-width: 1220px;
    margin: 25px auto 72px;
}

.jmco-drawer-card {
    position: relative;
    display: block;
    width: 100%;
    height: 320px;
    color: inherit;
    text-decoration: none !important;
    animation: jmco-drawer-breathe 3.4s ease-in-out infinite alternate;
    transition: transform .25s ease;
    contain: layout paint;
}
.jmco-drawer-card:nth-child(2n) { animation-delay: -1.1s; }
@keyframes jmco-drawer-breathe { to { transform: translateY(-9px); } }
.jmco-drawer-card:hover,
.jmco-drawer-card:focus-visible { transform: translateY(-8px) scale(1.025); animation: none; }

.jmco-inner-drawer-images { position: absolute; inset: 0; }
.jmco-inner-drawer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
    filter: drop-shadow(0 14px 13px rgba(24,27,60,.24));
    transition: opacity .18s ease;
}
.jmco-inner-open { opacity: 0; }
.jmco-drawer-card:hover .jmco-inner-closed,
.jmco-drawer-card:focus-visible .jmco-inner-closed { opacity: 0; }
.jmco-drawer-card:hover .jmco-inner-open,
.jmco-drawer-card:focus-visible .jmco-inner-open { opacity: 1; }

.jmco-sticky-note {
    position: absolute;
    z-index: 3;
    top: 24%;
    left: 19%;
    width: 112px;
    min-height: 68px;
    padding: 12px 9px;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: rotate(-3deg);
    border-bottom-right-radius: 12px 6px;
    background: #feff9c;
    color: #333;
    box-shadow: 2px 4px 7px rgba(0,0,0,.16);
    font-size: 17px;
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
}

.jmco-payment-section { position: relative; z-index: 5; }
.jmco-magic-title {
    margin: 0 0 27px !important;
    color: #fff !important;
    font-size: clamp(26px, 4vw, 38px) !important;
    font-weight: 900 !important;
    letter-spacing: 3px;
    text-align: center;
    text-shadow: 0 0 12px rgba(0,212,255,.78), 0 0 38px rgba(138,43,226,.68);
}
.jmco-number-matrix {
    display: grid;
    grid-template-columns: repeat(7, minmax(52px, 1fr));
    gap: 15px;
    width: min(820px, 100%);
    margin: 0 auto;
}
.jmco-magic-rune {
    appearance: none;
    aspect-ratio: 1;
    border: 1px solid rgba(255,255,255,.38);
    border-radius: 15px;
    background: rgba(255,255,255,.12);
    backdrop-filter: blur(10px);
    color: #fff;
    box-shadow: 0 5px 14px rgba(26,29,69,.14);
    font: inherit;
    font-size: 1.35rem;
    font-weight: 900;
    cursor: pointer;
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.jmco-magic-rune:hover,
.jmco-magic-rune:focus-visible { transform: translateY(-4px) scale(1.07); background: rgba(255,255,255,.25); box-shadow: 0 0 22px rgba(0,212,255,.6); }
.jmco-magic-rune.is-today {
    border: 2px solid rgba(255,255,255,.85);
    background: rgba(255,255,255,.22);
    box-shadow: 0 0 20px rgba(255,255,255,.55), inset 0 0 8px rgba(255,255,255,.25);
    animation: jmco-today-pulse 2.6s ease-in-out infinite;
}
@keyframes jmco-today-pulse { 50% { transform: translateY(-5px) scale(1.09); box-shadow: 0 0 28px rgba(255,255,255,.78); } }

.jmco-modal-overlay {
    position: fixed;
    z-index: 999999;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(6px);
    transition: opacity .22s ease, visibility .22s ease;
}
.jmco-modal-overlay.is-active { opacity: 1; visibility: visible; }
.jmco-modal {
    width: min(360px, 92vw);
    overflow: hidden;
    transform: scale(.96);
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 20px;
    background: rgba(27,29,42,.82);
    backdrop-filter: blur(20px);
    color: #fff;
    box-shadow: 0 16px 50px rgba(0,0,0,.45);
    transition: transform .22s ease;
}
.jmco-modal-overlay.is-active .jmco-modal { transform: scale(1); }
.jmco-modal-content { max-height: 62vh; overflow-y: auto; padding: 25px 20px; }
.jmco-modal-title { margin-bottom: 15px; font-size: 1.25rem; font-weight: 900; text-align: center; }
.jmco-modal-empty { margin: 10px 0 0; color: rgba(255,255,255,.83); text-align: center; }
.jmco-store-item { margin-bottom: 10px; padding: 12px; border-radius: 11px; background: rgba(255,255,255,.1); font-weight: 800; }
.jmco-modal-close {
    width: 100%;
    padding: 14px;
    border: 0;
    border-top: 1px solid rgba(255,255,255,.15);
    background: transparent;
    color: #54a5ff;
    font: inherit;
    font-size: 1.08rem;
    font-weight: 900;
    cursor: pointer;
}

.jmco-no-motion *,
.jmco-no-motion *::before,
.jmco-no-motion *::after { animation: none !important; transition-duration: .01ms !important; }

@media (max-width: 768px) {
    .jmco-hub { min-height: 76vh; padding: 70px 8px 60px; }
    .jmco-office-grid { gap: 22px; }
    .jmco-office-island { width: 310px; height: 325px; flex-basis: 310px; }
    .jmco-desk-pictures { bottom: 124px; width: 53%; }
    .jmco-name-board { bottom: 73px; }
    .jmco-room { padding: 28px 10px 60px; }
    .jmco-drawers-container { grid-template-columns: minmax(260px, 300px); gap: 26px; margin-bottom: 58px; }
    .jmco-drawer-card { height: 285px; }
    .jmco-number-matrix { grid-template-columns: repeat(5, 1fr); gap: 10px; }
    .jmco-magic-rune { font-size: 1.1rem; border-radius: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .jmco-hub *, .jmco-room *, .jmco-hub *::before, .jmco-room *::before, .jmco-hub *::after, .jmco-room *::after {
        animation: none !important;
        transition-duration: .01ms !important;
    }
}

/* GeneratePress 等一般主題的單一島嶼頁面，移除重複標題與文章白底。 */
body.single-jmco_island .entry-header { display: none; }
body.single-jmco_island .site.grid-container { max-width: none; }
body.single-jmco_island .content-area,
body.single-jmco_island .site-main,
body.single-jmco_island article.jmco_island { width: 100%; }
body.single-jmco_island .inside-article { padding: 0; background: transparent; }


/* 更強制的單一島嶼全螢幕版型修正（GeneratePress / 一般有側欄主題） */
body.single-jmco_island .site,
body.single-jmco_island .site-content,
body.single-jmco_island .content-area,
body.single-jmco_island .site-main,
body.single-jmco_island #primary,
body.single-jmco_island #main,
body.single-jmco_island article.jmco_island,
body.single-jmco_island .inside-article,
body.single-jmco_island .entry-content {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
body.single-jmco_island .site.grid-container,
body.single-jmco_island .inside-site-info.grid-container,
body.single-jmco_island .inside-header.grid-container,
body.single-jmco_island .inside-top-bar.grid-container {
    max-width: none;
}
body.single-jmco_island #right-sidebar,
body.single-jmco_island #left-sidebar,
body.single-jmco_island .right-sidebar,
body.single-jmco_island .left-sidebar,
body.single-jmco_island .widget-area,
body.single-jmco_island .is-right-sidebar,
body.single-jmco_island .is-left-sidebar,
body.single-jmco_island .inside-right-sidebar,
body.single-jmco_island .inside-left-sidebar {
    display: none !important;
}
body.single-jmco_island .content-area,
body.single-jmco_island .site-main,
body.single-jmco_island #primary {
    float: none !important;
}


/* 1.1.0：手機抽屜真正放大，每排固定一個；加入查看日期捷徑 */
.jmco-date-jump {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 126px;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid rgba(255,255,255,.5);
    border-radius: 999px;
    background: rgba(255,255,255,.24);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: #fff !important;
    box-shadow: 0 8px 22px rgba(25,39,88,.16);
    font-weight: 900;
    text-decoration: none !important;
}

/* 日期按鈕不位移、不縮放，只保留柔和亮度變化。 */
.jmco-magic-rune {
    transition: background .2s ease, box-shadow .2s ease, filter .2s ease;
}
.jmco-magic-rune:hover,
.jmco-magic-rune:focus-visible {
    transform: none;
    background: rgba(255,255,255,.25);
    box-shadow: 0 0 22px rgba(0,212,255,.6);
}
.jmco-magic-rune.is-today {
    animation: jmco-today-glow 2.6s ease-in-out infinite;
}
@keyframes jmco-today-glow {
    50% {
        filter: brightness(1.14);
        box-shadow: 0 0 28px rgba(255,255,255,.78), inset 0 0 10px rgba(255,255,255,.3);
    }
}

@media (max-width: 768px) {
    .jmco-room {
        padding-left: 0;
        padding-right: 0;
    }

    .jmco-room-topbar,
    .jmco-payment-section {
        padding-left: 14px;
        padding-right: 14px;
    }

    .jmco-drawers-container {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
        max-width: 440px;
        padding: 0 8px;
        gap: 18px;
        margin: 18px auto 50px;
    }

    .jmco-drawer-card {
        width: 100%;
        max-width: none;
        height: clamp(330px, 92vw, 405px);
        margin: 0 auto;
        contain: layout paint;
    }

    /* 圖片本體另外放大，避免來源圖有透明留白時看起來仍然很小。 */
    .jmco-inner-drawer {
        transform: scale(1.38);
        transform-origin: center bottom;
    }

    .jmco-sticky-note {
        top: 20%;
        left: 20%;
        width: 124px;
        min-height: 72px;
        padding: 12px 10px;
        font-size: 17px;
    }

    .jmco-date-jump {
        min-width: 150px;
        min-height: 46px;
        font-size: 16px;
    }

    .jmco-number-matrix {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        width: 100%;
    }
}

@media (max-width: 390px) {
    .jmco-drawer-card {
        height: 350px;
    }
    .jmco-inner-drawer {
        transform: scale(1.3);
    }
    .jmco-sticky-note {
        left: 18%;
        width: 116px;
        font-size: 16px;
    }
}
