/* 役満の展示室（gallery.html、T058）。画面いっぱいの 3D の広間に、案内・操作のボタンを重ねる */
:root {
  --gold: #e6c77a;
  --ink: #f4ead2;
  --sub: #d8ccb0;
  --panel: rgba(10, 12, 18, 0.72);
  --serif: 'Noto Serif JP', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden; background: #05070c; color: var(--ink);
  font-family: system-ui, -apple-system, 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; touch-action: none;
}
[hidden] { display: none !important; }
#hall { position: fixed; inset: 0; display: block; width: 100%; height: 100%; height: 100dvh; cursor: grab; }
#hall:active { cursor: grabbing; }

button { font: inherit; color: inherit; cursor: pointer; }
.back, .owned, .bgm {
  position: fixed; top: max(10px, env(safe-area-inset-top)); z-index: 2; margin: 0; padding: 6px 14px; border-radius: 8px;
  background: var(--panel); border: 1px solid #5d5440; font: 700 14px var(--serif); color: var(--ink);
}
.back { left: max(10px, env(safe-area-inset-left)); text-decoration: none; }
.owned { left: 50%; translate: -50% 0; color: var(--gold); white-space: nowrap; }
.owned:empty { display: none; }
.bgm { right: max(10px, env(safe-area-inset-right)); }

/* 見どころの移動（◀ 今の展示 ▶） */
.tour {
  position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); translate: -50% 0; z-index: 2;
  display: flex; align-items: center; gap: 10px;
}
.arrow {
  width: 52px; height: 52px; border-radius: 50%; font: 700 20px var(--serif); color: var(--ink);
  background: linear-gradient(#b8862e, #7a5416); border: 1px solid #f0d38a; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}
.arrow:hover { filter: brightness(1.15); }
.stop {
  min-width: 190px; margin: 0; padding: 8px 16px; border-radius: 10px; text-align: center; white-space: nowrap;
  background: var(--panel); border: 1px solid #5d5440; font: 700 17px var(--serif);
}
.hint {
  position: fixed; left: 50%; bottom: calc(max(14px, env(safe-area-inset-bottom)) + 64px); translate: -50% 0; z-index: 2;
  margin: 0; padding: 4px 12px; border-radius: 6px; background: rgba(0, 0, 0, 0.55); font-size: 13px; color: var(--sub);
  white-space: nowrap; pointer-events: none; transition: opacity 1.2s;
}
.hint.fade { opacity: 0; }

/* 入館の案内（BGM はここのボタンから鳴らす。ブラウザの自動再生の制限のため） */
.entry {
  position: fixed; inset: 0; z-index: 3; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(ellipse at center, rgba(20, 14, 6, 0.78), rgba(3, 4, 8, 0.94));
}
.entry-inner { max-width: 560px; text-align: center; }
.kicker { margin: 0; font: 700 15px var(--serif); color: var(--gold); letter-spacing: 0.3em; }
h1 {
  margin: 4px 0 14px; font: 900 44px / 1.2 var(--serif); letter-spacing: 0.08em;
  background: linear-gradient(#fff6d8, #e0b45a 55%, #9c6a1c); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { margin: 0 0 8px; color: var(--sub); line-height: 1.8; }
.tiers { margin: 0 0 18px; font: 700 14px var(--serif); color: var(--gold); }
.tiers span { white-space: nowrap; } /* 段階の途中で折り返さない */
.enter {
  padding: 12px 44px; border-radius: 10px; font: 700 22px var(--serif); color: var(--ink);
  background: linear-gradient(#b8862e, #7a5416); border: 1px solid #f0d38a; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}
.enter:disabled { opacity: 0.5; cursor: wait; }
.credit { margin: 18px 0 0; font-size: 12px; color: #8f8670; }
.credit a { color: inherit; }
/* サイトのトップへ戻るリンク（T073）。押せる範囲は高さ 44px 以上 */
.portal { margin: 4px 0 0; font: 700 14px var(--serif); }
.portal a { display: inline-block; padding: 12px 8px; line-height: 20px; color: var(--gold); }

/* 高さの低い画面（スマホ横） */
@media (max-height: 520px) {
  h1 { font-size: 32px; margin-bottom: 8px; }
  .lead { font-size: 14px; line-height: 1.6; }
  .tiers { margin-bottom: 12px; }
  .credit { margin-top: 10px; }
  .arrow { width: 44px; height: 44px; font-size: 17px; }
  .stop { min-width: 160px; padding: 6px 12px; font-size: 15px; }
  .hint { bottom: calc(max(10px, env(safe-area-inset-bottom)) + 54px); }
}
/* 幅の狭い画面（スマホ縦） */
@media (max-width: 520px) {
  .owned { top: calc(max(10px, env(safe-area-inset-top)) + 40px); }
  .stop { min-width: 0; max-width: 52vw; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
  .hint { white-space: normal; width: 90vw; text-align: center; }
}
