/* ============================================================
   DREAM DOCK — exhibition-2026
   90s CRT terminal × VHS · phosphor glow on VOID NAVY
   Palette: docs/EXHIBITION_DESIGN.md「カラー(✅ユーザー確定版)」が正
   ============================================================ */

/* 展示端末(円形LCD)と同じ日本語ドットフォント。M+由来ライセンスで埋め込み可 */
@font-face {
  font-family: "PixelMplus10";
  src: url("assets/fonts/PixelMplus10-Bold.ttf") format("truetype");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  /* --- CRT/VHS palette (確定版 2026-08-29) --- */
  --bg: #000000;        /* 真っ黒(2026-08-30 ユーザー指示) */
  --panel: #08185A;     /* DEEP BLUE 10% */
  --bg-2: #060d38;      /* panel の暗段 */
  --primary: #6500D8;   /* ULTRAVIOLET 10% */
  --magenta: #F000A8;   /* HOT MAGENTA 8% */
  --link: #173CFF;      /* ELECTRIC BLUE 6% */
  --cyan: #00E5FF;      /* CYAN 4% */
  --hover: #9A00FF;     /* NEON PURPLE 3% */
  --fg: #EAF2FF;        /* CRT WHITE */
  --lime: #B7FF00;      /* ACID LIME 1%厳守: カーソル・点滅・最重要数値のみ */
  --glitch: #FF1FDC;    /* GLITCH PINK: グリッチ演出のみ */
  --up: var(--magenta);     /* 上昇 = HOT MAGENTA */
  --down: var(--hover);     /* 下落 = NEON PURPLE */
  --g1: #a9b4e6;   /* dim text */
  --g2: #7280c2;   /* fainter */
  --g3: #454e8a;   /* faintest */
  --line: rgba(101, 0, 216, 0.38);
  --line-2: rgba(154, 0, 255, 0.55);
  --sans: "DotGothic16", "PixelMplus10", "Hiragino Kaku Gothic ProN",
          "Yu Gothic", "Noto Sans JP", monospace, sans-serif;
  --mono: "VT323", "PixelMplus10", "DotGothic16", monospace;      /* 英数=VT323 / 和文はドットへフォールバック */
  --pixel: "Press Start 2P", "PixelMplus10", "DotGothic16", monospace; /* ロゴ・大見出しのみ。小サイズ禁止 */
  --pixel-jp: "PixelMplus10", "DotGothic16", monospace;           /* 短い和文見出し・ラベル用(10px倍数で綺麗) */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 400;
  overflow: hidden;
  -webkit-font-smoothing: none;
  letter-spacing: 0.01em;
}

/* ---- CRT scanlines + micro flicker ---- */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 9990; pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px, transparent 2px,
    rgba(234, 242, 255, 0.9) 2px, rgba(234, 242, 255, 0.9) 4px
  );
  opacity: 0.035;
  animation: crtFlicker 3.6s steps(24) infinite;
}
@keyframes crtFlicker {
  0%, 100% { opacity: 0.035; }
  8%  { opacity: 0.030; }
  22% { opacity: 0.040; }
  36% { opacity: 0.032; }
  54% { opacity: 0.038; }
  71% { opacity: 0.029; }
  88% { opacity: 0.036; }
}
@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; opacity: 0.03; }
  #grain { animation: none; }
}

/* 英数データは端末等幅(VT323)。和文はドットへフォールバック */
.num, .m-val, .price-row .big, .ticker-item, #chartTip, .sell-timer,
.row .pr, .stat .v, .sell-result-price, #dreamIndex, #doomVal {
  font-family: var(--mono);
}

.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.up   { color: var(--up);   text-shadow: 0 0 6px rgba(240, 0, 168, 0.45); }
.down { color: var(--down); text-shadow: 0 0 6px rgba(154, 0, 255, 0.5); }

/* micro labels — 端末の計器ラベル(短い和文はPixelMplus10に落ちる) */
.label, .col-label, .m-label, .chart-label, .f-tk, .tc-enter, .ticker-item b, .stat .k {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.95rem;
  color: var(--g1);
  font-weight: 400;
  font-family: var(--mono);
}

/* ---- film grain + vignette ---- */
#grain {
  position: fixed; inset: 0; z-index: 9000; pointer-events: none;
  opacity: 0.045; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.7s steps(3) infinite;
}
@keyframes grain { 0%{transform:translate(0,0)} 33%{transform:translate(-2%,1%)} 66%{transform:translate(1%,-2%)} 100%{transform:translate(0,0)} }
#vignette {
  position: fixed; inset: 0; z-index: 8000; pointer-events: none;
  background: radial-gradient(130% 110% at 50% 40%, transparent 60%, rgba(2, 3, 14, 0.6) 100%);
}

/* ---- Baku ink logo: invert to white line-art, drop the paper ---- */
.logo-baku {
  mix-blend-mode: normal;
}

/* ---- title card ---- */
#titlecard {
  position: fixed; inset: 0; z-index: 9500;
  display: flex; flex-direction: column; align-items: center; justify-content: safe center;
  background: var(--bg); text-align: center; padding: 6vh 8vw;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  transition: opacity 1.6s ease;
}
#titlecard.hide { opacity: 0; pointer-events: none; }
#titlecard .logo-baku { width: clamp(86px, 16vw, 150px); height: auto; margin-bottom: 2.4rem; opacity: 0.92; animation: fadeUp 2.4s ease both; }
/* 入口の主役：〈BAKU〉コイン（背景の黒に溶け込ませ、角だけ丸くフェード） */
.tc-coin {
  /* ディザ処理された目のコイン。背景が真っ黒なのでマスク不要 */
  width: clamp(240px, min(40vw, 46vh), 480px); height: auto; margin-bottom: 1.4rem; opacity: 1;
  image-rendering: pixelated;   /* ディザのドットをそのまま出す */
  animation: fadeUp 2.6s ease both, crtTextFlicker 8.5s steps(1) 2s infinite;
}
/* 入口の売り文句：見出し + 日英の対句 */
.tc-pitch {
  margin-top: 1.7rem; max-width: 40ch; display: flex; flex-direction: column; align-items: center;
  animation: fadeUp 2.4s ease 0.6s both;
}
.tc-pitch .pitch-lead {
  font-size: clamp(1.1rem, 2.6vw, 1.5rem); font-weight: 300; letter-spacing: 0.12em;
  color: #8faaff; font-style: italic; margin-bottom: 1.2rem;   /* 英語=青っぽい */
}
.tc-pitch .pitch-jp {
  font-size: clamp(0.875rem, 1.9vw, 1rem); line-height: 1.8; letter-spacing: 0.05em; color: var(--fg);   /* 日本語=白っぽい */
  margin-top: 0.95rem;
}
.tc-pitch .pitch-en {
  font-size: 0.78rem; line-height: 1.6; letter-spacing: 0.02em; color: #8faaff; font-style: italic;   /* 英語=青っぽい */
  margin-top: 0.28rem;
}
.tc-title {
  font-family: var(--pixel); color: var(--fg);
  font-size: clamp(2.4rem, 9vw, 6rem); font-weight: 400;
  letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.2;
  padding-left: 0.08em; /* optical balance for tracking */
  /* CRT色収差: 赤/青チャンネルのずれ + 蛍光体グロー */
  text-shadow:
    0.04em 0 0 rgba(240, 0, 168, 0.55),
    -0.04em 0 0 rgba(0, 229, 255, 0.55),
    0 0 18px rgba(101, 0, 216, 0.6);
  max-width: 100%; /* flex item: 親幅で折り返す（はみ出し防止） */
  animation: fadeUp 2.4s ease 0.2s both;
}
.tc-sub {
  margin-top: 1.8rem; color: #8faaff; font-size: clamp(0.85rem, 2vw, 1.05rem);   /* 英語=青っぽい */
  letter-spacing: 0.06em; line-height: 1.9; max-width: 40ch;
  animation: fadeUp 2.4s ease 0.5s both;
}
.tc-enter {
  margin-top: 3rem; padding: 14px 30px; background: transparent; color: var(--fg);
  border: 1px solid var(--line-2); cursor: pointer; transition: all 0.5s ease;
  animation: fadeUp 2s ease 1s both;
  box-shadow: 0 0 10px rgba(154, 0, 255, 0.25), inset 0 0 8px rgba(101, 0, 216, 0.15);
}
.tc-enter:hover { background: var(--hover); color: var(--fg); border-color: var(--hover); box-shadow: 0 0 22px rgba(154, 0, 255, 0.6); }
@keyframes fadeUp { from{opacity:0; transform:translateY(16px)} to{opacity:1; transform:none} }

/* ---- ticker ---- */
#ticker { position: relative; z-index: 10; height: 40px; overflow: hidden; display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.ticker-track { display: inline-flex; white-space: nowrap; gap: 3.2rem; animation: scroll 360s linear infinite; padding-left: 100%; }
.ticker-item { font-size: 1.15rem; color: var(--g1); letter-spacing: 0.04em; }
.ticker-item b { color: var(--cyan); font-weight: 400; margin-right: 0.5em; font-size: 0.9em; }
@keyframes scroll { from{transform:translateX(0)} to{transform:translateX(-50%)} }

/* ---- layout ---- */
#app { position: relative; z-index: 10; height: calc(100% - 74px); display: grid; grid-template-rows: auto 1fr; }

header.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px 40px; border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 22px; }
.brand .logo-baku { width: 204px; height: 204px; object-fit: contain; opacity: 1; image-rendering: pixelated; }
.brand-name {
  font-family: var(--pixel); font-size: 1.9rem; font-weight: 400; letter-spacing: 0.08em;
  text-transform: uppercase; padding-left: 0.08em; line-height: 1.3;
  text-shadow: 0.06em 0 0 rgba(240, 0, 168, 0.5), -0.06em 0 0 rgba(0, 229, 255, 0.5);
}
.brand .tagline { display: none; }

/* ---- music bar ---- */
#musicBar { display: flex; align-items: center; gap: 14px; }
.music-btn {
  background: none; border: 1px solid var(--line-2); color: var(--fg);
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer; flex-shrink: 0;
  font-size: 0.65rem; display: flex; align-items: center; justify-content: center;
  transition: border-color 0.25s, color 0.25s; padding: 0; line-height: 1;
}
.music-btn:hover { border-color: var(--g1); }
.music-btn.playing { border-color: var(--fg); color: var(--fg); }
.music-tracks { display: flex; gap: 4px; }
.music-trk {
  background: none; border: none; border-bottom: 1px solid transparent;
  color: var(--g2); cursor: pointer; padding: 3px 6px;
  font-size: 0.58rem; letter-spacing: 0.18em; text-transform: uppercase;
  font-family: var(--sans); transition: color 0.25s, border-color 0.25s;
}
.music-trk:hover { color: var(--g1); }
.music-trk.active { color: var(--cyan); border-bottom-color: var(--cyan); }

.metrics { display: flex; gap: 46px; align-items: center; }
.metrics .metric:first-child { margin-left: 28px; }  /* Dream Index を少し右へ */
.metric { min-width: 120px; }
.metric .m-val { font-size: 1.55rem; font-weight: 400; margin-top: 8px; }
.metric.fg .m-val, .metric.doom .m-val { font-size: 0.95rem; letter-spacing: 0.04em; }
/* Apocalypse % は端末が漏らす最重要数値 — ACID LIME(1%枠)をここに使う */
.metric.doom .m-val { color: var(--lime); text-shadow: 0 0 8px rgba(183, 255, 0, 0.4); }
.bar { margin-top: 9px; height: 2px; background: rgba(101, 0, 216, 0.35); position: relative; width: 130px; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--magenta); box-shadow: 0 0 6px rgba(240, 0, 168, 0.7); transition: width 1s ease; }

/* ---- main three regions, separated by whitespace + hairlines ---- */
main { display: grid; grid-template-columns: 340px 1fr 250px; min-height: 0; }
section, aside { min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
section.listings { border-right: 1px solid var(--line); }
aside.feed { border-left: 1px solid var(--line); }
.col-label { padding: 22px 28px 16px; }

/* ---- listings ---- */
#marketList { overflow-y: auto; flex: 1; -webkit-overflow-scrolling: touch; padding-bottom: 30px; }
.row {
  display: grid; grid-template-columns: minmax(0, 1fr) 56px minmax(96px, auto); align-items: center; gap: 16px;
  padding: 16px 28px; cursor: pointer; border-bottom: 1px solid var(--line);
  transition: background 0.5s ease, padding-left 0.4s ease;
}
.row:hover { background: rgba(101, 0, 216, 0.10); }
.row.active { background: rgba(8, 24, 90, 0.55); padding-left: 34px; padding-right: 22px; box-shadow: inset 2px 0 0 var(--cyan); }
.row .tk { font-size: 1.9rem; font-weight: 400; letter-spacing: 0.12em; font-family: var(--mono); color: var(--fg); line-height: 1.1; text-shadow: 0 0 14px rgba(101, 0, 216, 0.5); }
.row .nm { font-size: 0.82rem; color: var(--g2); margin-top: 6px; letter-spacing: 0.02em; font-family: var(--pixel-jp);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }   /* 詳細はホバーの吹き出しで読む */
.row .spark { width: 48px; height: 24px; opacity: 0.8; }
.row .pr { font-size: 1.15rem; text-align: right; font-weight: 300; white-space: nowrap; }
.row .ch { font-size: 0.82rem; text-align: right; margin-top: 5px; white-space: nowrap; }

/* ---- feature (center) ---- */
.feature-scroll { overflow-y: auto; flex: 1; -webkit-overflow-scrolling: touch; padding: 40px clamp(28px, 5vw, 72px) 60px; display: flex; flex-direction: column; align-items: center; }
.feature-head { width: 100%; text-align: center; }
.feature-head h2 {
  font-size: clamp(2rem, 5.4vw, 3.6rem); font-weight: 400; letter-spacing: 0.04em; line-height: 1.1;
  font-family: var(--mono);
  text-shadow: 0.02em 0 0 rgba(240, 0, 168, 0.4), -0.02em 0 0 rgba(0, 229, 255, 0.4), 0 0 22px rgba(101, 0, 216, 0.5);
}
.feature-head .f-en { color: var(--g1); font-size: 1.6rem; margin-top: 10px; letter-spacing: 0.08em; font-family: var(--pixel-jp); }
.feature-head .f-tk { margin-top: 14px; }

/* the dream orb — footage inside a glowing sphere */
.orb-wrap { margin: 40px 0 8px; display: flex; flex-direction: column; align-items: center; }
.orb {
  position: relative; width: min(58vh, 540px); aspect-ratio: 1 / 1; border-radius: 50%;
  overflow: hidden; isolation: isolate;
  box-shadow: 0 0 90px -10px rgba(255,255,255,0.10), 0 30px 80px -30px rgba(0,0,0,0.9);
}
.orb .orb-media { position: absolute; inset: -8%; background-size: cover; background-position: center;
  animation: orbdrift 38s ease-in-out infinite alternate; }
.orb .orb-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s ease; }
/* toy-camera light leaks (lomo) — warm + cool, slowly drifting */
.orb .orb-leak {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none; z-index: 1;
  mix-blend-mode: screen; opacity: 0.6;
  background:
    radial-gradient(circle at 76% 18%, rgba(255,170,110,0.30), transparent 42%),
    radial-gradient(circle at 18% 84%, rgba(120,160,255,0.20), transparent 46%);
  animation: leak 26s ease-in-out infinite alternate;
}
@keyframes leak { from { transform: translate(0,0); opacity: 0.45; } to { transform: translate(2%, -2%); opacity: 0.7; } }
@keyframes orbdrift { from { transform: scale(1.06) translate(-1.5%, 1%); } to { transform: scale(1.16) translate(1.5%, -1%); } }
/* spherical shading: rim darkening + top-left highlight */
.orb::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background:
    radial-gradient(circle at 34% 28%, rgba(255,255,255,0.22), transparent 34%),
    radial-gradient(circle at 50% 50%, transparent 52%, rgba(0,0,0,0.55) 82%, rgba(0,0,0,0.9) 100%);
  mix-blend-mode: soft-light;
}
.orb::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none; z-index: 2;
  box-shadow: inset 0 0 1px rgba(255,255,255,0.4), inset 0 0 50px rgba(0,0,0,0.5);
}

/* ---- 夢に触れる → 売った人のコメントが吹き出しで出る ---- */
.orb { cursor: pointer; }
.orb-hint {
  margin-top: 18px; font-family: var(--mono); font-size: 0.95rem; letter-spacing: 0.16em;
  color: var(--g2); text-transform: uppercase; user-select: none;
  animation: hintBlink 2.8s steps(1) infinite;
}
.orb-hint.gone { display: none; }
@keyframes hintBlink { 0%, 66% { opacity: 0.9; } 67%, 100% { opacity: 0.28; } }

.orb-bubble {
  position: relative; margin: 24px auto 6px; max-width: min(88vw, 46ch); width: 100%;
  background: rgba(6, 13, 56, 0.94); border: 1px solid var(--line-2); border-radius: 0;
  padding: 28px 30px 24px; text-align: center;
  box-shadow: 0 0 34px rgba(101, 0, 216, 0.35), inset 0 0 20px rgba(101, 0, 216, 0.18);
  animation: bubbleIn 0.34s var(--ease-soft) both;
}
.orb-bubble.hidden { display: none; }
@keyframes bubbleIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.ob-quote { font-size: 0.98rem; line-height: 2.0; color: var(--fg); font-weight: 300; overflow-wrap: anywhere; }
.ob-quote .en { display: block; color: var(--g2); font-size: 0.8rem; margin-top: 10px; line-height: 1.7; }
.ob-seller { font-size: 0.875rem; color: var(--g2); margin-top: 16px; letter-spacing: 0.06em; }
.ob-famous { margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--line);
  font-style: italic; font-size: 0.875rem; color: var(--g1); line-height: 1.7; overflow-wrap: anywhere; }
.ob-famous .by { color: var(--g2); font-style: normal; letter-spacing: 0.04em; }

.price-row { margin-top: 26px; text-align: center; }
.price-row .big { font-size: clamp(2.4rem, 6vw, 3.4rem); font-weight: 200; letter-spacing: 0.02em; }
.price-row .big small { font-size: 0.32em; color: var(--g2); letter-spacing: 0.2em; margin-left: 0.5em; vertical-align: 0.5em; }
.price-row .chg { font-size: 0.95rem; margin-top: 8px; letter-spacing: 0.04em; }
.wish-row { margin-top: 18px; font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--g2); }
.wish-row b { font-weight: 400; color: var(--fg); font-size: 1.1rem; }
.wish-row .wsub { color: var(--g3); }
.wish-bar { margin: 9px auto 0; width: 180px; }

/* glassy transparent chart */
.glass {
  width: 100%; max-width: 640px; margin-top: 34px; padding: 22px 24px 18px;
  background: linear-gradient(180deg, rgba(8, 24, 90, 0.45), rgba(8, 24, 90, 0.18));
  border: 1px solid var(--line-2); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-radius: 4px;
  box-shadow: 0 0 14px rgba(101, 0, 216, 0.30), 0 20px 60px -30px rgba(0, 0, 0, 0.8), inset 0 0 26px rgba(8, 24, 90, 0.45);
  transform: perspective(1400px) rotateX(2.2deg);
}
.chart-label { margin-bottom: 8px; }
.chart-label:not(:first-child) { margin-top: 16px; }
#candleChart, #volChart { width: 100%; display: block; }

.stats { display: flex; gap: 34px; flex-wrap: wrap; justify-content: center; margin-top: 30px; }
.stat { text-align: center; }
.stat .v { font-size: 1.25rem; margin-top: 8px; font-weight: 300; }

.desc { margin-top: 30px; max-width: 56ch; text-align: center; line-height: 2; color: var(--fg); font-size: 1.25rem; font-weight: 300; }
.desc .en { display: block; color: #8faaff; font-size: 1rem; margin-top: 12px; }
.seller { margin-top: 20px; text-align: center; font-size: 1.05rem; color: var(--g1); letter-spacing: 0.04em; }
.seller span { color: var(--g1); }

.actions { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; justify-content: center; }
button.act {
  font-size: 1rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 400;
  padding: 17px 34px; background: transparent; color: var(--fg);
  border: 1px solid var(--line-2); cursor: pointer; transition: all 0.5s ease;
}
button.act.buy:hover { background: var(--hover); color: var(--fg); border-color: var(--hover); box-shadow: 0 0 16px rgba(154, 0, 255, 0.55); }
button.act.sell:hover { border-color: var(--g1); color: var(--g1); }

.recommend { margin-top: 40px; text-align: center; }
.rec-title { color: var(--g1); font-size: 1.05rem; letter-spacing: 0.04em; margin-bottom: 16px; line-height: 1.7; }
.rec-list { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.rec-chip {
  font-size: 1.05rem; letter-spacing: 0.04em; padding: 13px 22px; border: 1px solid var(--line);
  border-radius: 0; cursor: pointer; color: var(--g1); transition: all 0.4s ease;
}
.rec-chip:hover { color: var(--fg); border-color: var(--line-2); }

/* ---- trade feed ---- */
#tradeFeed { overflow: hidden; flex: 1; padding: 4px 0 30px; }
.trade { padding: 15px 28px; font-size: 1.05rem; line-height: 1.6; letter-spacing: 0.02em; border-bottom: 1px solid var(--line); animation: tradeIn 1.2s ease both; color: var(--g1); }
.trade .who { color: var(--g2); }
.trade b { font-weight: 400; color: var(--fg); }
.trade.news { color: var(--cyan); text-shadow: 0 0 8px rgba(0, 229, 255, 0.35); }
@keyframes tradeIn { from{opacity:0; transform:translateX(8px)} to{opacity:0.95; transform:none} }

/* ---- toast ---- */
#toast {
  position: fixed; bottom: 34px; left: 50%; transform: translateX(-50%) translateY(20px);
  z-index: 9600; background: rgba(5, 7, 25, 0.94); border: 1px solid var(--line-2);
  box-shadow: 0 0 18px rgba(154, 0, 255, 0.35); color: var(--fg);
  font-size: 0.875rem; letter-spacing: 0.04em; padding: 16px 28px; opacity: 0; pointer-events: none;
  transition: all 0.6s ease; max-width: 80vw; text-align: center; line-height: 1.8; backdrop-filter: blur(8px);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- status ---- */
footer.status { position: fixed; bottom: 10px; right: 16px; z-index: 20; font-size: 0.7rem; letter-spacing: 0.14em; color: var(--g3); text-transform: uppercase; font-family: var(--mono); }
#dataDot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--g3); margin-right: 7px; vertical-align: middle; }
#dataDot.live { background: var(--lime); box-shadow: 0 0 8px var(--lime); animation: dotBlink 1.6s steps(2) infinite; }
@keyframes dotBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { #dataDot.live { animation: none; } }

/* ---- 端末の声(システムメッセージ) ---- */
#sysvoice {
  position: fixed; bottom: 10px; left: 16px; z-index: 20;
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.12em;
  color: var(--g2); text-transform: uppercase; pointer-events: none; white-space: nowrap;
}
#sysvoice .sv-cursor { color: var(--lime); text-shadow: 0 0 7px rgba(183, 255, 0, 0.6); animation: svBlink 1.1s steps(2) infinite; margin-left: 2px; }
@keyframes svBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #sysvoice .sv-cursor { animation: none; } }

/* 紫のスクロールバーは非表示(スクロール自体は可能なまま) */
::-webkit-scrollbar { width: 0; height: 0; display: none; }
::-webkit-scrollbar-thumb { background: transparent; }
* { scrollbar-width: none; -ms-overflow-style: none; }

/* ---- responsive ---- */
/* スマホのタブバー（List⇄銘柄）。iPad以上では非表示 */
.mtabs { display: none; }

@media (max-width: 960px) {
  main { grid-template-columns: 1fr; grid-template-rows: auto auto auto; overflow-y: auto; }
  section.listings { border-right: none; border-bottom: 1px solid var(--line); }
  aside.feed { border-left: none; border-top: 1px solid var(--line); }
  #marketList { max-height: 32vh; }
  aside.feed { max-height: 24vh; }
  .metrics { gap: 24px; }
  header.topbar { flex-wrap: wrap; gap: 16px; }
}



/* ============================================================
   Liquid / dreamy — ふわふわ
   ============================================================ */
:root { --ease-soft: cubic-bezier(0.34, 1.4, 0.5, 1); }

/* the dream-orb: a softly morphing, floating blob of footage */
.orb {
  animation: blobMorph 11s ease-in-out infinite, orbFloat 7s ease-in-out infinite;
  will-change: border-radius, transform;
  /* dissolve the edge softly — no hard rim */
  -webkit-mask: radial-gradient(circle at 50% 50%, #000 56%, rgba(0,0,0,0.5) 80%, transparent 99%);
  mask: radial-gradient(circle at 50% 50%, #000 56%, rgba(0,0,0,0.5) 80%, transparent 99%);
}
.orb::after, .orb::before { border-radius: inherit; }
/* soften the hard inner rim shadow into a gentle glow */
.orb::before { box-shadow: inset 0 0 60px rgba(0,0,0,0.35) !important; }
@keyframes blobMorph {
  0%, 100% { border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%; }
  20%      { border-radius: 60% 40% 55% 45% / 47% 58% 42% 53%; }
  40%      { border-radius: 43% 57% 47% 53% / 60% 43% 57% 40%; }
  60%      { border-radius: 55% 45% 60% 40% / 44% 55% 45% 56%; }
  80%      { border-radius: 47% 53% 42% 58% / 55% 47% 58% 45%; }
}
@keyframes orbFloat { 0%, 100% { transform: translateY(0) rotate(0deg) scale(1); } 50% { transform: translateY(-14px) rotate(0.8deg) scale(1.015); } }

/* dreamy entrance: blur in and float up when a dream is selected */
.feature-head { animation: dreamIn 1.1s var(--ease-soft) both; }
.orb-wrap     { animation: dreamIn 1.2s var(--ease-soft) 0.06s both; }
.price-row    { animation: dreamIn 1.1s var(--ease-soft) 0.10s both; }
.glass        { animation: glassIn 1.2s ease 0.12s both; }
.desc, .seller, .stats, .actions, .recommend { animation: dreamIn 1.1s var(--ease-soft) 0.16s both; }
@keyframes dreamIn { from { opacity: 0; transform: translateY(22px) scale(0.985); filter: blur(6px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes glassIn { from { opacity: 0; filter: blur(8px); } to { opacity: 1; filter: blur(0); } }

/* springy, soft interactions */
.row { transition: background 0.6s var(--ease-soft), padding-left 0.5s var(--ease-soft); }
.rec-chip { transition: all 0.5s var(--ease-soft); }
.rec-chip:hover { transform: translateY(-2px) scale(1.04); }
button.act { transition: all 0.5s var(--ease-soft); }
button.act:hover { transform: translateY(-2px); }

/* fear & greed gauge */
#fgGauge { display: block; margin: 4px auto 2px; }
.metric.fg { text-align: center; min-width: 132px; }
.metric.fg .m-val { font-size: 0.875rem; letter-spacing: 0.04em; margin-top: 0; }

/* ---- crystal-ball orb (WebGL handles shape/shading) ---- */
.orb {
  box-shadow: none;                               /* no dark frame; the orb dissolves into the bg */
  animation: orbFloat 7s ease-in-out infinite;   /* float only; wobble is in-shader */
  -webkit-mask: none; mask: none; overflow: visible; border-radius: 0;
  background: transparent;
}
.orb::after, .orb::before { display: none; }
.orb-glass {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 3;
  mix-blend-mode: screen;
  background:
    radial-gradient(circle at 30% 21%, rgba(255,255,255,0.62), rgba(255,255,255,0.10) 13%, transparent 30%),
    radial-gradient(circle at 73% 82%, rgba(255,255,255,0.16), transparent 26%),
    radial-gradient(circle at 50% 50%, transparent 58%, rgba(255,255,255,0.06) 86%, transparent 100%);
}
.orb video.orb-img { object-fit: cover; }
#orbGL { display: block; width: 100%; height: 100%; cursor: crosshair; }
.orb { cursor: crosshair; }

/* ぬるっと窪む穴（触れた一点） */
.orb-dimple {
  position: absolute; width: 0; height: 0; border-radius: 50%; z-index: 2; pointer-events: none;
  transform: translate(-50%, -50%); opacity: 0;
  background: radial-gradient(circle, rgba(0,0,0,0.58) 0%, rgba(0,0,0,0.20) 38%, transparent 70%);
  box-shadow: inset 0 9px 24px rgba(0,0,0,0.55), inset 0 -7px 16px rgba(255,255,255,0.10);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  transition: width 0.5s var(--ease-soft), height 0.5s var(--ease-soft), opacity 0.5s ease, left 0.3s ease, top 0.3s ease;
}
.orb-dimple.on { width: 48%; height: 48%; opacity: 1; }

/* ---- chart: zoom + tooltip ---- */
.glass { position: relative; }
.chart-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.chart-top .chart-label { margin: 0; }
.zooms { display: flex; gap: 10px; }
.zoom {
  font-size: 0.95rem; letter-spacing: 0.12em; padding: 10px 20px; background: transparent;
  color: var(--g1); border: 1px solid var(--line); border-radius: 0; cursor: pointer;
  transition: all 0.4s var(--ease-soft); font-family: inherit;
}
.zoom:hover { color: var(--g1); transform: translateY(-1px); }
.zoom.on { color: var(--fg); background: var(--primary); border-color: var(--hover); box-shadow: 0 0 12px rgba(154, 0, 255, 0.45); }
#chartTip {
  position: absolute; pointer-events: none; opacity: 0; transition: opacity 0.2s ease;
  transform: translate(-50%, -118%); background: rgba(5, 7, 25, 0.92); border: 1px solid var(--line-2);
  box-shadow: 0 0 10px rgba(101, 0, 216, 0.35);
  padding: 7px 11px; font-size: 0.8rem; letter-spacing: 0.04em; white-space: nowrap;
  backdrop-filter: blur(6px); z-index: 5; color: var(--fg);
}
#chartTip b { font-weight: 400; }


/* ---- listings sort bar ---- */
.sortbar { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 28px 18px; }
.sort-btn {
  font-size: 0.95rem; letter-spacing: 0.1em; padding: 10px 22px; background: transparent;
  color: var(--g1); border: 1px solid var(--line); border-radius: 0; cursor: pointer;
  transition: all 0.4s var(--ease-soft); font-family: inherit;
}
.sort-btn:hover { color: var(--g1); }
.sort-btn.on { color: var(--fg); background: var(--primary); border-color: var(--hover); box-shadow: 0 0 12px rgba(154, 0, 255, 0.45); }

/* ---- iPad / touch: no selection, no callout, no scroll hijack ---- */
html, body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
img { -webkit-user-drag: none; user-select: none; pointer-events: none; }
/* iPad以上ではオーブ/チャートの指操作を独占（ピンチ・スクラブ用）。スマホでは縦スクロールを通す（560pxブロックで pan-y 指定） */
@media (min-width: 561px) { #orbGL, #candleChart, .orb { touch-action: none; } }

/* ============================================================
   Dreamfield — 夢の海（浮遊する球体の星座）
   ============================================================ */
.navbtn { font-family: var(--pixel); font-size: 1.12rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  line-height: 1.3; padding: 12px 22px;
  text-shadow: 0.06em 0 0 rgba(240, 0, 168, 0.5), -0.06em 0 0 rgba(0, 229, 255, 0.5), 0 0 18px rgba(101, 0, 216, 0.55);
  background: transparent; color: var(--g1); border: 2px solid var(--line-2); border-radius: 0;
  cursor: pointer; margin-left: 22px; transition: all 0.4s var(--ease-soft); white-space: nowrap; }
.navbtn { color: var(--fg); border-color: var(--hover);
  box-shadow: 0 0 18px rgba(154, 0, 255, 0.4), inset 0 0 12px rgba(101, 0, 216, 0.2);
  animation: navPulse 3.4s ease-in-out infinite; }
.navbtn:hover { background: var(--hover); color: var(--fg); border-color: var(--hover); box-shadow: 0 0 32px rgba(154, 0, 255, 0.85); animation: none; }
@keyframes navPulse {
  0%, 100% { box-shadow: 0 0 18px rgba(154, 0, 255, 0.4), inset 0 0 12px rgba(101, 0, 216, 0.2); }
  50%      { box-shadow: 0 0 30px rgba(154, 0, 255, 0.7), inset 0 0 16px rgba(101, 0, 216, 0.35); }
}
.navbtn-sell { color: var(--fg); border-color: var(--fg); }

/* ---- 夢を吸い出すページ ---- */
#selldream { position: fixed; inset: 0; z-index: 60; overflow-y: auto;
  background: var(--bg); display: flex; align-items: center; justify-content: center; }
#selldream.hidden { display: none; }
#sellClose { position: absolute; top: 20px; left: 24px; z-index: 4; font-size: 0.56rem; letter-spacing: 0.16em;
  text-transform: uppercase; padding: 9px 16px; background: transparent; color: var(--g1);
  border: 1px solid var(--line-2); border-radius: 0; cursor: pointer; font-family: inherit; }
.sell-inner { text-align: center; padding: 80px 32px 60px; max-width: 540px; width: 100%; }
/* ---- sell dream steps ---- */
.sell-step { display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 100svh; padding: 80px 32px 60px; text-align: center; max-width: 480px; margin: 0 auto; }
.sell-step.hidden { display: none; }
.sell-step-title { font-size: clamp(1.6rem, 5vw, 2.6rem); font-weight: 200; letter-spacing: 0.06em; line-height: 1.3; }
.sell-step-title .sell-step-en { display: block; font-size: 0.875rem; letter-spacing: 0.12em; color: var(--g2); margin-top: 8px; font-family: var(--pixel-jp); }
.sell-step-en { font-size: 0.875rem; letter-spacing: 0.12em; color: var(--g2); margin-top: 10px; font-family: var(--pixel-jp); }
.sell-logo { width: min(90vw, 560px); height: min(90vw, 560px); object-fit: contain; margin: 0; display: block; opacity: 0.85; }
.sell-step-desc { color: var(--g1); font-size: 0.9rem; line-height: 1.9; margin: 28px 0 40px; }
.sell-step-desc strong { color: var(--fg); font-weight: 400; }
.sell-desc-en { display: block; margin-top: 6px; color: var(--g2); font-size: 0.875rem; }

.sell-btn-main { font-size: 0.58rem; letter-spacing: 0.18em; text-transform: uppercase; padding: 12px 28px;
  background: transparent; color: var(--fg); border: 1px solid var(--line-2); border-radius: 0;
  cursor: pointer; margin-top: 36px; transition: all 0.4s var(--ease-soft); font-family: inherit; }
.sell-btn-main:hover { background: var(--hover); color: var(--fg); border-color: var(--hover); box-shadow: 0 0 16px rgba(154, 0, 255, 0.55); }
.sell-btn-sub { font-size: 0.56rem; letter-spacing: 0.14em; text-transform: uppercase; padding: 10px 22px;
  background: transparent; color: var(--g2); border: 1px solid var(--line); border-radius: 0;
  cursor: pointer; margin-top: 14px; transition: all 0.4s var(--ease-soft); font-family: inherit; }
.sell-btn-sub:hover { color: var(--g1); }
.sell-btn-hidden { opacity: 0; pointer-events: none; transition: opacity 0.6s ease; }
.sell-btn-hidden.visible { opacity: 1; pointer-events: auto; }

/* meditation */
.sell-guide-text { font-size: clamp(1rem, 3vw, 1.4rem); font-weight: 200; letter-spacing: 0.06em;
  color: var(--g1); line-height: 1.7; min-height: 3em; transition: opacity 0.8s ease; }
.sell-pulse { width: 180px; height: 180px; border-radius: 50%; margin: 40px auto;
  border: 1px solid var(--line-2);
  animation: sellPulse 4s ease-in-out infinite; }
@keyframes sellPulse {
  0%, 100% { transform: scale(1);   opacity: 0.3; box-shadow: 0 0 0 0 rgba(154, 0, 255, 0); }
  50%       { transform: scale(1.08); opacity: 0.7; box-shadow: 0 0 60px 10px rgba(154, 0, 255, 0.12); }
}
.sell-timer { font-size: 2.4rem; font-weight: 200; letter-spacing: 0.12em; color: var(--g2); margin-top: 10px; }

/* confirm / button rows */
.sell-confirm-row, .sell-med-btns, .sell-voice-btns { display: flex; flex-direction: column; align-items: center; gap: 0; margin-top: 10px; }

/* voice */
/* ---- language toggle ---- */
.sell-lang-toggle { display: flex; gap: 0; margin-top: 20px; border: 1px solid var(--line-2); border-radius: 4px; overflow: hidden; align-self: center; }
.sell-lang-btn { background: none; border: none; color: var(--g2); cursor: pointer; padding: 5px 14px;
  font-size: 0.62rem; letter-spacing: 0.18em; font-family: var(--sans); transition: background 0.2s, color 0.2s; }
.sell-lang-btn + .sell-lang-btn { border-left: 1px solid var(--line-2); }
.sell-lang-btn.active { background: var(--line-2); color: var(--fg); }

.sell-mic-btn { width: 80px; height: 80px; border-radius: 50%; border: 1px solid var(--line-2);
  background: transparent; cursor: pointer; margin: 36px auto 0; display: flex; align-items: center;
  justify-content: center; transition: border-color 0.3s; }
.sell-mic-btn.recording { border-color: var(--magenta); animation: sellPulse 1.5s ease-in-out infinite; }
.sell-mic-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--g2);
  transition: background 0.3s; }
.sell-mic-btn.recording .sell-mic-dot { background: var(--magenta); box-shadow: 0 0 10px rgba(240, 0, 168, 0.7); }
.sell-transcript { min-height: 3em; margin-top: 24px; color: var(--g1); font-size: 0.9rem;
  line-height: 1.8; max-width: 36ch; font-style: italic; }

/* guide text fade */
.sell-guide-text { transition: opacity 0.7s ease; }

/* result orb */
.sell-result-orb { width: min(240px, 60vw); height: min(240px, 60vw); border-radius: 50%;
  overflow: hidden; margin: 24px auto 20px; border: 1px solid var(--line-2);
  background: var(--bg-2); position: relative; }
.sell-result-orb video { width: 100%; height: 100%; object-fit: cover; }
.sell-orb-tappable { cursor: pointer; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.sell-orb-tappable:hover { transform: scale(1.04); box-shadow: 0 0 40px rgba(154, 0, 255, 0.3); }
.sell-orb-tappable:active { transform: scale(0.97); }
.sell-orb-hint {
  position: absolute; inset: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.64rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--fg);
  background: rgba(5, 7, 25, 0.55); backdrop-filter: blur(2px);
  opacity: 0; transition: opacity 0.35s ease; pointer-events: none;
}
.sell-orb-tappable:hover .sell-orb-hint { opacity: 1; }
.sell-result-name { font-size: clamp(1rem, 3vw, 1.4rem); font-weight: 200; letter-spacing: 0.06em; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.sell-result-name-jp { font-size: 0.875rem; letter-spacing: 0.14em; color: var(--g2); font-weight: 400; font-family: var(--pixel-jp); }
.sell-result-price { font-size: clamp(1.6rem, 5vw, 2.4rem); font-weight: 200; letter-spacing: 0.1em; margin-top: 6px; }
.sell-sold-title { font-size: clamp(2rem, 6vw, 3.6rem); font-weight: 200; letter-spacing: 0.06em; }
.sell-sold-en { font-size: 0.875rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--g2); margin-top: 10px; font-family: var(--pixel-jp); }
.sell-result-msg { margin-top: 14px; font-size: 0.875rem; letter-spacing: 0.12em; color: var(--g2); }
.sell-result-msg-en { font-size: 0.58rem; letter-spacing: 0.1em; color: var(--g3); margin-top: 6px; }

#dreamfield { position: fixed; inset: 0; z-index: 60; overflow: hidden;
  background: radial-gradient(120% 100% at 50% 38%, #0a1240, #050719 82%); }
#dreamfield.hidden { display: none; }
#fieldLines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#fieldStage { position: absolute; inset: 0; }
/* Dreamfield のタイトルは Dream Dock と同じ扱い(大きく・一文字ずつ壊れる) */
.field-title {
  position: absolute; top: 34px; left: 0; right: 0; text-align: center; z-index: 3; pointer-events: none;
  font-family: var(--pixel); color: var(--fg);
  font-size: clamp(1.8rem, 6vw, 4rem); font-weight: 400;
  letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.2;
  text-shadow: 0 0 22px rgba(101, 0, 216, 0.65), 0 0 60px rgba(240, 0, 168, 0.3);
  animation: crtTitleTremble 5.5s steps(1) infinite, titleJump 11s steps(1) 3s infinite;
}
.field-title::before, .field-title::after { content: none; }
.field-title .sp { display: inline-block; }
.field-title .ltr {
  display: inline-block; position: relative;
  animation: ltrJump var(--d) steps(1) var(--dl) infinite;
}
.field-title .ltr::before, .field-title .ltr::after {
  content: attr(data-ch);
  position: absolute; left: 0; top: 0;
  pointer-events: none; z-index: -1; mix-blend-mode: screen;
}
.field-title .ltr::before { color: #F000A8; animation: ltrR var(--d) steps(1) var(--dl) infinite; }
.field-title .ltr::after  { color: #00E5FF; animation: ltrB calc(var(--d) * 0.73) steps(1) var(--dl) infinite; }
#fieldClose { position: absolute; top: 26px; left: 28px; z-index: 4; font-size: 1rem; letter-spacing: 0.14em;
  text-transform: uppercase; padding: 13px 24px; background: transparent; color: var(--fg);
  border: 1px solid var(--line-2); border-radius: 0; cursor: pointer; font-family: inherit; }
#fieldClose:hover { background: var(--hover); color: var(--fg); border-color: var(--hover); box-shadow: 0 0 16px rgba(154, 0, 255, 0.55); }
.float-orb { position: absolute; top: 0; left: 0; border-radius: 50%; background-size: cover; background-position: center;
  cursor: pointer; will-change: transform;
  -webkit-mask: radial-gradient(circle at 50% 50%, #000 58%, transparent 92%);
  mask: radial-gradient(circle at 50% 50%, #000 58%, transparent 92%);
  box-shadow: 0 0 40px -14px rgba(255,255,255,0.2); filter: saturate(1.2) contrast(1.02);
  animation: blobMorph 13s ease-in-out infinite; }
.float-orb:hover, .float-orb.sel { filter: saturate(1.45) brightness(1.12); box-shadow: 0 0 64px -10px rgba(255,255,255,0.36); }

#fieldPanel { position: absolute; left: 50%; bottom: 7%; transform: translateX(-50%); z-index: 5; width: min(86vw, 520px);
  background: rgba(5, 7, 25, 0.85); border: 1px solid var(--line-2); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 0 18px rgba(101, 0, 216, 0.35);
  padding: 26px 30px 24px; text-align: center; animation: dreamIn 0.6s var(--ease-soft) both; }
#fieldPanel.hidden { display: none; }
#fieldPanel .fp-en { font-size: 1.5rem; font-weight: 200; letter-spacing: 0.04em; }
#fieldPanel .fp-jp { font-size: 0.875rem; color: var(--g1); margin-top: 6px; letter-spacing: 0.06em; font-family: var(--pixel-jp); }
#fieldPanel .fp-quote { font-size: 0.94rem; line-height: 2.0; color: var(--fg); margin: 18px auto 0; max-width: 40ch; font-weight: 300; }
#fieldPanel .fp-seller { font-size: 0.875rem; color: var(--g2); margin-top: 16px; letter-spacing: 0.06em; }
#fpOpen { margin-top: 20px; font-size: 0.58rem; letter-spacing: 0.18em; text-transform: uppercase; padding: 11px 22px;
  background: transparent; color: var(--fg); border: 1px solid var(--line-2); border-radius: 0; cursor: pointer; font-family: inherit; }
#fpOpen:hover { background: var(--hover); color: var(--fg); border-color: var(--hover); box-shadow: 0 0 16px rgba(154, 0, 255, 0.55); }

/* ---- Dreamfield WebGL canvas (critical: full size) + panel extras ---- */
#fieldGL { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; touch-action: none; }
#fieldPanel .fp-price { font-size: 1.15rem; margin-top: 12px; letter-spacing: 0.02em; }
#fieldPanel .fp-price small { color: var(--g2); font-size: 0.5em; letter-spacing: 0.2em; margin: 0 0.3em; }
#fieldPanel .fp-nature { font-style: italic; color: var(--g1); font-size: 0.875rem; margin-top: 14px; line-height: 1.75; }
#fieldPanel .fp-nature span { display: block; color: var(--g2); font-size: 0.92em; margin-top: 3px; }

/* ---- top poetic slogan crawl ---- */
#slogan { position: relative; z-index: 11; height: 34px; overflow: hidden; display: flex; align-items: center;
  border-bottom: 1px solid var(--line); background: rgba(8, 24, 90, 0.25); }
.slogan-track { white-space: nowrap; animation: scroll 72s linear infinite; padding-left: 100%;
  font-size: 0.875rem; font-style: normal; color: var(--g1); letter-spacing: 0.1em; font-family: var(--pixel-jp); }

/* 入り口の宝船の回文歌 */
.tc-sub .poem-jp { display: block; margin-bottom: 1.2rem; color: #EAF2FF !important; font-size: 1rem; letter-spacing: 0.12em; line-height: 2.0; font-style: normal; }

/* 夢の海パネルの英語解説 */
#fieldPanel .fp-quote .en { display: block; color: var(--g2); font-size: 0.8rem; margin-top: 10px; line-height: 1.7; }

/* Listing のメタ行（Category・Dreamers・Wish・Volume） */
.row .meta { font-size: 0.72rem; color: var(--g2); margin-top: 7px; letter-spacing: 0.03em; white-space: nowrap; }
.row .meta .num { color: var(--g2); }
.row-num { text-align: right; }

/* 夢の海パネル：名言エピグラフ（売り手コメントの下に小さく） */
#fieldPanel .fp-famous { margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--line); font-style: italic; font-size: 0.875rem; color: var(--g1); line-height: 1.7; }
#fieldPanel .fp-famous .by { color: var(--g2); font-style: normal; letter-spacing: 0.04em; }

/* ============================================================
   スマホ(〜560px): Dreamfield 夢の海パネルを画面内に収める
   ※ ベース #fieldPanel 定義より後に置き、ソース順で確実に勝たせる
   ============================================================ */
@media (max-width: 560px) {
  /* 画面下に出る、コンパクトなボトムカードにする */
  #fieldPanel {
    /* 中央寄せは margin:auto で行う。translateX は使わない
       （入場アニメ dreamIn が終了時に transform:none を当てて translateX(-50%) を打ち消し、右へズレるため） */
    left: 0; right: 0; margin-inline: auto; transform: none;
    bottom: max(14px, env(safe-area-inset-bottom));   /* 画面下に寄せる */
    width: min(90vw, 440px); max-width: 90vw; box-sizing: border-box;
    max-height: 46dvh;                                /* 小さめ。あふれる分だけ内部スクロール */
    overflow-y: auto; -webkit-overflow-scrolling: touch; overflow-x: hidden;
    padding: 14px 16px 12px;
  }
  @supports not (height: 46dvh) { #fieldPanel { max-height: 46vh; } }
  #fieldPanel .fp-quote, #fieldPanel .fp-nature, #fieldPanel .fp-famous { overflow-wrap: anywhere; }
  /* 文字も一回り小さく、間隔を詰める */
  #fieldPanel .fp-en { font-size: 1.02rem; }
  #fieldPanel .fp-jp { font-size: 0.875rem; margin-top: 3px; }
  #fieldPanel .fp-price { font-size: 0.92rem; margin-top: 6px; }
  #fieldPanel .fp-nature { font-size: 0.875rem; margin-top: 8px; line-height: 1.6; }
  #fieldPanel .fp-quote { font-size: 0.875rem; line-height: 1.7; max-width: 100%; margin-top: 9px; }
  #fieldPanel .fp-quote .en { font-size: 0.75rem; margin-top: 6px; }
  #fieldPanel .fp-seller { font-size: 0.875rem; margin-top: 8px; }
  #fieldPanel .fp-famous { margin-top: 9px; padding-top: 8px; font-size: 0.875rem; line-height: 1.55; }
  #fpOpen { margin-top: 11px; padding: 9px 18px; }
  .field-title { top: 12px; font-size: clamp(1.3rem, 8vw, 2.2rem); }
  #fieldClose { top: 58px; left: 12px; padding: 8px 14px; font-size: 0.8rem; background: var(--bg); }
}

/* ---- 銘柄ホバーの吹き出し(日英の説明) ---- */
@media (hover: none), (max-width: 560px) { #rowTip { display: none !important; } }
#rowTip {
  position: fixed; z-index: 9800; pointer-events: none;
  max-width: 420px; padding: 16px 20px;
  background: rgba(4, 6, 22, 0.96);
  border: 1px solid var(--line-2);
  box-shadow: 0 0 26px rgba(101, 0, 216, 0.45), inset 0 0 14px rgba(8, 24, 90, 0.6);
  transition: opacity 0.18s ease;
}
#rowTip.hidden { opacity: 0; visibility: hidden; }
#rowTip .rt-tk {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.18em;
  color: var(--cyan); text-transform: uppercase; margin-bottom: 10px;
}
#rowTip .rt-jp { font-size: 1.15rem; color: var(--fg); line-height: 1.4; letter-spacing: 0.04em; }
#rowTip .rt-en {
  font-family: var(--mono); font-size: 0.95rem; color: #8faaff;
  letter-spacing: 0.04em; margin-top: 2px;
}
#rowTip .rt-desc-jp {
  font-size: 0.92rem; color: var(--fg); line-height: 1.75; margin-top: 12px;
  padding-top: 12px; border-top: 1px solid var(--line);
}
#rowTip .rt-desc-en {
  font-family: var(--mono); font-size: 0.8rem; color: #8faaff;
  line-height: 1.6; margin-top: 8px; font-style: italic;
}
#rowTip .rt-seller {
  font-size: 0.72rem; color: var(--g2); margin-top: 12px;
  padding-top: 10px; border-top: 1px solid var(--line); letter-spacing: 0.04em;
}

/* ---- カテゴリのトグル絞り込み ---- */
.catbar { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 28px 14px; }
.cat-btn {
  font-size: 0.92rem; letter-spacing: 0.04em; padding: 10px 18px; background: transparent;
  color: var(--g1); border: 1px solid var(--line); border-radius: 0; cursor: pointer;
  transition: all 0.4s var(--ease-soft); font-family: inherit; display: inline-flex; gap: 8px; align-items: center;
}
.cat-btn i { font-style: normal; font-size: 0.78rem; color: var(--g3); font-family: var(--mono); }
.cat-btn:hover { color: var(--fg); border-color: var(--line-2); }
.cat-btn.on {
  color: var(--fg); border-color: var(--cyan);
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.35), inset 0 0 10px rgba(0, 229, 255, 0.12);
}
.cat-btn.on i { color: var(--cyan); }

/* ---- サイト全体のカーソルをピクセル矢印(白+オレンジ縁+グロー)に固定(2026-09-05 ユーザー指示) ---- */
html, body, * , *::before, *::after {
  cursor: url("assets/cursor.png?v=20260905b") 6 6, default !important;
}
/* テキスト入力欄だけは通常のキャレットを残す(入力位置が分からなくなるため) */
input, textarea, [contenteditable="true"] {
  cursor: text !important;
}

/* ---- 一覧の操作: カテゴリ/並びのドロップダウン(左カラム節約) ---- */
.listctl { display: flex; gap: 12px; flex-wrap: wrap; padding: 0 28px 18px; }
.lc-drop { position: relative; }
.lc-cur {
  font-family: inherit; font-size: 1rem; letter-spacing: 0.04em;
  padding: 12px 20px; background: transparent; color: var(--fg);
  border: 1px solid var(--line-2); border-radius: 0;
  display: inline-flex; gap: 10px; align-items: center; white-space: nowrap;
  transition: all 0.35s var(--ease-soft);
}
.lc-cur:hover { border-color: var(--cyan); box-shadow: 0 0 14px rgba(0, 229, 255, 0.3); }
.lc-caret { color: var(--cyan); font-size: 0.85em; }
.lc-menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 60;
  min-width: 260px; padding: 8px;
  background: rgba(4, 6, 22, 0.98); border: 1px solid var(--line-2);
  box-shadow: 0 0 28px rgba(101, 0, 216, 0.5);
  display: flex; flex-direction: column; gap: 2px;
}
.lc-menu.hidden { display: none; }
.lc-menu button {
  font-family: inherit; font-size: 0.98rem; letter-spacing: 0.03em; text-align: left;
  padding: 11px 16px; background: transparent; color: var(--g1);
  border: none; border-left: 2px solid transparent; white-space: nowrap;
  transition: all 0.25s ease;
}
.lc-menu button:hover { color: var(--fg); background: rgba(101, 0, 216, 0.22); }
.lc-menu button.on { color: var(--fg); border-left-color: var(--cyan); background: rgba(8, 24, 90, 0.6); }

/* ---- 入口: ブラウン管の震えとチラつき(CSSのみ・軽量) ---- */
.tc-title {
  animation: fadeUp 2.4s ease 0.2s both, crtTitleTremble 5.5s steps(1) 2.4s infinite;
  will-change: transform, text-shadow, opacity;
}
/* 走査線の走り: 大半は静止、周期の数コマだけ滲んで震える */
@keyframes crtTitleTremble {
  0%, 41%, 100% {
    transform: none; opacity: 1;
    text-shadow: 0.04em 0 0 rgba(240, 0, 168, 0.5), -0.04em 0 0 rgba(0, 229, 255, 0.5), 0 0 18px rgba(101, 0, 216, 0.6);
  }
  42% { transform: translate(-2px, 0.5px); opacity: 0.86;
    text-shadow: 0.16em 0 0 rgba(240, 0, 168, 0.85), -0.14em 0 0 rgba(0, 229, 255, 0.85), 0 0 26px rgba(101, 0, 216, 0.8); }
  43.5% { transform: translate(2px, -1px); opacity: 1;
    text-shadow: -0.12em 0 0 rgba(240, 0, 168, 0.8), 0.12em 0 0 rgba(0, 229, 255, 0.8), 0 0 20px rgba(101, 0, 216, 0.7); }
  45% { transform: translate(-1px, 0); opacity: 0.92;
    text-shadow: 0.06em 0 0 rgba(240, 0, 168, 0.6), -0.06em 0 0 rgba(0, 229, 255, 0.6), 0 0 18px rgba(101, 0, 216, 0.6); }
  46.5%, 77% { transform: none; opacity: 1;
    text-shadow: 0.04em 0 0 rgba(240, 0, 168, 0.5), -0.04em 0 0 rgba(0, 229, 255, 0.5), 0 0 18px rgba(101, 0, 216, 0.6); }
  78% { transform: translate(1px, 0.5px); opacity: 0.78;
    text-shadow: 0.2em 0 0 rgba(240, 0, 168, 0.9), -0.18em 0 0 rgba(0, 229, 255, 0.9), 0 0 30px rgba(101, 0, 216, 0.9); }
  79% { transform: translate(-1.5px, 0); opacity: 1;
    text-shadow: 0.04em 0 0 rgba(240, 0, 168, 0.5), -0.04em 0 0 rgba(0, 229, 255, 0.5), 0 0 18px rgba(101, 0, 216, 0.6); }
}

/* 本文: 電圧が安定しない蛍光面のゆらぎ(位相をずらして一斉に光らないように) */
.tc-pitch .pitch-jp, .tc-pitch .pitch-en, .tc-sub, .tc-sub .poem-jp {
  animation: crtTextFlicker 7s steps(1) infinite;
}
.tc-pitch .pitch-en { animation-delay: 1.3s; }
.tc-sub { animation-delay: 2.6s; }
.tc-sub .poem-jp { animation-delay: 3.9s; }
@keyframes crtTextFlicker {
  0%, 28%, 100% { opacity: 1; filter: none; }
  29%   { opacity: 0.72; filter: brightness(1.5); }
  30%   { opacity: 1;    filter: none; }
  30.6% { opacity: 0.85; }
  31.4% { opacity: 1; }
  63%   { opacity: 1; }
  63.7% { opacity: 0.66; filter: brightness(1.7); }
  64.4% { opacity: 1;    filter: none; }
}

/* 入場ボタンも同じ電源につながっている */
.tc-enter { animation: fadeUp 2s ease 1s both, crtTextFlicker 6.2s steps(1) 1s infinite; }

@media (prefers-reduced-motion: reduce) {
  .tc-title, .tc-pitch .pitch-jp, .tc-pitch .pitch-en, .tc-sub, .tc-sub .poem-jp, .tc-enter { animation: none; }
}

/* ---- 入口: タイトルのRGB分離スライス(大きく・不規則に) ---- */
.tc-title { position: relative; isolation: isolate; }
.tc-title::before, .tc-title::after {
  content: attr(data-text);
  position: absolute; left: 0; top: 0; width: 100%;
  padding-left: inherit; pointer-events: none; z-index: -1;
  mix-blend-mode: screen;
}
/* 周期の異なる2本を重ねて、繰り返しが読めない乱れにする */
.tc-title::before { color: #F000A8; animation: sliceR 7.3s steps(1) infinite; }
.tc-title::after  { color: #00E5FF; animation: sliceB 5.9s steps(1) infinite; }
@keyframes sliceR {
  0%, 33%, 100% { transform: none; clip-path: none; opacity: 0.75; }
  34%   { transform: translate(-14px, -2px); clip-path: inset(12% 0 62% 0); opacity: 1; }
  35.5% { transform: translate(18px, 1px);   clip-path: inset(58% 0 14% 0); opacity: 1; }
  37%   { transform: translate(-26px, 0);    clip-path: inset(30% 0 44% 0); opacity: 1; }
  38.5% { transform: translate(6px, -3px);   clip-path: inset(70% 0 6% 0);  opacity: 1; }
  40%   { transform: none; clip-path: none; opacity: 0.75; }
  71%   { transform: translate(30px, 2px);   clip-path: inset(4% 0 74% 0);  opacity: 1; }
  72.5% { transform: translate(-20px, 0);    clip-path: inset(46% 0 28% 0); opacity: 1; }
  74%   { transform: none; clip-path: none; opacity: 0.75; }
}
@keyframes sliceB {
  0%, 24%, 100% { transform: none; clip-path: none; opacity: 0.75; }
  25%   { transform: translate(22px, 2px);   clip-path: inset(20% 0 50% 0); opacity: 1; }
  26.5% { transform: translate(-16px, -2px); clip-path: inset(64% 0 10% 0); opacity: 1; }
  28%   { transform: translate(28px, 0);     clip-path: inset(8% 0 68% 0);  opacity: 1; }
  29.5% { transform: none; clip-path: none;  opacity: 0.75; }
  61%   { transform: translate(-32px, 1px);  clip-path: inset(38% 0 36% 0); opacity: 1; }
  62.5% { transform: translate(12px, -1px);  clip-path: inset(76% 0 4% 0);  opacity: 1; }
  64%   { transform: none; clip-path: none;  opacity: 0.75; }
}
/* タイトル本体も大きく飛ぶ */
.tc-title {
  animation: fadeUp 2.4s ease 0.2s both, crtTitleTremble 5.5s steps(1) 2.4s infinite,
             titleJump 11s steps(1) 3s infinite;
}
@keyframes titleJump {
  0%, 46%, 100% { margin-left: 0; }
  47%   { margin-left: -22px; }
  48%   { margin-left: 16px; }
  49%   { margin-left: -8px; }
  50%   { margin-left: 0; }
  88%   { margin-left: 26px; }
  89%   { margin-left: -14px; }
  90%   { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .tc-streak, .tc-shatter { display: none; }
  .tc-title::before, .tc-title::after { animation: none; }
}

/* ---- タイトル: 一文字ずつ独立して震える・ズレる ---- */
.tc-title::before, .tc-title::after { content: none; }   /* 全体スライスは文字単位に置き換え */
.tc-title .sp { display: inline-block; }
.tc-title .ltr {
  display: inline-block; position: relative;
  animation: ltrJump var(--d) steps(1) var(--dl) infinite;
}
.tc-title .ltr::before, .tc-title .ltr::after {
  content: attr(data-ch);
  position: absolute; left: 0; top: 0;
  pointer-events: none; z-index: -1; mix-blend-mode: screen;
}
.tc-title .ltr::before { color: #F000A8; animation: ltrR var(--d) steps(1) var(--dl) infinite; }
.tc-title .ltr::after  { color: #00E5FF; animation: ltrB calc(var(--d) * 0.73) steps(1) var(--dl) infinite; }

/* 文字本体: 大半は静止、たまに上下左右へ飛ぶ(振れ幅は --amp で文字ごとに違う) */
@keyframes ltrJump {
  0%, 57%, 100% { transform: none; opacity: 1; }
  58%   { transform: translate(calc(-7px * var(--amp)), calc(2px * var(--amp))); opacity: 0.8; }
  59.5% { transform: translate(calc(5px * var(--amp)), calc(-3px * var(--amp))); opacity: 1; }
  61%   { transform: translate(calc(-2px * var(--amp)), 0) scaleY(1.12); }
  62.5% { transform: none; }
  89%   { transform: translate(calc(9px * var(--amp)), 0) scaleX(0.88); opacity: 0.7; }
  90.5% { transform: none; opacity: 1; }
}
/* 赤チャンネル: 文字を横帯で切って飛ばす */
@keyframes ltrR {
  0%, 30%, 100% { transform: translate(-2px, 0); clip-path: none; opacity: 0.7; }
  31%   { transform: translate(calc(-16px * var(--amp)), -1px); clip-path: inset(10% 0 55% 0); opacity: 1; }
  32.5% { transform: translate(calc(11px * var(--amp)), 1px);   clip-path: inset(60% 0 8% 0);  opacity: 1; }
  34%   { transform: translate(-2px, 0); clip-path: none; opacity: 0.7; }
  73%   { transform: translate(calc(-20px * var(--amp)), 0); clip-path: inset(38% 0 32% 0); opacity: 1; }
  74.5% { transform: translate(-2px, 0); clip-path: none; opacity: 0.7; }
}
/* 青チャンネル: 別周期・逆方向 */
@keyframes ltrB {
  0%, 44%, 100% { transform: translate(2px, 0); clip-path: none; opacity: 0.7; }
  45%   { transform: translate(calc(18px * var(--amp)), 1px);  clip-path: inset(24% 0 46% 0); opacity: 1; }
  46.5% { transform: translate(calc(-13px * var(--amp)), -1px); clip-path: inset(66% 0 6% 0); opacity: 1; }
  48%   { transform: translate(2px, 0); clip-path: none; opacity: 0.7; }
  81%   { transform: translate(calc(22px * var(--amp)), 0); clip-path: inset(6% 0 70% 0); opacity: 1; }
  82.5% { transform: translate(2px, 0); clip-path: none; opacity: 0.7; }
}
@media (prefers-reduced-motion: reduce) {
  .tc-title .ltr, .tc-title .ltr::before, .tc-title .ltr::after { animation: none; }
}

/* ---- 入口: データが砕ける壊れ方(Design_reference/_ (3).jpeg) ----
   細い線ではなく「塊」で割れる。彩度は落とさず、マゼンタ/シアン/紫/青が層になる。 */
.tc-streak, .tc-shatter {
  display: none;   /* ズレて走る色バーは全廃(2026-09-01 ユーザー指示) */
  position: absolute; left: -6%; width: 112%;
  pointer-events: none; z-index: 2; mix-blend-mode: screen; opacity: 0;
  will-change: transform, opacity, top;
}
/* 短冊が不揃いに並ぶ帯(ピクセルソート風) */
.tc-streak {
  background: repeating-linear-gradient(90deg,
    #F000A8 0 22px, transparent 22px 34px,
    #00E5FF 34px 78px, transparent 78px 96px,
    #6500D8 96px 132px, transparent 132px 141px,
    #EAF2FF 141px 158px, transparent 158px 210px,
    #173CFF 210px 268px, transparent 268px 284px,
    #9A00FF 284px 306px, transparent 306px 372px);
}
/* もっと粗く、大きな色ブロックで割れる層 */
.tc-shatter {
  background: repeating-linear-gradient(90deg,
    #F000A8 0 90px, #00E5FF 90px 168px, transparent 168px 214px,
    #6500D8 214px 340px, transparent 340px 372px,
    #173CFF 372px 500px, #FF1FDC 500px 548px, transparent 548px 660px);
}
.tc-streak.s1 { height: 6px;  animation: burstA 6.7s steps(1) infinite; }
.tc-streak.s2 { height: 17px; animation: burstB 9.1s steps(1) 0.4s infinite; }
.tc-streak.s3 { height: 3px;  animation: burstC 4.3s steps(1) 1.1s infinite; }
.tc-streak.s4 { height: 28px; animation: burstB 7.7s steps(1) 2.2s infinite; }
.tc-streak.s5 { height: 9px;  animation: burstA 5.3s steps(1) 3.4s infinite; }
.tc-shatter.h1 { height: 46px; animation: burstD 8.3s steps(1) 0.7s infinite; }
.tc-shatter.h2 { height: 22px; animation: burstD 6.1s steps(1) 3.1s infinite; }
.tc-shatter.h3 { height: 72px; animation: burstE 11.3s steps(1) 5.2s infinite; }

/* どれも「一瞬だけ、まとまって」出る。出ている間は位置と横ズレが毎コマ変わる */
@keyframes burstA {
  0%, 22%, 100% { opacity: 0; }
  23%   { opacity: 0.95; top: 20%; transform: translateX(-70px) scaleY(1); }
  24%   { opacity: 0.95; top: 21%; transform: translateX(90px)  scaleY(2.2); }
  25%   { opacity: 0.95; top: 19%; transform: translateX(-30px) scaleY(1); }
  26%   { opacity: 0; }
  68%   { opacity: 0.9;  top: 72%; transform: translateX(50px)  scaleY(1.6); }
  69%   { opacity: 0.9;  top: 73%; transform: translateX(-80px) scaleY(1); }
  70%   { opacity: 0; }
}
@keyframes burstB {
  0%, 44%, 100% { opacity: 0; }
  45%   { opacity: 0.8; top: 44%; transform: translateX(120px) scaleY(1); }
  46%   { opacity: 0.8; top: 46%; transform: translateX(-95px) scaleY(1.8); }
  47%   { opacity: 0.8; top: 43%; transform: translateX(40px)  scaleY(1); }
  48%   { opacity: 0; }
  84%   { opacity: 0.75; top: 30%; transform: translateX(-60px) scaleY(2.4); }
  85%   { opacity: 0.75; top: 31%; transform: translateX(70px)  scaleY(1); }
  86%   { opacity: 0; }
}
@keyframes burstC {
  0%, 30%, 100% { opacity: 0; }
  31% { opacity: 1; top: 86%; transform: translateX(-110px); }
  32% { opacity: 1; top: 85%; transform: translateX(60px); }
  33% { opacity: 0; }
  75% { opacity: 1; top: 10%; transform: translateX(80px); }
  76% { opacity: 0; }
}
/* 大ブロック層: 画面の1/3が持っていかれる */
@keyframes burstD {
  0%, 36%, 100% { opacity: 0; }
  37%   { opacity: 0.7; top: 38%; transform: translateX(-140px) scaleY(1); }
  38%   { opacity: 0.7; top: 40%; transform: translateX(110px)  scaleY(1.5); }
  39%   { opacity: 0.7; top: 37%; transform: translateX(-45px)  scaleY(1); }
  40%   { opacity: 0; }
  79%   { opacity: 0.62; top: 58%; transform: translateX(160px) scaleY(1.2); }
  80%   { opacity: 0; }
}
@keyframes burstE {
  0%, 52%, 100% { opacity: 0; }
  53%   { opacity: 0.5; top: 26%; transform: translateX(-180px) scaleY(1); }
  54%   { opacity: 0.5; top: 29%; transform: translateX(130px)  scaleY(1.3); }
  55%   { opacity: 0.5; top: 25%; transform: translateX(-70px)  scaleY(1); }
  56%   { opacity: 0; }
}

/* 入口下の小さなクレジットリンク */
.tc-baku { display: block; margin: 22px auto 0; width: fit-content; font-family: var(--mono); font-size: 0.78rem;
  letter-spacing: 0.14em; color: var(--g1); text-decoration: none;
  border: 1px solid var(--line-2); padding: 9px 18px; animation: fadeUp 2.4s ease 1.1s both; }
.tc-baku:hover { background: var(--hover); color: var(--fg); border-color: var(--hover); }
.tc-credits { display: inline-block; margin-top: 14px; font-family: var(--mono); font-size: 0.72rem;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--g2); text-decoration: none;
  border-bottom: 1px dotted var(--g3); padding-bottom: 2px; animation: fadeUp 2.4s ease 1.2s both; }
.tc-credits:hover { color: var(--fg); border-bottom-color: var(--fg); }



/* ==== 和文の文節折返し(単語の途中で切らない) — サイト全体に継承 ==== */
body { word-break: auto-phrase; }   /* Chrome/Edge: 内蔵BudouXで文節単位に折る */
@supports not (word-break: auto-phrase) {
  /* Safari等: 通常の和文折返し+禁則(行頭の句読点禁止)。BudouXが効いた要素は文節折返しに強化される */
  body { line-break: strict; }
}

/* 銘柄詳細の戻るボタン: モバイル専用 */
@media (min-width: 561px) { #featBack { display: none; } }

.zoom { white-space: nowrap; }  /* 全環境: ズームボタンの縦潰れ禁止 */

/* ===== モバイル用オーバーライド(必ず基本定義より後に置く/上書き優先) ===== */
/* ---- スマートフォン（〜560px）。iPadは縦768px〜なので影響しない ---- */
@media (max-width: 560px) {
  /* タイトル画面: 縦に長いので上寄せ＋スクロール可。コインと説明も一回り小さく */
  #titlecard { justify-content: flex-start; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 8vh 7vw 7vh; }
  .tc-coin { width: clamp(124px, 40vw, 184px); margin-bottom: 1.1rem; }
  .tc-title { font-size: clamp(1.3rem, 7.2vw, 4rem); letter-spacing: 0.04em; padding-left: 0.04em; white-space: nowrap; }
  /* モバイルではピクセルソート帯を縮小(でかい色ブロックに見えるのを防ぐ) */
  .tc-streak { background-size: 186px 100%; }
  .tc-shatter { display: none; }   /* 大きい色ブロックは本文に被ると汚いので細い帯だけ残す */
  .tc-pitch { margin-top: 1.3rem; }
  .tc-pitch .pitch-lead { margin-bottom: 1rem; }
  .tc-pitch .pitch-jp { font-size: 0.88rem; margin-top: 0.85rem; }
  .tc-pitch .pitch-en { font-size: 0.76rem; }
  .tc-sub { margin-top: 1.2rem; padding: 0 6px; }
  .tc-enter { margin-top: 2rem; padding: 13px 26px; }

  /* topbar: ブランドとメトリクスを上下2段に、余白を詰める */
  header.topbar { padding: 13px 14px; gap: 12px; position: relative; }
  .brand { gap: 10px; flex-wrap: nowrap; width: 100%; }
  .brand .logo-baku { width: 56px; height: 56px; }
  .brand-name { font-size: 1.05rem; letter-spacing: 0.05em; padding-left: 0; }
  /* DREAM FIELD: タイトル行の右端・垂直中央揃え */
  .brand { align-items: center; }
  header.topbar .navbtn, .brand .navbtn {
    position: static; margin: 0 0 0 auto; padding: 5px 8px; align-self: center;
    font-size: 0.55rem !important; letter-spacing: 0.05em; border-width: 1px;
    white-space: nowrap; animation: none; box-shadow: none; }
  /* メトリクス3点は一段の細い帯に圧縮(銘柄一覧を主役にする) */
  .metrics { width: 100%; gap: 6px 10px; justify-content: space-between; flex-wrap: nowrap; align-items: flex-start; }
  .metrics .metric:first-child { margin-left: 0; }  /* スマホでは寄せない */
  .metric { min-width: 0; flex: 1 1 33%; }
  .metric .m-label { font-size: 0.5rem; letter-spacing: 0.12em; }
  .metric .m-val { font-size: 0.82rem; margin-top: 3px; }
  #fgGauge { width: 84px; max-width: 100%; height: auto; display: block; margin: 0 auto; }
  .metric.fg { text-align: center; }
  #fgWord { font-size: 0.55rem; margin-top: 1px; }
  .metric .bar { height: 3px; margin-top: 4px; }
  .bar { width: 100%; max-width: 96px; }

  /* スマホ: タブ廃止。一覧が本体、銘柄タップで詳細が右からスライドして全画面に重なる */
  main { display: flex; flex-direction: column; overflow: hidden; }
  .mtabs { display: none; }
  section.listings { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; border: none; }
  #marketList { max-height: none; flex: 1 1 auto; overflow-y: auto; }
  html, body { overflow-x: hidden; overscroll-behavior-x: none; }  /* 文書ごと横パンさせない */
  #sysvoice, footer.status { display: none; }  /* 下端の固定表示はモバイルでは重なるため出さない */
  section.feature { display: flex; position: fixed; inset: 0; z-index: 70; background: var(--bg);
    overflow-x: hidden; overscroll-behavior-x: none;
    visibility: hidden;  /* 閉時は完全に不在に(横パンで覗けない) */
    transform: translateX(103%); transition: transform 0.28s ease, visibility 0s linear 0.3s; border: none; }
  main.m-view section.feature { transform: translateX(0); visibility: visible; transition: transform 0.28s ease; }
  #featBack { display: block; position: absolute; top: 12px; left: 14px; z-index: 5; padding: 9px 14px;
    font-size: 0.7rem; letter-spacing: 0.14em; background: rgba(0, 0, 0, 0.72); color: var(--fg);
    border: 1px solid var(--line-2); font-family: var(--pixel-jp); cursor: pointer; }
  .feature-scroll { padding-top: 58px !important; }
  /* チャート上部のズームボタンが縦に潰れないように */
  .chart-top { flex-wrap: wrap; gap: 8px; }
  .zooms { display: flex; flex-wrap: nowrap; gap: 6px; }
  .zoom { flex: 0 0 auto; white-space: nowrap; padding: 6px 10px; font-size: 0.7rem; min-width: 0; writing-mode: horizontal-tb; }
  aside.feed { display: none; }

  /* listings の余白 */
  .col-label { padding: 14px 18px 12px; }
  .row { padding: 14px 18px; gap: 10px; }
  .row.active { padding-left: 22px; padding-right: 14px; }
  .sortbar { padding: 0 18px 12px; }

  /* feature（中央）: 左右に余白を取り、オーブを小さめにして縦スクロール域を確保 */
  .feature-scroll { padding: 22px 22px 56px; }
  .orb { width: min(64vw, 46vh, 360px); }
  .orb-hint { font-size: 0.8rem; letter-spacing: 0.1em; margin-top: 12px; }
  .orb-bubble { padding: 20px 18px 18px; border-radius: 0; margin-top: 18px; }
  .ob-quote { font-size: 0.9rem; line-height: 1.9; }
  /* オーブ/チャート上でも縦スワイプでページが動くように（横操作・タップは維持） */
  .orb, #candleChart, #volChart, #orbGL { touch-action: pan-y; }
  .glass { padding: 18px 14px 14px; margin-top: 26px; transform: none; }
  .stats { gap: 14px 22px; margin-top: 24px; }
  .desc { margin-top: 24px; font-size: 0.94rem; line-height: 1.9; }
  .actions { gap: 12px; margin-top: 26px; }
  button.act { padding: 13px 22px; }
  .recommend { margin-top: 30px; }
  /* Dreamfield パネルのスマホ調整はファイル末尾（ベース定義より後）に集約 */
}

@media (max-width: 560px) {
  body:has(main.m-view) #slogan, body:has(main.m-view) #ticker { display: none; }
  #featBack { top: 10px; left: 12px; background: #000; border: 1px solid var(--line-2);
    box-shadow: 0 0 14px rgba(0,0,0,0.9); }
}
