﻿* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; font-family: "PingFang SC","Microsoft YaHei",sans-serif; background: #1a1a1a; touch-action: none; overscroll-behavior: none; -webkit-user-select: none; user-select: none; }
#scene { position: fixed; top: 0; left: 0; width: 100%; height: 100%; display: block; touch-action: none; transition: left .28s ease, width .28s ease; }
body.arranging #scene { left: 340px; width: calc(100% - 340px); }
body.arranging #crosshair { left: calc(340px + (100% - 340px) / 2); }
@media (max-width: 720px) {
  body.arranging #scene { left: 0; width: 100%; height: 46vh; height: 46dvh; }
  body.arranging #crosshair { left: 50%; top: 23vh; top: 23dvh; }
}
.hidden { display: none !important; }

/* 升级专业版 */
.pro-btn { background: linear-gradient(135deg,#e0aa3e,#c98a1e) !important; color: #fff !important; font-weight: 600; }
.modal .panel.pro-panel { max-width: 920px; }
.pro-status { text-align: center; font-size: 14px; color: #8a6d2f; margin-bottom: 14px; min-height: 18px; }
.pro-status.pro-on { color: #2e7d4f; font-weight: 600; }
.pro-plans { display: flex; gap: 18px; margin: 8px 0 22px; align-items: stretch; }
.pro-plans-3 { gap: 18px; }
.pro-plans-3 .pro-card { padding: 20px 22px; }
.pro-plans-3 .pro-card-price { font-size: 21px; line-height: 1.5; }
.pro-card { flex: 1; min-width: 0; border: 1.5px solid #e2d3ab; border-radius: 14px; padding: 18px 20px; background: #fbf7ec; transition: transform .2s, box-shadow .2s; }
.pro-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.pro-card-hot { border-color: #c9a24a; background: linear-gradient(160deg,#fdf4dd,#f7ead0); box-shadow: 0 4px 14px rgba(201,162,74,.25); }
.pro-card-hot:hover { box-shadow: 0 8px 24px rgba(201,162,74,.35); }
.pro-card-flag { border-color: #7a4a8a; background: linear-gradient(160deg,#f3e8f7,#e5d3ee); box-shadow: 0 4px 14px rgba(122,74,138,.25); }
.pro-card-flag:hover { box-shadow: 0 8px 24px rgba(122,74,138,.35); }
.pro-card-flag .pro-card-price { color: #7a2a6e; }
.pro-card-flag .pro-card li::before { color: #7a4a8a; }
.pro-card-flag .pro-card li b { color: #7a2a6e; }
.pro-card-name { font-weight: 700; font-size: 17px; color: #4a3c22; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.pro-card-tag { font-size: 12.5px; color: #a8842e; margin: 4px 0 10px; font-style: italic; }
.pro-card-flag .pro-card-tag { color: #7a4a8a; }
.pro-badge { font-size: 11px; background: #c9a24a; color: #fff; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.pro-badge-flag { background: #7a4a8a; }
.pro-card-price { font-size: 24px; font-weight: 700; color: #b0442a; margin: 8px 0 10px; white-space: nowrap; }
.pro-card-price small { font-size: 13px; color: #a8842e; font-weight: 500; }
.pro-card ul { list-style: none; }
.pro-card li { font-size: 13.5px; line-height: 1.55; color: #6a5a35; padding: 4px 0 4px 18px; position: relative; }
.pro-card li::before { content: '✓'; position: absolute; left: 0; color: #c9a24a; font-weight: 700; }
.pro-redeem { border-top: 1px dashed #e0d2ab; padding-top: 16px; }
.pro-redeem-tip { font-size: 13px; color: #5a4c2e; margin-bottom: 8px; }
.pro-redeem-row { display: flex; gap: 10px; }
.pro-redeem-row input { flex: 1; padding: 10px 12px; border: 1px solid #d8c89a; border-radius: 8px; font-size: 14px; letter-spacing: 1px; }
.pro-redeem-row button { white-space: nowrap; }
.pro-buy-tip { font-size: 12.5px; color: #a8842e; margin-top: 10px; }
@media (max-width: 760px) { .pro-plans { flex-direction: column; } .pro-card-price { white-space: normal; } }
/* 锁定的画框/场景选项 */
.opt-locked { opacity: .5; }
/* 展厅免费版水印 */
#wm { position: fixed; right: 14px; bottom: 12px; z-index: 15; pointer-events: none; font-size: 13px; font-weight: 600; color: rgba(244,239,230,.38); letter-spacing: 1px; text-shadow: 0 1px 2px rgba(0,0,0,.3); font-family: Georgia, serif; }

/* 顶部栏 */
#topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; background: linear-gradient(rgba(10,10,12,.6), transparent); color: #f4efe6; pointer-events: none; }
#topbar .brand { display: flex; align-items: center; gap: 8px; font-size: 18px; letter-spacing: 1px; pointer-events: auto; }
#topbar .logo { color: #d9a84e; font-size: 22px; }
#topbar .actions { display: none; gap: 8px; pointer-events: auto; flex-wrap: wrap; justify-content: flex-end; }
#topbar .actions.open { display: flex; }
/* 桌面端下拉面板样式（与移动端一致） */
#topbar .actions {
  position: absolute; top: calc(100% + 6px); right: max(10px, env(safe-area-inset-right));
  flex-wrap: nowrap; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 6px;
  background: rgba(16,16,18,.92); border: 1px solid rgba(255,255,255,.15);
  border-radius: 12px; padding: 10px; min-width: 170px;
  max-height: calc(100vh - 72px - env(safe-area-inset-bottom));
  max-height: calc(100dvh - 72px - env(safe-area-inset-bottom));
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  backdrop-filter: blur(8px); box-shadow: 0 12px 32px rgba(0,0,0,.4);
}
#topbar .actions .tbtn { width: 100%; min-height: 40px; flex-shrink: 0; text-align: left; padding: 8px 12px; font-size: 13px; }
.tbtn { background: rgba(255,255,255,.12); color: #f4efe6; border: 1px solid rgba(255,255,255,.25); padding: 7px 14px; border-radius: 20px; cursor: pointer; font-size: 13px; backdrop-filter: blur(6px); transition: .2s; }
.tbtn:hover { background: rgba(255,255,255,.24); }
.tbtn.primary { background: #d9a84e; border-color: #d9a84e; color: #241a08; font-weight: 600; }
.tbtn.primary:hover { background: #e8bb62; }
#btnMenu { display: block; pointer-events: auto; font-size: 18px; line-height: 1; padding: 6px 12px; }
body.fullscreen-active #topbar { display: none !important; }
.fullscreen-exit { position: fixed; top: max(10px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); z-index: 45; background: rgba(16,16,18,.58); opacity: .68; }
.fullscreen-exit:hover,.fullscreen-exit:focus-visible { background: rgba(16,16,18,.82); opacity: 1; }
.fullscreen-exit:focus-visible { outline: 2px solid #d9a84e; outline-offset: 2px; }

/* 进入卡 */
#enterCard { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at center, rgba(20,18,14,.35), rgba(8,8,10,.78)); backdrop-filter: blur(3px); }
#bootVeil { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: #141210; transition: opacity .45s ease; }
#bootVeil.hide { opacity: 0; pointer-events: none; }
#bootVeil .boot-inner { text-align: center; }
#bootVeil .boot-logo { font-size: 26px; letter-spacing: 10px; color: #e8bb62; font-weight: 600; text-indent: 10px; }
#bootVeil .boot-sub { margin-top: 12px; font-size: 13px; color: rgba(244,239,230,.55); letter-spacing: 4px; text-indent: 4px; animation: bootPulse 1.6s ease-in-out infinite; }
@keyframes bootPulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
#enterCard .card { text-align: center; color: #f4efe6; max-width: 520px; padding: 40px; }
#enterCard h1 { font-size: 40px; letter-spacing: 4px; margin-bottom: 12px; font-weight: 600; text-shadow: 0 4px 24px rgba(0,0,0,.6); }
#enterCard #enterSub { color: #d9a84e; letter-spacing: 2px; margin-bottom: 26px; font-size: 15px; }
#enterCard .keys { display: flex; gap: 18px; justify-content: center; margin-bottom: 30px; flex-wrap: wrap; }
#enterCard .keys span { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); padding: 8px 14px; border-radius: 10px; font-size: 13px; }
#enterCard .keys b { color: #d9a84e; margin-right: 5px; }
#btnEnter { background: #d9a84e; color: #241a08; border: none; padding: 14px 54px; font-size: 17px; border-radius: 30px; cursor: pointer; font-weight: 700; letter-spacing: 3px; transition: .2s; box-shadow: 0 8px 30px rgba(217,168,78,.35); }
#btnEnter:hover { transform: translateY(-2px); background: #e8bb62; }
.enter-actions { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
#btnEnterRoam { border: 1px solid rgba(244,239,230,.42); border-radius: 30px; background: rgba(255,255,255,.07); color: #f4efe6; padding: 12px 24px; font: inherit; font-size: 14px; cursor: pointer; }
#btnEnterRoam:hover { background: rgba(255,255,255,.15); border-color: #e8bb62; }
#btnEnterRoam:focus-visible { outline: 2px solid #e8bb62; outline-offset: 3px; }
#enterCard .tip { margin-top: 16px; font-size: 12px; color: rgba(244,239,230,.6); }

/* 进入卡操作导览（键帽图示） */
#enterCard .card { max-height: 94vh; overflow-y: auto; }
#enterCard .guide { margin-bottom: 24px; }
#enterCard .guide-demos { display: flex; justify-content: center; align-items: center; gap: 34px; margin-bottom: 18px; }
.kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 7px; background: #2b2b30; border: 1px solid rgba(255,255,255,.16); border-bottom-width: 3px; color: #f4efe6; font-size: 13px; font-weight: 600; }
.kbd-grid { display: grid; grid-template-columns: repeat(3, 34px); grid-template-rows: repeat(2, 34px); gap: 5px; }
.kbd-grid .kbd-up { grid-column: 2; grid-row: 1; }
.kbd-grid .kbd:not(.kbd-up) { grid-row: 2; }
.guide-mouse { position: relative; font-size: 44px; line-height: 1; }
.guide-mouse-arrow { position: absolute; top: -10px; right: -14px; font-size: 18px; color: #d9a84e; }
.guide-touch-ico { font-size: 30px; line-height: 1.6; }
#enterCard .guide-text { margin: 5px 0; font-size: 13.5px; color: rgba(244,239,230,.82); line-height: 1.7; }
#enterCard .guide-text b { color: #d9a84e; }
#enterCard .guide-link { display: inline-block; margin-top: 10px; font-size: 13px; color: #e8bb62; cursor: pointer; border-bottom: 1px dashed rgba(232,187,98,.5); padding-bottom: 1px; }
#enterCard .guide-link:hover { color: #f4d287; }
@media (max-width: 640px) { #enterCard .guide-demos { gap: 26px; } #enterCard .card { padding: 28px 18px; } }

/* 完整使用教程弹窗 */
.modal-x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); background: rgba(0,0,0,.05); color: #4a4238; font-size: 18px; cursor: pointer; line-height: 1; z-index: 2; }
.modal-x:hover { background: rgba(0,0,0,.12); }
.help-panel { position: relative; max-width: 560px; text-align: left; }
.help-panel h2 { text-align: center; margin-bottom: 18px; }
.help-section { margin-bottom: 18px; }
.help-section h3 { font-size: 15px; color: #b8862e; margin-bottom: 10px; }
.help-row { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.help-row p { margin: 0; font-size: 13.5px; line-height: 1.7; color: #4a4238; }
.help-row p b { color: #2a241c; }
.help-demo { flex: 0 0 96px; display: flex; justify-content: center; }
.kbd-wide { min-width: 88px; }
.help-list { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 2; color: #4a4238; }
.help-list b { color: #2a241c; }
@media (max-width: 640px) { .help-panel { max-width: 92vw; } .help-demo { flex-basis: 84px; } }
.enter-progress { width: 240px; max-width: 70vw; height: 6px; margin: 12px auto 0; background: rgba(255,255,255,.14); border-radius: 3px; overflow: hidden; }
.enter-progress > div { height: 100%; width: 0; background: linear-gradient(90deg, #e8bb62, #d9a84e); border-radius: 3px; transition: width .25s ease; }

/* 准星 / 提示 / toast */
#crosshair { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); color: rgba(255,255,255,.75); font-size: 20px; z-index: 10; pointer-events: none; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
/* 手机虚拟摇杆：固定左下角，半透明常驻，按下高亮 */
#joystick { position: fixed; left: 26px; bottom: 30px; width: 116px; height: 116px; border-radius: 50%; background: rgba(255,255,255,.07); border: 2px solid rgba(255,255,255,.22); z-index: 11; pointer-events: none; backdrop-filter: blur(2px); opacity: .6; transition: opacity .15s; }
#joystick.active { opacity: 1; border-color: rgba(217,168,78,.6); }
#joyKnob { position: absolute; left: 50%; top: 50%; width: 50px; height: 50px; border-radius: 50%; background: rgba(217,168,78,.8); border: 2px solid rgba(255,255,255,.5); transform: translate(-50%,-50%); box-shadow: 0 2px 8px rgba(0,0,0,.4); }
#hint { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); color: rgba(244,239,230,.8); font-size: 12.5px; background: rgba(10,10,12,.5); padding: 8px 18px; border-radius: 20px; z-index: 10; pointer-events: none; backdrop-filter: blur(4px); letter-spacing: 1px; }
#slotHoverTip { position: fixed; z-index: 25; pointer-events: none; padding: 7px 11px; border-radius: 7px; background: rgba(18,18,22,.94); border: 1px solid rgba(217,168,78,.5); color: #f4efe6; font-size: 12.5px; white-space: nowrap; box-shadow: 0 5px 18px rgba(0,0,0,.25); }
#canvasScaleHandle { position: fixed; z-index: 45; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; width: 54px; height: 54px; padding: 0; transform: translate(-50%,-50%); border: 2px solid #f4d58c; border-radius: 12px; background: rgba(24,20,13,.94); color: #ffe8b5; box-shadow: 0 4px 18px rgba(0,0,0,.42),0 0 0 5px rgba(217,168,78,.14); cursor: ew-resize; touch-action: none; user-select: none; }
#canvasScaleHandle span { font: 26px/1 sans-serif; pointer-events: none; }
#canvasScaleHandle output { color: rgba(255,238,200,.82); font: 10px/1.2 sans-serif; pointer-events: none; }
#canvasScaleHandle:hover, #canvasScaleHandle.dragging { background: #9b732d; color: #fff; box-shadow: 0 4px 20px rgba(0,0,0,.45),0 0 0 7px rgba(217,168,78,.20); }
#canvasScaleHandle:focus-visible { outline: 3px solid #fff1c9; outline-offset: 3px; }
#toast { position: fixed; top: 74px; left: 50%; transform: translateX(-50%); background: rgba(20,20,24,.92); color: #f4efe6; padding: 11px 22px; border-radius: 10px; z-index: 60; font-size: 14px; border: 1px solid rgba(217,168,78,.4); box-shadow: 0 8px 30px rgba(0,0,0,.4); }

/* 布展模式面板 */
/* 布展编辑器：左侧图标栏 + 停靠侧面板 */
#arrangePanel { position: fixed; left: 0; top: 0; bottom: 0; z-index: 30; display: flex; background: rgba(18,18,22,.95); color: #f4efe6; border-right: 1px solid rgba(217,168,78,.25); box-shadow: 6px 0 34px rgba(0,0,0,.45); backdrop-filter: blur(8px); }
#arrangePanel .arrange-rail { width: 72px; flex-shrink: 0; display: flex; flex-direction: column; justify-content: center; gap: 4px; background: rgba(255,255,255,.035); border-right: 1px solid rgba(255,255,255,.08); padding: 70px 0 20px; }
#arrangePanel .arrange-body { width: 268px; padding: 76px 18px 24px; overflow-y: auto; }
#arrangePanel .arrange-head { position: absolute; z-index: 2; top: 0; left: 72px; right: 0; height: 56px; display: flex; align-items: center; gap: 6px; padding: 0 12px 0 16px; border-bottom: 1px solid rgba(255,255,255,.08); box-sizing: border-box; background: rgba(18,18,22,.98); }
#arrangePanel .arrange-head > span { margin-right: auto; font-size: 15px; font-weight: 600; color: #d9a84e; letter-spacing: 1px; }
#arrangePanel .arrange-head button { border: none; background: transparent; color: rgba(244,239,230,.75); font-size: 15px; cursor: pointer; padding: 6px; border-radius: 6px; }
#arrangePanel .arrange-head button:hover:not(:disabled) { color: #fff; background: rgba(255,255,255,.08); }
#arrangePanel .arrange-head button:focus-visible { outline: 2px solid #d9a84e; outline-offset: 1px; }
#arrangePanel .arrange-head button:disabled { opacity: .3; cursor: default; }
#arrangePanel .arrange-history { display: flex; align-items: center; gap: 3px; }
#arrangePanel .arrange-history button { min-height: 32px; padding: 5px 7px; font-size: 12px; white-space: nowrap; }
#arrangePanel .atab { display: flex; flex-direction: column; align-items: center; gap: 5px; border: none; background: transparent; color: rgba(244,239,230,.65); font-size: 11.5px; padding: 11px 0; cursor: pointer; transition: .15s; border-left: 2px solid transparent; }
#arrangePanel .atab:hover { color: #f4efe6; background: rgba(255,255,255,.05); }
#arrangePanel .atab .atab-ico { font-size: 21px; line-height: 1; }
#arrangePanel .atab.active { color: #f4d9a0; background: rgba(217,168,78,.14); border-left-color: #d9a84e; font-weight: 600; }
#arrangePanel .arrange-title { font-size: 15px; font-weight: 600; color: #d9a84e; margin-bottom: 6px; letter-spacing: 1px; }
#arrangePanel .arrange-tip { font-size: 12px; line-height: 1.7; color: rgba(244,239,230,.75); margin-bottom: 12px; }
#arrangePanel .arrange-target { font-size: 13px; padding: 8px 10px; background: rgba(255,255,255,.07); border-radius: 8px; margin-bottom: 12px; color: #f4efe6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#arrangePanel .arrange-slider-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
#arrangePanel .arrange-slider-row input[type=range] { flex: 1; accent-color: #d9a84e; }
#arrangePanel .arrange-slider-row output { min-width: 42px; text-align: right; font-variant-numeric: tabular-nums; color: #d9a84e; }
#arrangePanel .entry-view-preview { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid rgba(217,168,78,.25); border-radius: 9px; background: rgba(255,255,255,.04); margin: 2px 0 8px; }
#arrangePanel .entry-view-status { color: rgba(244,239,230,.58); font-size: 11.5px; line-height: 1.5; margin-bottom: 8px; }
#arrangePanel .prop-add.entry-view-save { color: #20180a; background: #d9a84e; border-color: #d9a84e; font-weight: 600; }
#arrangePanel .prop-add.entry-view-save:hover { color: #20180a; background: #e5ba63; }
#arrangePanel .prop-add.entry-view-save:disabled { opacity: .55; cursor: wait; }
#arrangePanel .arrange-divider { height: 1px; background: rgba(217,168,78,.25); margin: 14px 0 10px; }
#arrangePanel .arrange-subtitle { font-size: 13px; font-weight: 600; color: #d9a84e; margin-bottom: 4px; letter-spacing: .5px; }
#arrangePanel .prop-editor { margin-bottom: 14px; }
#arrangePanel .prop-editor .arrange-target { margin-bottom: 9px; }
#arrangePanel .entrance-sign-editor { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid rgba(217,168,78,.18); }
#arrangePanel .entrance-sign-styles { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; margin: 8px 0; }
#arrangePanel .entrance-sign-styles button { display: flex; align-items: center; gap: 7px; min-height: 40px; padding: 7px 9px; border: 1px solid rgba(255,255,255,.12); border-radius: 8px; background: rgba(255,255,255,.04); color: rgba(244,239,230,.78); font-size: 12px; cursor: pointer; }
#arrangePanel .entrance-sign-styles button i { flex: 0 0 auto; width: 17px; height: 17px; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; background: var(--swatch); }
#arrangePanel .entrance-sign-styles button.active { border-color: #d9a84e; background: rgba(217,168,78,.17); color: #ffe4ad; box-shadow: inset 0 0 0 1px rgba(217,168,78,.18); }
#arrangePanel .entrance-sign-styles button:focus-visible { outline: 2px solid #d9a84e; outline-offset: 2px; }
#arrangePanel .prop-scale-panel { padding: 10px; border: 1px solid rgba(217,168,78,.20); border-radius: 10px; background: rgba(255,255,255,.045); }
#arrangePanel .prop-scale-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; color: rgba(244,239,230,.82); font-size: 12px; }
#arrangePanel .prop-scale-number { display: flex; align-items: center; gap: 4px; color: #d9a84e; font-size: 12px; }
#arrangePanel .prop-scale-number input { box-sizing: border-box; width: 58px; min-height: 30px; padding: 4px; border: 1px solid rgba(255,255,255,.18); border-radius: 6px; background: rgba(0,0,0,.20); color: #f4d9a0; font: 600 13px/1.2 sans-serif; text-align: center; }
#arrangePanel .prop-scale-row { display: flex; align-items: center; gap: 7px; }
#arrangePanel .prop-scale-row button { flex: 0 0 32px; min-height: 34px; padding: 0; border: 1px solid rgba(217,168,78,.35); border-radius: 7px; background: rgba(217,168,78,.09); color: #f1d49b; font: 20px/1 sans-serif; cursor: pointer; }
#arrangePanel .prop-scale-row button:hover { background: rgba(217,168,78,.20); }
#arrangePanel .prop-scale-row input[type=range] { -webkit-appearance: none; appearance: none; flex: 1; min-width: 0; height: 34px; margin: 0; background: transparent; cursor: ew-resize; touch-action: none; }
#arrangePanel .prop-scale-row input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg,rgba(217,168,78,.55),rgba(255,255,255,.16)); }
#arrangePanel .prop-scale-row input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7px; border: 2px solid #f7e2b6; border-radius: 50%; background: #c9973d; box-shadow: 0 2px 7px rgba(0,0,0,.35); }
#arrangePanel .prop-scale-row input[type=range]::-moz-range-track { height: 6px; border-radius: 6px; background: rgba(217,168,78,.35); }
#arrangePanel .prop-scale-row input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border: 2px solid #f7e2b6; border-radius: 50%; background: #c9973d; }
#arrangePanel .prop-scale-presets { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 5px; margin-top: 7px; }
#arrangePanel .prop-scale-presets button { min-width: 0; min-height: 29px; padding: 3px 2px; border: 1px solid rgba(255,255,255,.12); border-radius: 6px; background: rgba(255,255,255,.045); color: rgba(244,239,230,.72); font-size: 10.5px; cursor: pointer; }
#arrangePanel .prop-scale-presets button:hover { border-color: rgba(217,168,78,.5); color: #f4d9a0; }
#arrangePanel .prop-scale-panel button:focus-visible, #arrangePanel .prop-scale-panel input:focus-visible { outline: 2px solid #d9a84e; outline-offset: 2px; }
#arrangePanel .prop-scale-hint { margin-top: 8px; color: rgba(244,239,230,.48); font-size: 10.5px; line-height: 1.55; }
#arrangePanel .prop-list { max-height: 190px; overflow-y: auto; margin: 6px 0 10px; font-size: 12px; }
#arrangePanel .prop-list:empty::before { content: '还没有添加道具'; display: block; padding: 12px 4px; color: rgba(244,239,230,.45); text-align: center; }
#arrangePanel .prop-item { display: flex; align-items: center; gap: 8px; padding: 5px 7px; background: rgba(255,255,255,.06); border: 1px solid transparent; border-radius: 7px; margin-bottom: 5px; cursor: pointer; transition: .15s; }
#arrangePanel .prop-item:hover { background: rgba(255,255,255,.1); }
#arrangePanel .prop-item.active { background: rgba(217,168,78,.18); border-color: rgba(217,168,78,.55); }
#arrangePanel .prop-item .prop-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#arrangePanel .prop-item .prop-del { display: grid; place-items: center; min-width: 34px; min-height: 36px; flex-shrink: 0; border: 0; border-radius: 6px; background: transparent; color: #e58b8b; cursor: pointer; padding: 0 3px; font: 18px/1 sans-serif; }
#arrangePanel .prop-item .prop-del:hover { background: rgba(229,139,139,.12); }
#arrangePanel .prop-item .prop-del:focus-visible { outline: 2px solid #f0b2a0; outline-offset: 1px; }
#arrangePanel .prop-item .prop-del:disabled { opacity: .45; cursor: wait; }
@media (pointer: coarse) { #arrangePanel .prop-item .prop-del { min-width: 44px; min-height: 44px; } }
#arrangePanel .prop-group-title { font-size: 12px; font-weight: 600; letter-spacing: .06em; color: rgba(217,168,78,.9); margin: 10px 2px 6px; }
#arrangePanel .prop-item.prop-hidden { opacity: .45; }
#arrangePanel .prop-item .prop-btns { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
#arrangePanel .prop-item .prop-eye { min-width: 40px; min-height: 32px; border: 1px solid rgba(244,239,230,.28); border-radius: 6px; background: transparent; color: rgba(244,239,230,.85); cursor: pointer; padding: 0 8px; font: 12px/1 sans-serif; }
#arrangePanel .prop-item .prop-eye:hover { background: rgba(255,255,255,.1); border-color: rgba(217,168,78,.6); }
#arrangePanel .prop-item .prop-eye:disabled { opacity: .45; cursor: wait; }
#arrangePanel .prop-thumb { display: block; object-fit: contain; background: rgba(255,255,255,.045); border-radius: 5px; }
#arrangePanel .prop-item-thumb { width: 44px; height: 38px; flex-shrink: 0; }
#arrangePanel .prop-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 8px; }
#arrangePanel .prop-add { padding: 8px 4px; border-radius: 8px; border: 1px solid rgba(217,168,78,.3); background: rgba(255,255,255,.05); color: #f4efe6; font-size: 12px; cursor: pointer; transition: .15s; }
#arrangePanel .prop-add:hover { background: rgba(217,168,78,.15); border-color: rgba(217,168,78,.5); }
#arrangePanel .prop-catalog-item { display: flex; min-width: 0; min-height: 100px; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 5px; line-height: 1.35; }
#arrangePanel .prop-catalog-thumb { width: 100%; height: 66px; }
#arrangePanel .prop-catalog-item span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#arrangePanel .prop-add.wide { width: 100%; margin-bottom: 10px; padding: 10px 4px; }
#arrangePanel .prop-catalog { display: grid; gap: 12px; min-width: 0; margin-top: 8px; }
#arrangePanel .prop-catalog-group { min-width: 0; }
#arrangePanel .prop-catalog-title { margin-bottom: 6px; }
#arrangePanel .prop-catalog .prop-actions { margin-top: 0; }
/* 布展面板选项卡 */
#arrangePanel .apane { min-height: 60px; }
#arrangeExhibitionHost { min-width: 0; }
#arrangeExhibitionHost #exhibitionForm { min-width: 0; margin: 0; padding: 0; border: 0; }
#arrangeExhibitionHost .field { min-width: 0; margin-bottom: 12px; }
#arrangeExhibitionHost .field span { color: rgba(244,239,230,.75); }
#arrangeExhibitionHost .field input, #arrangeExhibitionHost .field textarea, #arrangeExhibitionHost .field select { display: block; width: 100%; min-width: 0; max-width: 100%; padding: 9px 10px; border: 1px solid rgba(255,255,255,.16); border-radius: 8px; background: rgba(255,255,255,.08); color: #f4efe6; font-family: inherit; font-size: 13px; outline: none; }
#arrangeExhibitionHost .field input:focus, #arrangeExhibitionHost .field textarea:focus, #arrangeExhibitionHost .field select:focus { border-color: #c9a24a; }
#arrangeExhibitionHost .field textarea { min-height: 112px; line-height: 1.6; resize: vertical; }
#arrangeExhibitionHost #saveExhibition { width: 100%; min-height: 38px; padding: 9px 12px; border: 1px solid #d9a84e; border-radius: 8px; background: #d9a84e; color: #241a08; font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
#arrangeExhibitionHost #saveExhibition:disabled { opacity: .55; cursor: wait; }
#arrangeExhibitionError { margin-top: 10px; color: #d9a84e; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
#arrangeExhibitionError:empty { display: none; }
#arrangeExhibitionHost #exhibitionForm [hidden] { display: none!important; }
#arrangeExhibitionHost .ex-cover-field { min-width: 0; margin: 0 0 12px; padding: 0; border: 0; }
#arrangeExhibitionHost .ex-cover-field legend { margin-bottom: 8px; padding: 0; color: rgba(244,239,230,.75); font-size: 12px; }
#arrangeExhibitionHost .ex-cover-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; border: 1px solid rgba(255,255,255,.13); border-radius: 9px; background: rgba(255,255,255,.04); }
#arrangeExhibitionHost .ex-cover-mode label { position: relative; min-width: 0; cursor: pointer; }
#arrangeExhibitionHost .ex-cover-mode input { position: absolute; width: 1px; height: 1px; opacity: 0; }
#arrangeExhibitionHost .ex-cover-mode span { display: grid; place-items: center; min-height: 34px; border-radius: 6px; color: rgba(244,239,230,.62); font-size: 12px; transition: background .15s,color .15s; }
#arrangeExhibitionHost .ex-cover-mode input:checked+span { background: rgba(217,168,78,.20); color: #f1d49b; }
#arrangeExhibitionHost .ex-cover-mode input:focus-visible+span { outline: 2px solid #d9a84e; outline-offset: 2px; }
#arrangeExhibitionHost .ex-cover-select { margin: 10px 0; }
#arrangeExhibitionHost .ex-cover-upload { width: 100%; min-height: 38px; margin-top: 10px; border: 1px solid rgba(217,168,78,.42); border-radius: 8px; background: rgba(217,168,78,.10); color: #efd39b; font-family: inherit; font-size: 12px; font-weight: 600; line-height: 1.4; cursor: pointer; }
#arrangeExhibitionHost .ex-cover-upload:hover { background: rgba(217,168,78,.18); }
#arrangeExhibitionHost .ex-cover-upload:focus-visible { outline: 2px solid #d9a84e; outline-offset: 2px; }
#arrangeExhibitionHost .ex-cover-upload:disabled { opacity: .55; cursor: wait; }
#arrangeExhibitionHost .ex-cover-hint { margin: 9px 0 0; color: rgba(244,239,230,.54); font-size: 11px; line-height: 1.65; }
#arrangeExhibitionHost .ex-cover-hint strong { color: #e2c586; font-weight: 500; }
#arrangeExhibitionHost .ex-cover-file { margin: 7px 0 0; color: #d9bd82; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
#arrangeExhibitionHost .ex-cover-file:empty { display: none; }
#arrangeExhibitionHost .ex-cover-preview { display: grid; place-items: center; width: 100%; height: 180px; margin-top: 10px; overflow: hidden; border: 1px dashed rgba(217,168,78,.28); border-radius: 9px; background: rgba(0,0,0,.16); }
#arrangeExhibitionHost #exCoverPreview { display: block; width: 100%; height: 100%; object-fit: contain; background: rgba(0,0,0,.14); }
#arrangeExhibitionHost #exCoverPreviewEmpty { padding: 16px; color: rgba(244,239,230,.62); text-align: center; }
#arrangeExhibitionHost #exCoverPreviewEmpty span { display: block; margin-bottom: 6px; color: rgba(244,239,230,.75); font-size: 12px; }
#arrangeExhibitionHost #exCoverPreviewEmpty small { display: block; color: rgba(244,239,230,.42); font-size: 10.5px; line-height: 1.6; }
/* 文本样式 */
#arrangePanel .text-style-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
#arrangePanel .text-style-btn { padding: 10px 4px; border-radius: 9px; border: 1px solid rgba(217,168,78,.3); background: rgba(255,255,255,.05); color: #f4efe6; font-size: 13px; cursor: pointer; line-height: 1.4; }
#arrangePanel .text-style-btn small { display: block; font-size: 10.5px; color: rgba(244,239,230,.55); }
#arrangePanel .text-style-btn.active { background: rgba(217,168,78,.2); border-color: rgba(217,168,78,.6); }
#arrangePanel .text-style-btn[data-label-style="classic"] { font-family: "Songti SC", "SimSun", serif; }
#arrangePanel .text-style-btn[data-label-style="bold"] { font-family: "Microsoft YaHei UI", "Microsoft YaHei", sans-serif; font-weight: 800; }
#arrangePanel .text-style-btn[data-label-style="fang"] { font-family: "FangSong", "FangSong_GB2312", "STFangsong", serif; }
#arrangePanel .text-style-btn[data-label-style="kai"] { font-family: "Kaiti SC", "KaiTi", "STKaiti", serif; }
#arrangePanel .text-style-btn[data-label-style="mono"] { font-family: "Courier New", "NSimSun", monospace; }
#arrangePanel .text-style-btn[data-label-style="editorial"] { font-family: Georgia, "Times New Roman", "SimSun", serif; }
#arrangePanel .text-style-btn[data-label-style="rounded"] { font-family: "Arial Rounded MT Bold", "YouYuan", "PingFang SC", sans-serif; }
/* 音乐列表 */
#arrangePanel .music-list { max-height: 220px; overflow-y: auto; margin-top: 8px; }
#arrangePanel .mrow { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.06); border-radius: 8px; padding: 7px 9px; margin-bottom: 6px; font-size: 12.5px; }
#arrangePanel .mrow .m-play { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(217,168,78,.5); background: transparent; color: #d9a84e; cursor: pointer; font-size: 11px; }
#arrangePanel .mrow .m-play.playing { background: rgba(217,168,78,.25); }
#arrangePanel .mrow .m-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #f4efe6; }
#arrangePanel .mrow .m-del { color: #d97a7a; cursor: pointer; padding: 0 3px; font-size: 14px; }
#arrangePanel .mrow .m-dur { color: rgba(244,239,230,.5); font-size: 11px; font-variant-numeric: tabular-nums; }
#arrangePanel .m-empty { text-align: center; color: rgba(244,239,230,.5); font-size: 12px; padding: 16px 0; }
/* 布展模式：画布光标提示可拖拽 */
body.arranging #scene { cursor: grab; }
#btnArrange.active { background: rgba(217,168,78,.25); border-color: rgba(217,168,78,.7); color: #f4d9a0; }
@media (max-width: 720px) {
  #arrangePanel { left: 0; right: 0; top: auto; bottom: 0; height: 54vh; height: 54dvh; flex-direction: column; border-right: 0; border-top: 1px solid rgba(217,168,78,.25); box-shadow: 0 -8px 30px rgba(0,0,0,.38); }
  #arrangePanel .arrange-rail { box-sizing: border-box; width: 100%; height: 116px; flex-direction: row; justify-content: flex-start; gap: 3px; padding: 54px 8px 5px; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  #arrangePanel .atab { min-width: 56px; flex: 1 0 56px; font-size: 10px; padding: 6px 0; border-left: 0; border-bottom: 2px solid transparent; }
  #arrangePanel .atab.active { border-left-color: transparent; border-bottom-color: #d9a84e; }
  #arrangePanel .atab .atab-ico { font-size: 17px; }
  #arrangePanel .arrange-body { box-sizing: border-box; width: 100%; flex: 1; min-height: 0; padding: 12px 16px 20px; }
  #arrangePanel .arrange-head { left: 0; right: 0; height: 50px; padding: 0 10px 0 14px; }
  #arrangePanel .arrange-head > span { font-size: 14px; }
  #arrangePanel .arrange-history button { min-height: 34px; }
}

/* 弹窗 */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; background: rgba(6,6,8,.62); backdrop-filter: blur(4px); padding: 20px; }
.modal .panel { background: #f7f3ea; color: #2a2118; border-radius: 16px; padding: 28px 28px 24px; width: 100%; max-width: 420px; max-height: 88vh; overflow-y: auto; box-shadow: 0 24px 70px rgba(0,0,0,.5); }
.modal .panel.wide { max-width: 560px; }
.modal h2 { font-size: 20px; margin-bottom: 16px; letter-spacing: 1px; }
.modal .muted { color: #8a7f6a; font-size: 13px; margin: 4px 0; }
.tabs { display: flex; gap: 6px; margin-bottom: 18px; background: #ece5d5; border-radius: 10px; padding: 4px; }
.tab { flex: 1; border: none; background: transparent; padding: 8px; border-radius: 8px; cursor: pointer; font-size: 14px; color: #6a5f4a; }
.tab.active { background: #fff; color: #2a2118; font-weight: 600; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.field { display: block; margin-bottom: 13px; }
.field span { display: block; font-size: 12.5px; color: #7a6f5a; margin-bottom: 5px; }
.field input, .field textarea { width: 100%; border: 1px solid #d8cfba; border-radius: 9px; padding: 10px 12px; font-size: 14px; background: #fff; color: #2a2118; font-family: inherit; }
.field input:focus, .field textarea:focus { outline: 2px solid #d9a84e; border-color: transparent; }
/* 注册条款勾选 */
.agree { display: flex; align-items: flex-start; gap: 7px; font-size: 12.5px; color: #7a6f5a; margin-bottom: 13px; cursor: pointer; line-height: 1.5; }
.agree input { margin-top: 2px; accent-color: #d9a84e; }
.agree a { color: #a5782a; }
/* 页脚 */
#siteFooter { position: fixed; bottom: 0; left: 0; right: 0; z-index: 9; display: none; gap: 14px; justify-content: center; align-items: center; padding: 6px 12px calc(6px + env(safe-area-inset-bottom)); font-size: 11.5px; color: rgba(244,239,230,.45); pointer-events: none; flex-wrap: wrap; background: rgba(10,12,10,.85); backdrop-filter: blur(6px); }
#siteFooter.show { display: flex; }
#siteFooter a { color: rgba(217,168,78,.6); text-decoration: none; pointer-events: auto; }
#siteFooter a:hover { color: #d9a84e; }
#siteFooter .foot-note { color: rgba(244,239,230,.3); }
@media (max-width: 600px) { #siteFooter { gap: 10px; font-size: 10.5px; } #siteFooter .foot-note { display: none; } }
.row { display: flex; gap: 8px; margin-top: 16px; }
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; }
.code-row button { white-space: nowrap; padding: 0 12px; font-size: 13px; }
.code-row button:disabled { opacity: .55; cursor: default; }
.row button { flex: 1; padding: 11px 6px; border-radius: 10px; border: 1px solid #cfc5ab; background: #fff; cursor: pointer; font-size: 14px; transition: .15s; white-space: nowrap; }
.row button:hover { background: #f2ecdd; }
.row button.primary { background: #d9a84e; border-color: #d9a84e; color: #241a08; font-weight: 700; }
.row button.primary:hover { background: #e8bb62; }
.row button.danger { background: #b8382a; border-color: #b8382a; color: #fff; }
.err { color: #b8382a; font-size: 13px; margin-top: 10px; min-height: 18px; }

/* 第三人称身份选择 */
.avatar-dialog { position: fixed; inset: 0; width: min(580px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 32px); max-height: calc(100svh - 32px); margin: auto; padding: 0; border: 0; border-radius: 18px; background: transparent; color: #2a2118; overflow: auto; box-shadow: 0 24px 70px rgba(0,0,0,.46); }
.avatar-dialog:not([open]) { display: none; }
.avatar-dialog::backdrop { background: rgba(6,6,8,.66); backdrop-filter: blur(5px); }
.avatar-panel { position: relative; box-sizing: border-box; padding: 28px; border: 1px solid rgba(217,168,78,.34); border-radius: 18px; background: #f7f3ea; }
.avatar-close { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid #d8cfba; border-radius: 50%; background: transparent; color: #6a5f4a; font: 24px/1 sans-serif; cursor: pointer; }
.avatar-close:hover { background: #ece5d5; color: #2a2118; }
.avatar-close:focus-visible,.avatar-option:focus-visible { outline: 3px solid #b98d3b; outline-offset: 3px; }
.avatar-kicker { margin-bottom: 8px; color: #a5782a; font-size: 10px; font-weight: 600; letter-spacing: 2.2px; }
.avatar-panel h2 { margin: 0 44px 8px 0; font-family: "Songti SC","STSong",serif; font-size: 25px; letter-spacing: 2px; }
#avatarDialogDesc { margin: 0 0 20px; color: #7a6f5a; font-size: 13px; line-height: 1.7; }
.avatar-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.avatar-option { min-width: 0; padding: 0 0 13px; overflow: hidden; border: 1px solid #d8cfba; border-radius: 13px; background: #fffdf8; color: #2a2118; font-family: inherit; text-align: center; cursor: pointer; transition: transform .18s ease,border-color .18s ease,box-shadow .18s ease; }
.avatar-option:hover { border-color: #b98d3b; transform: translateY(-2px); box-shadow: 0 9px 24px rgba(70,52,24,.12); }
.avatar-option:active { transform: translateY(0); }
.avatar-portrait { display: block; overflow: hidden; border-bottom: 1px solid #e5dcc6; }
.avatar-portrait svg { display: block; width: 100%; height: 190px; }
.avatar-copy { display: block; padding: 14px 10px 11px; }
.avatar-copy strong { display: block; margin-bottom: 5px; font-size: 16px; letter-spacing: 1px; }
.avatar-copy small { display: block; color: #857a65; font-size: 12px; line-height: 1.5; }
.avatar-use { display: block; margin: 0 12px; padding-top: 10px; border-top: 1px solid #ece5d5; color: #8a6728; font-size: 12px; font-weight: 600; }
.avatar-note { margin: 16px 0 0; color: #8a7f6a; font-size: 11.5px; text-align: center; }
@media (max-width:640px) {
  .avatar-dialog { width: calc(100vw - 20px); max-height: calc(100svh - 20px); }
  .avatar-panel { padding: 21px 14px 17px; border-radius: 15px; }
  .avatar-panel h2 { font-size: 21px; }
  #avatarDialogDesc { margin-bottom: 15px; font-size: 12px; }
  .avatar-options { gap: 10px; }
  .avatar-portrait svg { height: 145px; }
  .avatar-copy { padding: 11px 5px 9px; }
  .avatar-copy strong { font-size: 14px; }
  .avatar-copy small { font-size: 10.5px; }
  .avatar-use { margin: 0 7px; font-size: 11px; }
  .avatar-close { top: 10px; right: 10px; }
}
@media (max-height:500px) and (orientation:landscape) {
  .avatar-dialog { width: min(640px,calc(100vw - 20px)); max-height: calc(100svh - 16px); }
  .avatar-panel { padding: 16px 20px; }
  .avatar-kicker { margin-bottom: 4px; }
  .avatar-panel h2 { margin-bottom: 4px; font-size: 20px; }
  #avatarDialogDesc { margin-bottom: 10px; }
  .avatar-portrait svg { height: 105px; }
  .avatar-copy { padding: 8px 6px 6px; }
  .avatar-use { padding-top: 6px; }
  .avatar-note { margin-top: 9px; }
}
@media (prefers-reduced-motion:reduce) { .avatar-option { transition: none; } .avatar-option:hover { transform: none; } }

/* 上传 */
.upload-quota { margin: 8px 0 12px; color: #6f6046; font-size: 12px; line-height: 1.65; white-space: pre-line; }
#uploadModal .panel { display: flex; flex-direction: column; box-sizing: border-box; padding: 0; overflow: hidden; touch-action: pan-y; overscroll-behavior: contain; }
#uploadModal .panel.wide { max-width: 720px; }
#uploadModal .upload-scroll { flex: 1; min-height: 0; padding: 28px 28px 24px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
#uploadModal .upload-submit-row { flex-shrink: 0; margin: 0; padding: 12px 28px max(12px, env(safe-area-inset-bottom)); border-top: 1px solid #e4dac4; background: #f7f3ea; }
#uploadModal .upload-submit-row .primary { flex: 2; }
#uploadModal .upload-submit-row #btnCancelUpload { flex: 1; }
#uploadModal input, #uploadModal textarea, #uploadModal select { touch-action: manipulation; }
#uploadModal input, #uploadModal textarea { scroll-margin-block: 16px; }
#dropZone { border: 2px dashed #cfc5ab; border-radius: 12px; padding: 34px 18px; text-align: center; color: #7a6f5a; cursor: pointer; font-size: 14px; transition: .2s; margin-bottom: 14px; }
#dropZone:hover, #dropZone.drag { border-color: #d9a84e; background: #faf3e2; color: #a8842e; }
#pendingList { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 12px; margin-bottom: 14px; }
#pendingList .pv { position: relative; border-radius: 8px; overflow: hidden; border: 1px solid #ddd; }
#pendingList .pv-media { container-type: size; box-sizing: border-box; display: flex; align-items: center; justify-content: center; width: 100%; height: 110px; min-width: 0; padding: 10px; overflow: hidden; background: #eae7df; }
#pendingList .pv-frame-preview { box-sizing: border-box; width: 100%; width: min(100%, calc(100cqh * var(--pv-media-ratio, 1.5))); max-height: 100%; aspect-ratio: var(--pv-media-ratio, 1.5); border: var(--pv-frame-rail, 0px) solid var(--pv-frame-color, transparent); background: #eae7df; box-shadow: inset 0 0 0 1px rgba(255,255,255,.24), 0 2px 7px rgba(39,28,14,.2); }
#pendingList .pv-frame-preview[data-frame="none"] { box-shadow: none; }
#pendingList .pv-frame-preview > img, #pendingList .pv-frame-preview > video { display: block; width: 100%; height: 100%; object-fit: contain; background: #eae7df; }
#pendingList .pv-frame-preview > video { background: #171717; }
#pendingList .pv-media > .pv-loading { box-sizing: border-box; width: 100%; height: 100%; display: grid; place-items: center; padding: 12px; color: #7a6f5a; font-size: 12px; text-align: center; }

select { font-family: inherit; color-scheme: light; }
select option { background: #fff; color: #2a2118; }
select option:disabled { color: #8b8579; }
.field select { display: block; min-width: 0; min-height: 44px; width: 100%; padding: 10px 12px; border: 1px solid #cfc5ab; border-radius: 8px; background: #fff; font-size: 14px; color: #2a2118; }

.field select:focus-visible { outline: 2px solid #b98d3b; outline-offset: 2px; }
.field-hint { display: block; margin-top: 7px; color: #857a65; font-size: 12px; line-height: 1.5; }
.upload-frame-field { margin-bottom: 18px; }

/* 作品管理 */
#manageList { display: flex; flex-direction: column; gap: 10px; max-height: 50vh; overflow-y: auto; }
#manageList .mrow { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid #e5dcc6; border-radius: 10px; padding: 8px; }
#manageList img, #manageList video { width: 74px; height: 56px; object-fit: contain; background: #f3efe7; flex-shrink: 0; border-radius: 6px; }
#manageList video { background: #171717; }
#manageList .mi { flex: 1; min-width: 0; }
#manageList .mt { font-size: 14px; font-weight: 600; }
#manageList .mm { font-size: 12px; color: #8a7f6a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#manageList button { padding: 6px 12px; border-radius: 8px; border: 1px solid #cfc5ab; background: #fff; cursor: pointer; font-size: 12px; }
#manageList button.edit { color: #2f5d3a; border-color: #b3d3ba; }
#manageList button.del { color: #b8382a; border-color: #e5b3ac; }
#manageList .empty { text-align: center; color: #8a7f6a; padding: 30px 0; font-size: 14px; }
/* 作品管理：批量工具栏 + 勾选 + 行内编辑 */
.manage-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #f0ead9; border: 1px solid #e0d6bd; border-radius: 10px; padding: 8px 10px; margin-bottom: 12px; font-size: 12.5px; }
.manage-toolbar .mt-check { display: flex; align-items: center; gap: 5px; cursor: pointer; color: #5a5040; }
.manage-toolbar .mt-check input { accent-color: #d9a84e; }
.manage-toolbar .mt-select { padding: 6px 8px; border: 1px solid #cfc5ab; border-radius: 7px; background: #fff; font-size: 12.5px; color: #2a2118; max-width: 130px; }
.manage-toolbar .mt-btn { padding: 6px 12px; border-radius: 7px; border: 1px solid #cfc5ab; background: #fff; cursor: pointer; font-size: 12.5px; }
.manage-toolbar .mt-btn:hover { background: #f2ecdd; }
.manage-toolbar .mt-btn.danger { color: #b8382a; border-color: #e5b3ac; }
.manage-toolbar .mt-btn.danger:hover { background: #fbe9e7; }
#manageList .mrow .m-check { flex-shrink: 0; accent-color: #d9a84e; width: 16px; height: 16px; }
#manageList .mrow .m-inline { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
#manageList .mrow .m-inline input { width: 100%; border: 1px solid transparent; border-radius: 6px; padding: 4px 8px; font-size: 13.5px; background: transparent; color: #2a2118; font-weight: 600; }
#manageList .mrow .m-inline input:focus { outline: none; border-color: #d9a84e; background: #fdfaf2; }
#manageList .mrow .m-inline input.m-theme { font-size: 12px; font-weight: 400; color: #8a7f6a; }
#manageList .mrow .m-inline input.m-theme:focus { color: #2a2118; }
#manageList .m-review { padding: 0 8px; font-size: 11.5px; line-height: 1.5; }
#manageList .m-review.pending { color: #9a6a16; }
#manageList .m-review.approved { color: #2e7d4f; }
#manageList .m-review.rejected { color: #b0442a; }
#manageList .m-reject-reason { padding: 0 8px; color: #9b4b3c; font-size: 11.5px; line-height: 1.5; overflow-wrap: anywhere; }
/* 批量上传逐张列表 */
#pendingList .pv { position: relative; border-radius: 8px; overflow: hidden; border: 1px solid #ddd; }
#pendingList .pv-title { width: 100%; border: none; border-top: 1px solid #eee; padding: 6px 8px; font-size: 12px; background: #faf7ef; color: #2a2118; }
#pendingList .pv-title:focus { outline: 2px solid #d9a84e; }
#pendingList .pv-del { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: none; background: rgba(0,0,0,.55); color: #fff; font-size: 13px; cursor: pointer; line-height: 1; }
#pendingList .pv-frame { position: absolute; top: 4px; left: 4px; max-width: calc(100% - 34px); padding: 2px 4px; font-size: 11px; border: none; border-radius: 5px; background: rgba(255,255,255,.85); color: #5a5040; }
#pendingList .pv-file-meta { padding: 6px 8px; background: #f7f4ec; color: #857a65; font-size: 11px; text-align: center; }
#pendingList .pv-meta { background: #fff; border-top: 1px solid #e8e1d4; }
#pendingList .pv-meta summary { padding: 8px; color: #725f3c; font-size: 12px; cursor: pointer; }
#pendingList .pv-meta-grid { display: grid; gap: 7px; padding: 0 8px 10px; }
#pendingList .pv-meta-grid label { display: grid; gap: 3px; color: #857a65; font-size: 11px; }
#pendingList .pv-meta-grid input, #pendingList .pv-meta-grid textarea { box-sizing: border-box; width: 100%; border: 1px solid #d8cfbb; border-radius: 5px; padding: 6px; background: #fff; color: #2a2118; font-family: inherit; font-size: 12px; resize: vertical; }
#pendingList .pv-meta-grid input:focus, #pendingList .pv-meta-grid textarea:focus { outline: 2px solid #d9a84e; outline-offset: 0; }
#pendingList .pv-error { padding: 8px; background: #fff1ed; color: #a83c2b; font-size: 11px; line-height: 1.5; }
#dropZone strong, #dropZone span { display: block; }
#dropZone strong { color: #594729; font-size: 16px; margin-bottom: 7px; }
#dropZone span { font-size: 12px; line-height: 1.6; }
.upload-mode-hint { margin: 0 0 8px; color: #665539; font-size: 13px; line-height: 1.6; }
.upload-common-panel { margin: 16px 0; padding: 0 14px; border: 1px solid #ded3ba; border-radius: 10px; background: #faf7ef; }
.upload-common-panel > summary { padding: 12px 0; color: #6c5227; font-size: 13px; font-weight: 600; cursor: pointer; }
.upload-common-panel > summary > span { display: block; margin-top: 4px; color: #857a65; font-size: 11px; font-weight: 400; line-height: 1.5; }
.upload-common-panel.is-single { padding: 0; border: 0; background: transparent; }
.upload-common-panel.is-single > summary { display: none; }
.upload-common-panel #uploadForm { padding: 0 0 12px; }
.upload-author-apply { width: 100%; margin: -4px 0 12px; padding: 9px; border: 1px solid #d6c59d; border-radius: 7px; color: #755c2c; background: #fff; font-size: 12px; cursor: pointer; }
.upload-submit-row .primary { flex: 1; }
#pendingList.single-work { grid-template-columns: minmax(0, 1fr); }
#pendingList.single-work .pv { display: grid; grid-template-columns: minmax(180px, .7fr) minmax(260px, 1.3fr); }
#pendingList.single-work .pv > .pv-media { grid-row: 1 / span 4; height: 100%; min-height: 260px; }
#pendingList.single-work .pv-title { grid-column: 2; grid-row: 1; }
#pendingList.single-work .pv-frame-field { grid-column: 2; grid-row: 2; }
#pendingList.single-work .pv-file-meta { grid-column: 2; grid-row: 3; }
#pendingList.single-work .pv-meta { grid-column: 2; grid-row: 4; }
#pendingList.single-work .pv-meta-grid { padding-top: 12px; }
#pendingList .pv-frame-field { display: grid; grid-template-columns: 54px 1fr; align-items: center; gap: 6px; padding: 7px 8px; background: #faf7ef; color: #75694f; font-size: 11px; }
#pendingList .pv-frame-field .pv-frame { position: static; width: 100%; max-width: none; min-height: 32px; padding: 5px; }
#pendingList .pv-meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#pendingList .pv-meta-grid label:has(textarea), #pendingList .pv-meta-grid label:has([list]) { grid-column: 1 / -1; }
#pendingList .pv-meta-grid input, #pendingList .pv-meta-grid textarea, #pendingList .pv-meta-grid select { min-height: 36px; }
#posterPreview, #posterFullPreview { object-fit: contain; }
.prop-catalog-title { margin-bottom: 6px; }
.prop-catalog-group::after { content: '墙面道具：点击添加后，按住道具拖到任意墙面，松手保存'; display: block; margin: 8px 0 14px; color: #b9aa8a; font-size: 11px; line-height: 1.6; }
.prop-catalog-group:first-child::after { color: #d9b976; }

/* 场景选择 */
#sceneList { display: grid; gap: 10px; margin-bottom: 12px; }
#sceneList .sc { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 2px solid #e5dcc6; border-radius: 12px; background: #fff; cursor: pointer; text-align: left; transition: border-color .15s; }
#sceneList .sc:hover { border-color: #c9a24a; }
#sceneList .sc.active { border-color: #c9a24a; background: #fdf8ec; }
#sceneList .sc .ico { font-size: 26px; }
#sceneList .sc .sn { font-size: 15px; font-weight: 600; color: #2a2118; }
#sceneList .sc .sd { font-size: 12px; color: #8a7f6a; margin-top: 2px; }
#sceneList .sc .sc-capacity { display: inline-block; margin-top: 7px; padding: 3px 8px; border-radius: 6px; background: #f4ecdc; color: #8a6828; font-size: 12px; font-weight: 600; line-height: 1.4; }

#shareCanvas { width: 100%; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.2); }

/* ===== 画作详情页（优化版） ===== */
.info-panel { max-width: 560px; padding: 0 0 20px; overflow: hidden; }
.info-panel .info-hero { position: relative; width: 100%; height: min(420px, 52vh); height: min(420px, 52svh); background: #f3efe7; overflow: hidden; cursor: zoom-in; }
/* Definite preview bounds also work before media dimensions are known. */
.info-panel .info-hero img, .info-panel .info-hero video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center; display: block; }
.info-panel .info-hero img { padding: 12px; }
.info-panel .info-hero video { background: #111; }
.info-panel .info-hero.has-video { cursor: default; }
.info-panel .info-hero::after { content: "⤢ 点击放大"; position: absolute; right: 10px; bottom: 8px; background: rgba(30,24,14,.55); color: #f4ecd8; font-size: 11px; padding: 3px 9px; border-radius: 20px; letter-spacing: .5px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.info-panel .info-hero:hover::after { opacity: 1; }
.info-panel .info-hero.has-video::after { display: none; }
.info-panel .info-hero.has-video .gal-tag { top: 8px; bottom: auto; }
.info-panel .info-hero.has-video .gal-dots { top: 10px; bottom: auto; }
/* 详情页多图翻页 */
.gal-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 34px; height: 34px; border-radius: 50%; border: none; background: rgba(20,16,10,.5); color: #f4ecd8; font-size: 22px; line-height: 1; cursor: pointer; transition: background .15s; }
.gal-arrow:hover { background: rgba(20,16,10,.75); }
.gal-prev { left: 10px; } .gal-next { right: 10px; }
.gal-tag { position: absolute; left: 10px; bottom: 8px; z-index: 3; background: rgba(20,16,10,.6); color: #f4ecd8; font-size: 11px; padding: 3px 10px; border-radius: 20px; letter-spacing: .5px; }
.gal-dots { position: absolute; left: 50%; transform: translateX(-50%); bottom: 10px; z-index: 3; display: flex; gap: 6px; }
.gal-dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(244,236,216,.45); cursor: pointer; transition: .15s; }
.gal-dots span.on { background: #fff; transform: scale(1.25); }
/* 上传预览：主图/细节图标注 */
.pv { position: relative; }
.pv-tag { display: block; background: #fff; color: #75694f; font-size: 12px; text-align: center; padding: 7px 8px; border-top: 1px solid #ded8ca; }
.pv-main .pv-tag { background: #f3ecdc; color: #80642c; }
.pv-tip { grid-column: 1 / -1; font-size: 12px; color: #75694f; line-height: 1.6; padding: 4px 2px; }
.info-body { padding: 0 24px; }
.info-panel .info-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 20px; padding: 0; }
.info-panel .info-head h2 { margin: 0; font-size: 24px; letter-spacing: 1px; padding: 0; font-family: "Songti SC","STSong",serif; font-weight: 700; color: #2b2114; }
.info-panel .info-chip { background: linear-gradient(180deg,#e2b45c,#d9a84e); color: #241a08; font-size: 11px; padding: 3px 12px; border-radius: 20px; font-weight: 600; letter-spacing: 1px; box-shadow: 0 1px 3px rgba(160,120,40,.3); }
.info-panel .info-artist { display: flex; align-items: center; gap: 7px; margin: 9px 0 0; color: #8a6d2f; font-size: 15px; font-weight: 600; letter-spacing: .5px; }
.info-panel .info-artist::before { content: "✒"; font-size: 13px; opacity: .8; }
.info-divider { height: 1px; margin: 14px 0 0; background: linear-gradient(90deg, #d9c9a0 0%, #ece0c4 60%, transparent 100%); }
.info-panel .info-desc { margin: 13px 0 0; color: #43392a; font-size: 14px; line-height: 1.85; text-align: justify; }
.info-panel .info-bio { margin: 16px 0 0; background: linear-gradient(180deg,#f3ecd9,#efe6d0); border-left: 3px solid #d9a84e; border-radius: 8px; padding: 11px 15px 12px; box-shadow: 0 2px 6px rgba(120,95,40,.08); }
.info-panel .info-bio-label { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #a8842e; font-weight: 700; letter-spacing: 2px; margin-bottom: 5px; }
.info-panel .info-bio-label::after { content: ""; flex: 1; height: 1px; background: #e0d2ac; }
.info-panel .info-bio p { margin: 0; font-size: 13px; color: #6a5f4a; line-height: 1.7; }
.info-panel .info-specs { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 12px 0 0; }
.info-panel .info-specs span { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #6a5a35; background: #f2ead6; border: 1px solid #e3d5b2; padding: 3px 10px; border-radius: 20px; }
.info-panel .info-price { display: flex; align-items: baseline; gap: 8px; margin: 15px 0 0; padding: 10px 16px; background: linear-gradient(90deg,#fdf6e3,#f8eec9); border-radius: 8px; }
.info-panel .info-price-label { font-size: 12px; color: #a8842e; font-weight: 600; letter-spacing: 1px; }
.info-panel .info-price #infoPrice { font-size: 20px; font-weight: 700; color: #b0442a; font-family: Georgia, serif; }
.frow { display: flex; gap: 12px; }
.frow .field { flex: 1; }
.info-actions { padding: 0 24px; margin-top: 20px; }
#infoEdit { padding: 22px; }

/* ===== 画作全屏放大 ===== */
#artZoom { position: fixed; inset: 0; z-index: 300; background: rgba(12,10,6,.93); display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: grab; }
#artZoom:active { cursor: grabbing; }
#artZoom img { max-width: 92vw; max-height: 88vh; user-select: none; -webkit-user-drag: none; box-shadow: 0 20px 60px rgba(0,0,0,.6); transition: transform .08s linear; }
#artZoomTip { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: #cfc3a6; font-size: 12px; letter-spacing: .5px; background: rgba(0,0,0,.35); padding: 5px 14px; border-radius: 20px; pointer-events: none; }
#artZoomClose { position: absolute; top: 16px; right: 18px; width: 40px; height: 40px; border-radius: 50%; border: none; background: rgba(255,255,255,.12); color: #fff; font-size: 20px; cursor: pointer; line-height: 1; }
#artZoomClose:hover { background: rgba(255,255,255,.25); }
#infoEdit h2 { margin-bottom: 14px; }

/* ===== 移动端 / 窄屏适配 ===== */
@media (max-width: 640px) {
  .tbtn { padding: 6px 9px; font-size: 11px; }
  #enterCard h1 { font-size: 26px; letter-spacing: 2px; }
  #enterCard #enterSub { font-size: 13px; margin-bottom: 18px; }
  #enterCard .card { padding: 20px 16px; max-width: 92vw; }
  #enterCard .keys { gap: 8px; margin-bottom: 22px; }
  #enterCard .keys span { padding: 6px 10px; font-size: 11px; }
  #btnEnter { padding: 12px 40px; font-size: 15px; }
  .modal { padding: 10px; }
  .modal .panel { padding: 20px 16px 16px; max-height: 92vh; border-radius: 14px; }
  .info-panel { padding: 0 0 16px; }
  .modal h2 { font-size: 18px; }
  #hint { font-size: 11px; padding: 6px 12px; bottom: 14px; max-width: 92vw; text-align: center; white-space: normal; line-height: 1.5; }
  #toast { font-size: 13px; padding: 9px 16px; max-width: 90vw; text-align: center; }
  #dropZone { padding: 24px 12px; font-size: 13px; }
  #uploadModal .panel { max-height: calc(100dvh - 20px); }
  #uploadModal .upload-scroll { padding: 20px 14px 20px; scrollbar-gutter: auto; }
  #uploadModal .upload-submit-row { gap: 8px; padding: 10px 14px max(10px, env(safe-area-inset-bottom)); }
  #pendingList { grid-template-columns: minmax(0, 1fr); }
  #pendingList:not(.single-work) .pv { display: grid; grid-template-columns: minmax(110px, .7fr) minmax(0, 1.3fr); }
  #pendingList:not(.single-work) .pv > .pv-media { grid-column: 1; grid-row: 1 / span 3; height: 100%; min-height: 180px; }
  #pendingList:not(.single-work) .pv-title, #pendingList:not(.single-work) .pv-frame-field, #pendingList:not(.single-work) .pv-file-meta { grid-column: 2; min-width: 0; }
  #pendingList:not(.single-work) .pv-meta, #pendingList:not(.single-work) .pv-error { grid-column: 1 / -1; min-width: 0; }
  #pendingList .pv-title, #pendingList .pv-meta-grid input, #pendingList .pv-meta-grid textarea, #pendingList .pv-frame-field .pv-frame { box-sizing: border-box; font-size: 16px; }
  #pendingList .pv-title { padding: 9px 10px; }
  #pendingList .pv-meta-grid { gap: 10px; padding: 4px 10px 14px; }
  #pendingList .pv-meta-grid input, #pendingList .pv-meta-grid textarea { padding: 8px; line-height: 1.45; }
  #pendingList .pv-del { width: 32px; height: 32px; }
  #pendingList.single-work .pv { display: block; }
  #pendingList.single-work .pv > .pv-media { height: 220px; min-height: 0; }
  #pendingList .pv-meta-grid { grid-template-columns: minmax(0, 1fr); }
  #pendingList .pv-meta-grid label { grid-column: 1; }
  .field select { font-size: 16px; }
}

/* 手机横屏（高度小）：压缩进入卡与提示，避免溢出 */
@media (max-height: 480px) and (orientation: landscape) {
  #enterCard .card { padding: 14px 20px; }
  #enterCard h1 { font-size: 22px; margin-bottom: 6px; }
  #enterCard #enterSub { font-size: 12px; margin-bottom: 10px; }
  #enterCard .keys { margin-bottom: 12px; gap: 8px; }
  #enterCard .keys span { padding: 5px 9px; font-size: 11px; }
  #enterCard .guide-demos { display: none; }
  #enterCard .guide { margin-bottom: 12px; }
  #btnEnter { padding: 9px 34px; font-size: 14px; }
  #enterCard .tip { margin-top: 8px; font-size: 11px; }
  #hint { bottom: 8px; font-size: 10.5px; padding: 4px 12px; }
  .modal .panel { max-height: 94vh; }
  .info-panel .info-hero { height: min(190px, 46vh); height: min(190px, 46svh); }
  .info-panel .info-head h2 { font-size: 20px; }
  .info-body, .info-actions { padding: 0 18px; }
}

/* Compact navigation is based on input capability as well as viewport width. */
@media (max-width: 640px), (hover: none) and (pointer: coarse) {
  #topbar { padding: 6px max(10px, env(safe-area-inset-right)) 6px max(10px, env(safe-area-inset-left)); }
  #topbar .brand .name { font-size: 14px; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* 手机横竖屏均折叠，避免横屏宽度触发桌面导航。 */
  #btnMenu { display: block; min-width: 44px; min-height: 40px; }
}

/* Focused artwork: readable HTML labels without another WebGL pass. */
body.art-focused #topbar,body.art-focused #hint,body.art-focused #crosshair,body.art-focused #joystick,body.art-focused #wm {display:none!important}
#artNearby {position:fixed;right:max(20px,env(safe-area-inset-right));bottom:74px;z-index:35;display:flex;align-items:center;gap:20px;max-width:min(430px,calc(100vw - 32px));padding:14px 18px;border:1px solid #d5cbb8;border-radius:12px;background:rgba(250,248,242,.96);box-shadow:0 8px 28px #0002;color:#282b28}
#artNearby strong,#artNearby span {display:block;max-width:230px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#artNearby strong {font-size:15px} #artNearby span {font-size:12px;color:#66685f;margin-top:4px}
#artNearby button,#artFocus button {min-height:44px;padding:8px 14px;border:1px solid #c6bda9;background:#f9f7f1;color:#292d29;border-radius:7px;font:inherit;cursor:pointer;white-space:nowrap}
#artNearby button {background:#343d35;color:#fff;border-color:#343d35}
#artFocus {position:fixed;inset:0;z-index:50;pointer-events:none;color:#282d29}
#focusTop {position:absolute;left:max(16px,env(safe-area-inset-left));right:max(16px,env(safe-area-inset-right));top:max(12px,env(safe-area-inset-top));display:flex;justify-content:space-between;align-items:center;gap:16px}
#focusTop>span {background:#f8f6efe8;border:1px solid #d7cebc;border-radius:8px;padding:12px 16px;font-size:15px} #focusCount {margin-left:12px;color:#64695f}
#focusTop button,#focusInfo {pointer-events:auto}
#focusInfo {position:absolute;bottom:max(16px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(640px,calc(100% - 32px));box-sizing:border-box;padding:16px 22px 12px;background:rgba(250,248,243,.97);border:1px solid #d6cbb7;border-radius:12px;box-shadow:0 6px 30px #0002;max-height:36dvh;overflow:auto}
#focusTitle {font-size:22px;line-height:1.35;letter-spacing:0;margin:0;overflow-wrap:anywhere} #focusMeta {margin:6px 0 12px;color:#676c63;font-size:14px;line-height:1.5;overflow-wrap:anywhere}
.focus-actions {display:flex;gap:8px;flex-wrap:wrap} #artFocus button:focus-visible,#artNearby button:focus-visible {outline:3px solid #a28759;outline-offset:2px} #artFocus button:disabled {opacity:.45;cursor:default}
.focus-status {font-size:11px;color:#74796f;display:flex;align-items:center;gap:10px;margin-top:8px} #artFocus #focusRetry {min-height:28px;padding:2px 8px;font-size:12px}
@media(max-width:640px){#artNearby {right:12px;bottom:calc(170px + env(safe-area-inset-bottom));gap:10px;padding:10px 12px;max-width:calc(100vw - 24px)}#artNearby strong,#artNearby span{max-width:165px}#focusInfo{padding:12px 14px 10px}#focusTitle{font-size:18px}#focusMeta{font-size:13px;margin-bottom:8px}#artFocus button{padding:7px 11px;font-size:13px}.focus-actions{gap:6px}}
@media(max-height:480px) and (orientation:landscape){#focusTop{top:max(6px,env(safe-area-inset-top))}#focusInfo{bottom:max(6px,env(safe-area-inset-bottom));width:calc(100% - 32px);padding:8px 14px;display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:14px;max-height:35dvh}#focusTitle{font-size:16px}#focusMeta{font-size:12px;margin:3px 0 0}.focus-actions{align-items:center}.focus-status{grid-column:1/-1;margin-top:2px;font-size:10px}#artNearby{bottom:12px;right:16px}#focusTop>span{padding:10px 12px}}
body.art-focused {touch-action:pan-y}
#focusInfo {touch-action:pan-y;overscroll-behavior:contain}

/* Compact guided viewing; the directory remains native and readable on phones. */
#tourFade{position:fixed;inset:0;background:#141817;z-index:12;pointer-events:none}
#guidedTour{position:fixed;z-index:25;bottom:max(12px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(620px,calc(100% - 24px));box-sizing:border-box;padding:10px 16px;border:1px solid #ffffff35;border-radius:16px;background:#242925ed;color:#f5f0e6;box-shadow:0 8px 30px #0003}
.tour-caption{display:flex;align-items:center;gap:12px;margin-bottom:8px;min-width:0;font-size:13px}
#tourCount{color:#d9bd82;white-space:nowrap}#tourTitle{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}
.tour-actions{display:flex;gap:7px}#guidedTour button{border:1px solid #ffffff30;border-radius:8px;background:#ffffff0c;color:#f5f0e6;cursor:pointer;padding:8px 12px;font:inherit;font-size:13px;min-height:36px}
#guidedTour button:hover,#guidedTour button:focus-visible{background:#ffffff26;outline:2px solid #d9bd82;outline-offset:1px}
#tourPause{color:#edce8c!important}.touring #artNearby{display:none!important}
#tourList{margin-top:10px;border-top:1px solid #ffffff30;padding-top:10px}#tourList label{display:block;font-size:12px;margin-bottom:8px}
#tourSelect{box-sizing:border-box;width:100%;min-height:42px;background:#fff;color:#292c28;border-radius:6px;padding:8px;margin-bottom:8px;font:inherit;font-size:14px}#tourSelect option{background:white;color:#292c28}
@media(max-width:600px){#guidedTour{padding:9px 10px}.tour-actions{gap:5px}.tour-actions button{flex:1;padding:7px 3px!important;font-size:12px!important}.tour-caption{margin-bottom:6px}}
@media(max-height:500px) and (orientation:landscape){#guidedTour{width:min(720px,calc(100% - 110px));display:flex;align-items:center;gap:12px;padding:7px 12px;bottom:max(7px,env(safe-area-inset-bottom))}.tour-caption{flex:1;margin:0}.tour-actions{flex-shrink:0}#tourList{position:absolute;bottom:100%;left:0;right:0;background:#242925;border-radius:12px;padding:12px;max-height:60vh;overflow:auto}}

/* Continuous first-person roam keeps only progress, pause and exit on screen. */
#autoRoam{position:fixed;z-index:25;bottom:max(14px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(500px,calc(100% - 24px));box-sizing:border-box;padding:12px 16px;border:1px solid #ffffff35;border-radius:15px;background:#242925ed;color:#f5f0e6;box-shadow:0 8px 30px #0003}
.roam-caption{display:flex;align-items:center;gap:12px;min-width:0;font-size:13px}.roam-caption span{color:#d9bd82;white-space:nowrap}.roam-caption strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}
.roam-progress{height:3px;margin:10px 0;background:#ffffff20;border-radius:4px;overflow:hidden}.roam-progress i{display:block;width:0;height:100%;background:#d9bd82;transition:width .3s}
.roam-actions{display:flex;justify-content:flex-end;gap:8px}.roam-actions button{min-height:36px;padding:7px 14px;border:1px solid #ffffff30;border-radius:8px;background:#ffffff0c;color:#f5f0e6;font:inherit;font-size:13px;cursor:pointer}.roam-actions button:hover,.roam-actions button:focus-visible{background:#ffffff26;outline:2px solid #d9bd82;outline-offset:1px}
.auto-roaming #artNearby{display:none!important}
@media(max-width:600px){#autoRoam{padding:10px 12px}.roam-actions button{flex:1}.roam-caption{font-size:12px}}
@media(max-height:500px) and (orientation:landscape){#autoRoam{bottom:max(7px,env(safe-area-inset-bottom));padding:8px 12px}.roam-progress{margin:6px 0}}

/* Visitor tools remain behind one menu entry. */
.experience-panel{max-width:620px!important}.experience-panel select,.experience-panel textarea{width:100%;box-sizing:border-box;background:#fff;color:#292e28;border:1px solid #d4cbb9;border-radius:7px;padding:10px;font:inherit}.experience-panel option{color:#292e28;background:white}.experience-note{font-size:13px;line-height:1.7;color:#756e60}.experience-links{display:flex;gap:10px;flex-wrap:wrap;margin:18px 0}.diagnostic-toggle{display:flex;gap:9px;align-items:center}.diagnostic-toggle input{width:18px;height:18px}.experience-panel button{min-height:38px}.exhibition-text{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.85}#exhibitionTitle{overflow-wrap:anywhere}#exhibitionCover{width:100%;max-height:260px;object-fit:contain;background:#e9e3d7;border-radius:8px}#exhibitionError,#scenePosterStatus{font-size:13px;line-height:1.6;color:#76623d}#exhibitionForm{margin:18px 0;padding-top:12px;border-top:1px solid #d6cdbd}#exhibitionEntry{display:flex;gap:16px;align-items:center;text-align:left;margin:16px 0}#entryCover{width:150px;height:112px;object-fit:contain;border-radius:6px;background:#ffffff10}#entryIntroduction{font-size:13px;line-height:1.7;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;margin:5px 0}#entryAuthor{font-size:13px;margin:0;color:#dfcda4}#entryReadMore{font-size:12px;background:transparent;color:#eadab8;border:0;padding:5px 0;cursor:pointer}#enterCard .card{max-height:calc(100dvh - 32px);overflow:auto}#scenePosterCanvas{display:block;width:100%;height:auto;border-radius:6px}#performanceHud{position:fixed;top:78px;left:12px;z-index:38;pointer-events:none;font:12px monospace;color:#eaeade;background:#14201cda;border-radius:6px;padding:7px 10px}#loungePrompt{position:fixed;right:max(16px,env(safe-area-inset-right));bottom:max(72px,env(safe-area-inset-bottom));z-index:30;background:#f6f1e7ed;color:#394036;border:1px solid #d4c8af;border-radius:12px;padding:12px;box-shadow:0 4px 20px #0002}#loungePrompt span{font-size:13px;margin-right:12px}#loungePrompt button{padding:9px 14px;border:0;border-radius:8px;background:#3b5147;color:white;cursor:pointer}#experienceModal [hidden],#exhibitionModal [hidden],#performanceHud[hidden],#loungePrompt[hidden],#exhibitionEntry [hidden]{display:none!important}
@media(max-height:500px) and (orientation:landscape){#exhibitionEntry{margin:8px 0}#entryCover{height:60px;width:64px}#entryIntroduction{-webkit-line-clamp:2}#performanceHud{top:64px;font-size:10px}#enterCard .card{padding:14px 24px}}
.experience-panel,#enterCard .card{touch-action:pan-y}
.experience-panel button{font:inherit;font-size:14px;padding:9px 16px;border:1px solid #d4cbb9;background:#ece6d9;color:#313c32;border-radius:8px;cursor:pointer}.experience-panel button:hover{background:#e0d8c8}.experience-panel button:focus-visible{outline:2px solid #8a713d;outline-offset:2px}.experience-panel button:disabled{opacity:.5;cursor:wait}#saveExhibition,#downloadScenePoster{background:#40584a;color:#fff;border-color:#40584a}#enterCard h1{text-wrap:balance;overflow-wrap:anywhere;font-size:clamp(26px,3vw,36px);letter-spacing:2px}#exhibitionEntry>div{min-width:0}#entryCover{flex-shrink:0}#entryAuthor{overflow-wrap:anywhere}
.experience-panel .movement-field{margin:16px 0 4px}.experience-panel .movement-field span{display:flex;align-items:center;justify-content:space-between;gap:12px}.experience-panel .movement-field output{font-size:13px;color:#40584a;font-variant-numeric:tabular-nums}.experience-panel .movement-field input[type=range]{display:block;width:100%;min-height:32px;padding:0;border:0;background:transparent;accent-color:#40584a;cursor:pointer}
#poolPrompt{position:fixed;right:max(16px,env(safe-area-inset-right));bottom:72px;z-index:31;background:#edf4efef;color:#30463e;border:1px solid #b9c9c1;border-radius:12px;padding:12px}#poolPrompt[hidden]{display:none}#poolPrompt span{font-size:13px;margin-right:12px}#poolPrompt button{border:0;border-radius:8px;background:#365c50;color:white;padding:10px 16px;cursor:pointer}.mountain-controls{border-top:1px solid #d5cbb8;margin-top:14px;padding-top:8px}.mountain-controls input[type=range]{width:100%;accent-color:#40584a}.mountain-controls output{float:right;font-size:13px;color:#76623d}
@media(max-width:600px){#poolPrompt{max-width:calc(100% - 32px);box-sizing:border-box}#poolPrompt span{display:block;margin:0 0 8px}}

/* Full-image reading: never crop hanging scrolls or lose a long roll while panning. */
#artZoom {touch-action:none;user-select:none}
#artZoom img {max-height:calc(100dvh - 152px);object-fit:contain;transition:none;touch-action:none}
#artZoomTools {position:absolute;z-index:2;left:50%;bottom:max(18px,env(safe-area-inset-bottom));transform:translateX(-50%);display:flex;align-items:center;gap:7px;white-space:nowrap;padding:8px;border:1px solid #ffffff30;border-radius:12px;background:#262821ee;color:#f4efe6;font-size:13px}
#artZoomTools button {min-height:40px;padding:8px 11px;border:1px solid #ffffff35;border-radius:7px;background:#ffffff12;color:inherit;font:inherit;cursor:pointer}
#artZoomTools button:focus-visible {outline:2px solid #d9bd82;outline-offset:2px}
#artZoomTools output {min-width:40px;text-align:center;font-variant-numeric:tabular-nums}
#artZoomTip {bottom:88px;pointer-events:none;white-space:nowrap;max-width:calc(100% - 24px);box-sizing:border-box}
#artZoomClose {z-index:3}
@media(max-width:360px){#artZoomTools{gap:4px;padding:6px;font-size:12px}#artZoomTools button{padding:7px 8px}}

/* 空间自定义：展墙/天花/地板色板 */
#arrangePanel .color-section{display:flex;flex-direction:column;gap:0;width:100%;margin-top:4px}
#arrangePanel .color-section .arrange-subtitle{margin:16px 0 8px;padding-top:12px;border-top:1px solid rgba(255,255,255,.1);font-size:13px;line-height:20px}
#arrangePanel .color-label{margin:8px 0 6px;font-size:12px;line-height:18px;color:rgba(244,239,230,.82);letter-spacing:.5px}
#arrangePanel .color-swatches{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px 8px;margin:0 0 10px}
#arrangePanel .swatch{position:relative;display:grid;grid-template-rows:34px 16px;gap:4px;min-width:0;min-height:0;border:0;border-radius:0;cursor:pointer}
#arrangePanel .swatch::before{content:"";display:block;min-width:0;border:2px solid rgba(255,255,255,.2);border-radius:7px;background:var(--swatch-color);transition:border-color .12s,box-shadow .12s}
#arrangePanel .swatch:hover::before{border-color:#f4d9a0}
#arrangePanel .swatch.active::before{border-color:#f4d9a0;box-shadow:0 0 0 2px rgba(217,168,78,.35)}
#arrangePanel .swatch .swatch-name{position:static;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;line-height:16px;color:rgba(244,239,230,.72);text-align:center;pointer-events:none}
/* 海报编辑表单 */
.poster-form{display:flex;flex-direction:column;gap:9px;margin-top:8px}
.poster-label{display:flex;flex-direction:column;gap:5px;font-size:12px;color:#d8cdb8}
.poster-label input{padding:9px 10px;border:1px solid rgba(255,255,255,.16);border-radius:8px;background:rgba(255,255,255,.08);color:#f4efe6;font-size:13px;outline:none}
.poster-label input:focus{border-color:#c9a24a}
.poster-text-style-row{display:flex;gap:12px;margin:8px 0;font-size:12px;color:#d8cdb8}
.poster-text-style-row label{display:flex;align-items:center;gap:6px;flex:1}
.poster-text-style-row input,.poster-text-style-row select{padding:6px 8px;border:1px solid rgba(255,255,255,.16);border-radius:6px;background:rgba(255,255,255,.08);color:#f4efe6;font-size:12px;outline:none;flex:1;min-width:0}
.poster-text-style-row input[type="color"]{width:40px;height:30px;padding:2px;cursor:pointer}
.poster-image-row{display:flex;gap:12px;align-items:center}
#posterPreview,#posterFullPreview{width:86px;height:118px;object-fit:cover;border-radius:8px;border:1px solid rgba(255,255,255,.18);background:rgba(255,255,255,.05)}
.poster-divider{margin-top:8px;padding-top:10px;border-top:1px dashed rgba(255,255,255,.18);font-size:12px;color:#d8cdb8}
.poster-image-row>div{display:flex;flex-direction:column;gap:8px}
.poster-image-row button,.poster-actions button{padding:8px 12px;font-size:12px}
.poster-actions{display:flex;gap:10px;margin-top:4px}
.poster-actions .primary{flex:1}
/* 展牌内容编辑器：深色面板，与海报表单风格一致 */
#signModal .panel{background:#241f19;color:#f4efe6}
#signModal .arrange-tip{color:rgba(244,239,230,.7)}
#signModal .arrange-subtitle{font-size:12px;font-weight:600;color:rgba(244,239,230,.85);margin-top:4px}
#signModal button{border:1px solid rgba(255,255,255,.2);border-radius:8px;background:rgba(255,255,255,.07);color:#f4efe6;cursor:pointer}
#signModal button:hover{background:rgba(255,255,255,.13)}
#signModal button.primary{background:#c9a24a;border-color:#c9a24a;color:#241f19;font-weight:600}
#signModal button.primary:hover{background:#d9b25c}
#signPreview,#signFullPreview{width:86px;height:118px;object-fit:cover;border-radius:8px;border:1px solid rgba(255,255,255,.18);background:rgba(255,255,255,.05)}
#arrangePanel .poster-border-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:8px 0}
#arrangePanel .poster-border-options button{min-height:40px;padding:7px 5px;border:1px solid rgba(255,255,255,.12);border-radius:8px;background:rgba(255,255,255,.04);color:rgba(244,239,230,.78);font-size:12px;cursor:pointer}
#arrangePanel .poster-border-options button.active{border-color:#d9a84e;background:rgba(217,168,78,.17);color:#ffe4ad;box-shadow:inset 0 0 0 1px rgba(217,168,78,.18)}
#arrangePanel .poster-border-options button:focus-visible{outline:2px solid #d9a84e;outline-offset:2px}
