/* ========================================
   社務所 (Shrine Office)
   Q北的領地 - 簽到、抽籤、商店
   ======================================== */



/* ========================================
   Loading 畫面
   ======================================== */
.shrine-loading {
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, #1a1410 0%, #2d1f1a 50%, #1a1410 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.shrine-loading.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loading-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.loading-character {
    width: 180px;
    height: auto;
    animation: float 2s ease-in-out infinite;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.loading-info {
    text-align: center;
}

.loading-text {
    color: #d4a574;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-family: 'Yuji Syuku', serif;
    letter-spacing: 0.1em;
}

.loading-bar {
    width: 250px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(212, 165, 116, 0.3);
}

.loading-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #8B4513, #d4a574, #8B4513);
    border-radius: 4px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(212, 165, 116, 0.5);
}

/* 未登入提示 */
.shrine-login-prompt {
    min-height: 100vh;
    background: #1a1410;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.shrine-login-prompt .office-stage {
    position: relative;
    width: 100%;
    max-width: 1600px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.shrine-login-prompt .guest-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 248, 240, 0.95);
    border-radius: 16px;
    padding: 2.5rem 3rem;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    border: 3px solid #8B4513;
    z-index: 10;
}

.shrine-login-prompt h2 {
    color: #3E2723;
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
}

.shrine-login-prompt p {
    color: #5D4037;
    margin-bottom: 1.2rem;
    line-height: 1.5;
    font-size: 0.95rem;
}

.shrine-login-prompt .btn-login {
    display: inline-block;
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
}

.shrine-login-prompt .btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 69, 19, 0.4);
}

/* 頁面容器 */
.shrine-office-page {
    min-height: 100vh;
    background: #1a1410;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* 場景舞台 (16:9 固定比例) */
.office-stage {
    position: relative;
    width: 100%;
    max-width: 1600px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* 背景圖 */
.office-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
}

/* ========================================
   Q北店長（中央）
   ======================================== */

.qbei-shopkeeper {
    position: absolute;
    bottom: 12%;
    left: 50%;
    transform: translateX(-50%);
    width: 32%;
    z-index: 10;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.qbei-shopkeeper:hover {
    transform: translateX(-50%) scale(1.03);
}

.qbei-shopkeeper img {
    width: 100%;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.4));
}

/* Q北對話氣泡 */
.qbei-bubble {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 1rem 1.75rem;
    border-radius: 16px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
    border: 3px solid #991b1b;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.qbei-bubble.active {
    opacity: 1;
    visibility: visible;
    animation: bubble-bounce 0.5s ease-out;
}

@keyframes bubble-bounce {
    0% { transform: translateX(-50%) translateY(10px); opacity: 0; }
    100% { transform: translateX(-50%) translateY(0); opacity: 1; }
}

.qbei-text {
    font-family: 'Yuji Syuku', serif;
    font-size: 1.4rem;
    color: #991b1b;
    white-space: nowrap;
    margin: 0;
}

.bubble-arrow {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid white;
}

.bubble-arrow::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #991b1b;
}

/* ========================================
   賽錢箱（左側）
   ======================================== */

.saisen-box {
    position: absolute;
    left: 5%;
    bottom: 12%;
    width: 22%;
    z-index: 20;
    cursor: pointer;
    transition: all 0.3s ease;
}

.saisen-box:hover {
    transform: translateY(-5px);
}

.saisen-box img {
    width: 100%;
    filter: drop-shadow(0 6px 15px rgba(0, 0, 0, 0.3));
}

/* 簽到提示徽章 */
.checkin-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #78350f;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.5);
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* ========================================
   籤筒（右側）
   ======================================== */

.omikuji-cylinder {
    position: absolute;
    right: 8%;
    bottom: 18%;
    width: 14%;
    z-index: 20;
    cursor: pointer;
    transition: transform 0.5s ease;
    transform-origin: bottom center;
}

.omikuji-cylinder:hover {
    transform: rotate(10deg);
}

.omikuji-cylinder img {
    width: 100%;
    filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.3));
}

/* ========================================
   燈籠（右下角裝飾，遮擋浮水印）
   ======================================== */

.decor-lantern {
    position: absolute;
    right: -5%;
    bottom: -2%;
    width: 16%;
    z-index: 5;
    pointer-events: none;
}

.decor-lantern img {
    width: 100%;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

/* ========================================
   互動提示氣泡 (Interact Bubble)
   ======================================== */

.interact-bubble {
    position: absolute;
    top: -5%;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    z-index: 30;
    animation: bubble-float 2.5s ease-in-out infinite;
    pointer-events: none;
    cursor: pointer;
}

/* Q北的氣泡可以點擊 */
.qbei-shopkeeper .interact-bubble {
    pointer-events: auto;
}

.interact-bubble img {
    width: 100%;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
}

/* Q北的氣泡位置調整 */
.qbei-shopkeeper .interact-bubble {
    top: -5%;
    width: 50px;
}

/* 賽錢箱的氣泡位置調整 */
.saisen-box .interact-bubble {
    top: -8%;
    width: 50px;
}

/* 籤筒的氣泡位置調整 */
.omikuji-cylinder .interact-bubble {
    top: -5%;
    width: 45px;
}

/* 懸浮動畫 - 更輕柔 */
@keyframes bubble-float {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-4px); }
}

/* Hover 時隱藏氣泡（賽錢箱和籤筒） */
.saisen-box:hover .interact-bubble,
.omikuji-cylinder:hover .interact-bubble {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* ========================================
   頂部 UI
   ======================================== */

.office-top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 30;
}

/* 返回按鈕（圖片版） */
.back-btn-img {
    display: block;
    width: 120px;
    transition: transform 0.2s ease;
}

.back-btn-img img {
    width: 100%;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.back-btn-img:hover {
    transform: translateY(-2px) scale(1.05);
}

/* 右上角錢幣群組 */
.currency-group {
    display: flex;
    gap: 1rem;
}

/* 錢幣顯示（放大版） */
.coin-display {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    border: 2px solid rgba(250, 204, 21, 0.5);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.coin-display img {
    width: 36px;
    height: 36px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.coin-display span {
    font-family: 'Yuji Syuku', serif;
    font-size: 1.5rem;
    font-weight: bold;
    color: #fbbf24;
    min-width: 40px;
    text-align: right;
}

/* 賽錢顯示 */
.saisen-display img {
    width: 36px;
    height: 36px;
}

.saisen-display {
    border-color: rgba(205, 127, 50, 0.4);
}

.saisen-display span {
    color: #fbbf24;
}

/* ========================================
   Q北選單
   ======================================== */

.qbei-menu {
    position: absolute;
    bottom: 70%;
    left: 50%;
    transform: translateX(-50%);
    animation: menu-appear 0.3s ease-out;
    z-index: 100;
}

/* 卷軸容器 - 使用 border-image 九宮格切圖 */
.scroll-container {
    position: relative;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    
    /* 邊框設定 */
    border-width: 0px 60px 0px 60px;
    border-style: solid;
    border-color: transparent;
    
    /* 九宮格切圖魔法 */
    border-image-source: url('/images/shrine/Makimono.png');
    border-image-slice: 0 150 0 150 fill;
    border-image-repeat: stretch;
    
    /* 陰影效果 */
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
}

/* 按鈕容器 */
.scroll-buttons {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.qbei-menu-btn-img {
    background: transparent !important;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s ease;
    outline: none;
    pointer-events: auto;
    position: relative;
    z-index: 100;
}

.qbei-menu-btn-img:focus,
.qbei-menu-btn-img:hover,
.qbei-menu-btn-img:active {
    background: transparent !important;
    outline: none;
    box-shadow: none;
}

.qbei-menu-btn-img:hover {
    transform: scale(1.15);
}

.qbei-menu-btn-img img {
    width: 60px !important;
    height: 60px !important;
    max-width: none !important;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

@keyframes menu-appear {
    from { transform: translateX(-50%) translateY(10px) scale(0.9); opacity: 0; }
    to { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
}

.qbei-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, #4a3728, #2d1f15);
    border: 1px solid rgba(250, 204, 21, 0.3);
    border-radius: 12px;
    color: #f5f0e6;
    font-family: 'Yuji Syuku', serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    min-width: 140px;
}

.qbei-menu-btn:hover {
    background: linear-gradient(135deg, #5a4738, #3d2f25);
    border-color: rgba(250, 204, 21, 0.6);
    transform: translateX(4px);
}

.menu-icon {
    font-size: 1.2rem;
}

.menu-label {
    flex: 1;
}

.menu-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: badge-pulse 1.5s ease-in-out infinite;
}

/* 圖片按鈕版選單 */
.qbei-menu-btn-img {
    position: relative;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.qbei-menu-btn-img img {
    width: 60px !important;
    height: 60px !important;
    max-width: none !important;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    pointer-events: auto;
    cursor: pointer;
}

.qbei-menu-btn-img:hover {
    transform: scale(1.1);
}

.qbei-menu-btn-img:hover img {
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
}

.qbei-menu-btn-img .menu-badge {
    top: -8px;
    right: -8px;
}

/* ========================================
   投幣飛行動畫
   ======================================== */

.flying-coin {
    position: absolute;
    width: 40px;
    height: 40px;
    z-index: 100;
    pointer-events: none;
}

.flying-coin img {
    width: 100%;
    height: 100%;
}

@keyframes coin-fly {
    0% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.2) rotate(180deg);
    }
    100% {
        opacity: 0;
        transform: scale(0.5) rotate(360deg);
    }
}

.flying-coin.animate {
    animation: coin-fly 0.6s ease-in forwards;
}

/* 賽錢箱震動 */
@keyframes saisen-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-5px) rotate(-2deg); }
    40% { transform: translateX(5px) rotate(2deg); }
    60% { transform: translateX(-3px) rotate(-1deg); }
    80% { transform: translateX(3px) rotate(1deg); }
}

.saisen-box.shake {
    animation: saisen-shake 0.4s ease-in-out;
}

/* 籤筒搖晃 */
@keyframes cylinder-shake {
    0%, 100% { transform: rotate(0deg); }
    10% { transform: rotate(-15deg); }
    20% { transform: rotate(15deg); }
    30% { transform: rotate(-12deg); }
    40% { transform: rotate(12deg); }
    50% { transform: rotate(-8deg); }
    60% { transform: rotate(8deg); }
    70% { transform: rotate(-5deg); }
    80% { transform: rotate(5deg); }
    90% { transform: rotate(-2deg); }
}

.omikuji-cylinder.shake {
    animation: cylinder-shake 1s ease-in-out;
}

/* ========================================
   Modal 共用樣式
   ======================================== */

.office-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: safe center;
    justify-content: center;
    overflow-y: auto;
    padding: 80px 20px 20px;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    z-index: 1;
    background: linear-gradient(180deg, #fdfbf7, #f5f0e6);
    border-radius: 16px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border: 3px solid #c9a86c;
    animation: modal-appear 0.3s ease-out;
}

@keyframes modal-appear {
    from { transform: scale(0.9) translateY(20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

/* 簽到 Modal */
.checkin-content {
    text-align: center;
}

.modal-qbei {
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
}

.modal-qbei img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-bubble {
    text-align: center;
}

.modal-title {
    font-family: 'Yuji Syuku', serif;
    font-size: 1.5rem;
    color: #1c1917;
    margin-bottom: 0.5rem;
}

.modal-text {
    font-size: 1rem;
    color: #57534e;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.coin-reward {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(250, 204, 21, 0.15);
    border-radius: 12px;
    border: 2px dashed #fbbf24;
}

.coin-reward img {
    width: 40px;
    height: 40px;
}

.coin-reward span {
    font-family: 'Yuji Syuku', serif;
    font-size: 1.5rem;
    font-weight: bold;
    color: #b45309;
}

.modal-btn {
    display: block;
    width: 100%;
    padding: 0.9rem 1.5rem;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: 'Yuji Syuku', serif;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    transition: all 0.2s ease;
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.5);
}

.modal-btn-secondary {
    display: block;
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.7rem 1.5rem;
    background: transparent;
    color: #78716c;
    border: 1px solid #d6d3d1;
    border-radius: 8px;
    font-family: 'Yuji Syuku', serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-btn-secondary:hover {
    background: #f5f5f4;
}

/* ========================================
   商店 Modal（左買右看佈局 - 放大版）
   ======================================== */

.shop-container {
    position: relative;
    z-index: 1;
    width: 90%;
    max-width: 900px;
    height: 550px;
    max-height: 70vh;
    animation: modal-appear 0.3s ease-out;
}

.shop-bg {
    position: absolute;
    inset: -20px;
    width: calc(100% + 40px);
    height: calc(100% + 40px);
    object-fit: fill;
    filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.6));
    border-radius: 16px;
}

/* Q北頭像包裝 */
.shop-qbei-wrapper {
    position: absolute;
    top: -60px;
    left: -40px;
    z-index: 10;
}

.shop-qbei-head {
    width: 150px;
    transform: rotate(-5deg);
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
}

.shop-qbei-head:hover {
    transform: rotate(0deg) scale(1.05);
}

/* 商店 Q北 對話氣泡 */
.shop-qbei-bubble {
    position: absolute;
    top: 20px;
    left: 180px;
    background: white;
    padding: 0.6rem 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    border: 2px solid #991b1b;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    white-space: nowrap;
    z-index: 20;
}

.shop-qbei-bubble.active {
    opacity: 1;
    visibility: visible;
}

.shop-qbei-bubble::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    border: 8px solid transparent;
    border-right-color: #991b1b;
}

.shop-qbei-bubble::after {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: white;
}

.shop-qbei-text {
    font-family: 'Yuji Syuku', serif;
    font-size: 1rem;
    color: #1a1a1a;
    margin: 0;
}

/* 關閉按鈕 */
.shop-close-btn {
    position: absolute;
    top: 15px;
    right: 25px;
    background: transparent !important;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s ease;
    z-index: 20;
    outline: none;
}

.shop-close-btn:focus,
.shop-close-btn:hover,
.shop-close-btn:active {
    background: transparent !important;
    outline: none;
    box-shadow: none;
}

.shop-close-btn img {
    width: 60px;
    background: transparent;
}

.shop-close-btn:hover {
    transform: scale(1.1);
}

/* 商店右上角錢幣顯示區 */
.shop-currency-group {
    position: absolute;
    top: 15px;
    right: 80px;
    display: flex;
    gap: 1rem;
    z-index: 15;
}

/* 左右分割佈局 */
.shop-split-layout {
    position: absolute;
    top: 50px;
    left: 50px;
    right: 50px;
    bottom: 50px;
    display: flex;
}

/* 左側：商品架 (55%) */
.shop-left-panel {
    flex: 0 0 55%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 20px;
    padding-right: 20px;
    border-right: 4px solid rgba(62, 39, 35, 0.2);
}

/* 商品格子 3x2（固定6格） */
.shop-items-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
    padding: 8px;
}

.shop-item-slot {
    position: relative;
    aspect-ratio: 1;
    background-image: url('/images/shrine/shop_slot_empty.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.shop-item-slot:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.shop-item-slot.selected {
    box-shadow: 0 0 0 4px #fbbf24, 0 0 20px rgba(251, 191, 36, 0.7);
}

.shop-item-slot img {
    width: 75%;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
    transition: transform 0.3s ease;
}

.shop-item-slot:hover img {
    transform: scale(1.1);
}

.shop-item-slot.empty {
    cursor: default;
    opacity: 0.4;
}

.shop-item-slot.empty:hover {
    transform: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.shop-item-slot.empty:hover img {
    transform: none;
}

/* 商品價格標籤（放大） */
.shop-item-price-tag {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.75);
    color: #fbbf24;
    font-size: 0.95rem;
    padding: 5px 12px;
    border-radius: 20px;
    font-family: 'Yuji Syuku', serif;
    font-weight: bold;
}

/* 右側：詳情區 (45%) - 強制置中 */
.shop-right-panel {
    flex: 0 0 45%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    box-sizing: border-box;
}

.shop-right-panel > * {
    transform: translateX(-15px);
}

/* 頂部：大圖 + 名稱 */
.shop-preview-top {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 15px;
}

/* 大圖預覽 */
.shop-preview-image {
    width: 140px;
    height: 140px;
    background: rgba(255, 248, 225, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px auto;
    box-shadow: inset 0 0 20px rgba(139, 69, 19, 0.1);
    border: 2px solid rgba(141, 110, 99, 0.3);
}

.shop-preview-image img {
    width: 100px;
    height: auto;
    max-width: 100px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

/* 商品名稱 */
.shop-preview-name {
    font-family: 'Yuji Syuku', serif;
    font-size: 1.6rem;
    font-weight: bold;
    color: #3e2723;
    margin: 0 auto;
    text-align: center !important;
    display: block;
    width: 100%;
}

/* 中間：說明文字區 */
.shop-preview-middle {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 15px 0;
}

/* 說明文字區 */
.shop-preview-desc-box {
    background: rgba(253, 251, 247, 0.98);
    border: 2px solid #8d6e63;
    border-radius: 12px;
    padding: 15px;
    width: 100%;
    max-width: 220px;
    min-height: 80px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    box-sizing: border-box;
}

.shop-preview-desc-box p {
    font-size: 1rem;
    color: #5d4037;
    line-height: 1.7;
    margin: 0 auto;
    text-align: center !important;
}

.shop-preview-price {
    margin-top: 10px !important;
    font-weight: bold;
    color: #b45309 !important;
    font-size: 1.1rem !important;
    text-align: center !important;
}

/* 底部：購買按鈕 */
.shop-preview-bottom {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

/* 購買按鈕 */
.shop-buy-btn {
    background: transparent !important;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    display: block;
    margin: 0 auto;
    outline: none;
}

.shop-buy-btn:focus,
.shop-buy-btn:hover,
.shop-buy-btn:active {
    background: transparent !important;
    outline: none;
    box-shadow: none;
}

.shop-buy-btn img {
    width: 200px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.shop-buy-btn:hover:not(:disabled) {
    transform: scale(1.03);
}

.shop-buy-btn:hover:not(:disabled) img {
    filter: brightness(1.1) drop-shadow(0 8px 16px rgba(0, 0, 0, 0.45));
}

.shop-buy-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.shop-buy-btn:active:not(:disabled) {
    transform: scale(0.97);
}

/* 平板響應式 (商店) */
@media (max-width: 1024px) {
    .shop-container {
        width: 90vw;
        height: 70vh;
        max-height: 500px;
    }
    
    .shop-qbei-head {
        width: 120px;
    }
    
    .shop-split-layout {
        top: 35px;
        left: 35px;
        right: 35px;
        bottom: 35px;
    }
    
    .shop-left-panel {
        flex: 0 0 60%;
    }
    
    .shop-items-grid {
        gap: 15px;
    }
}

/* ========================================
   社務所封印狀態（Q北擋路）
   ======================================== */

.office-locked-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 1.5rem;
    text-align: center;
}

.office-locked-avatar {
    width: 180px;
    height: 180px;
    margin-bottom: 1.5rem;
}

.office-locked-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.office-locked-dialog {
    background: linear-gradient(180deg, #fdfbf7 0%, #f5f0e8 100%);
    border: 2px solid #8B0000;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.office-locked-text {
    font-size: 1rem;
    line-height: 1.8;
    color: #3d3425;
    margin-bottom: 1.5rem;
    white-space: pre-line;
    font-family: 'Yuji Syuku', serif;
}

.office-locked-btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: linear-gradient(135deg, #8B0000 0%, #6B0000 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.3);
}

.office-locked-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 0, 0, 0.4);
}

/* 深色模式 */
[data-theme="dark"] .office-locked-dialog {
    background: linear-gradient(180deg, #2a2520 0%, #1f1a16 100%);
    border-color: #8B0000;
}

[data-theme="dark"] .office-locked-text {
    color: #e8e0d5;
}

/* ========================================
   音樂開關按鈕
   ======================================== */

.bgm-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.9) 0%, rgba(107, 0, 0, 0.9) 100%);
    border: 2px solid rgba(255, 215, 0, 0.5);
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.bgm-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.bgm-toggle:active {
    transform: scale(0.95);
}

/* 手機版調整 */
@media (max-width: 768px) {
    .bgm-toggle {
        bottom: 80px;
        right: 15px;
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
    }
}
