:root {
  --ink: #fdfbf5;
  --ink-dim: rgba(253, 251, 245, 0.72);
  --glass: rgba(28, 36, 30, 0.46);
  --glass-strong: rgba(24, 32, 26, 0.86);
  --line: rgba(255, 255, 255, 0.16);
  --moss: #9cc24a;
  --moss-deep: #5f8a2a;
  --water: #7cc7e8;
  --gold: #f2c75c;
  --danger: #e0735a;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: #0f1410;
  font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
  color: var(--ink);
  user-select: none; -webkit-user-select: none;
  touch-action: none;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
img { -webkit-user-drag: none; user-select: none; }
/* 縦にスクロールする一覧: 縦スクロールだけ許す（ダブルタップの拡大・ピンチをさせない。iPhone は html の設定を無視することがあるため） */
.grid, #missionList, #newsNotes, .newsDetail .nBody, #exListBody, .modalBox { touch-action: pan-y; }
.hidden { display: none !important; }

/* 論理解像度 768x1376 のステージを画面に合わせて拡縮 */
#stage {
  position: absolute; left: 50%; top: 50%;
  width: 768px; height: 1376px;
  transform: translate(-50%, -50%) scale(var(--s, 0.5));
  overflow: hidden;
  background: #000;
}
#stage > * { position: absolute; }

/* 背景 */
#bgs, #bgs .bg { position: absolute; inset: 0; width: 100%; height: 100%; }
#bgs .bg { object-fit: cover; opacity: 0; transition: opacity 3s ease; }
#bgs .bg.on { opacity: 1; }

/* 瓶まわり（座標は main.js で設定） */
#jarShadow {
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(20, 12, 4, 0.45), rgba(20, 12, 4, 0));
}
#soil, #soilDry, #jarBase { transform: translate(-50%, -100%); }
#soilDry { opacity: 0; transition: opacity 1.5s; }
#jarCork, #jarBodyFront { pointer-events: none; }
#jarReflBack { mix-blend-mode: screen; opacity: 0.9; }
#jarBase { transform: none; }
/* isolation: 中身の z-index（奥行き順）を容器内に閉じ込め、ショップ等より手前に出さない */
#items { left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; isolation: isolate; }
#items img {
  position: absolute; transform: translate(-50%, -100%) scaleX(var(--fx, 1)); /* --fx: 置物の左右反転（main.js で -1 にする） */
  transition: filter 1.5s, width 1.2s ease;
  pointer-events: none;
  filter: var(--f, brightness(1)); /* 苔の元気・置物染料の色（main.js で --f を設定） */
}
#items img.sel { filter: var(--f, brightness(1)) drop-shadow(0 0 6px #fff) drop-shadow(0 0 14px var(--moss)) !important; }
#items img.ghost { opacity: 0.6; transition: none; }
/* 配置モード: 選んでいる置物の手前に重なっている置物は、半透明にして、選んでいる置物が見えるようにする */
#items img:not(.ghost):not(.kobito) { transition: filter 1.5s, width 1.2s ease, opacity .2s; }
#items img.dim { opacity: .35; }
/* 重なっている置物から選ぶ（タップした場所のそばに出る） */
#pick { z-index: 4; padding: 14px 16px 16px; border-radius: 26px; background: var(--glass-strong); border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 10px 28px rgba(0,0,0,.45); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); text-align: center; }
#pick small { display: block; margin-bottom: 10px; font-size: 20px; color: var(--ink-dim); white-space: nowrap; }
#pick div { display: flex; gap: 10px; justify-content: center; }
#pick button { width: 108px; padding: 10px 6px 8px; border-radius: 18px; background: rgba(255,255,255,.1); border: 2px solid transparent; }
#pick button.on { border-color: var(--moss); background: rgba(156,194,74,.22); }
#pick button img { display: block; width: 76px; height: 76px; margin: 0 auto 6px; object-fit: contain; }
#pick button span { display: block; font-size: 17px; font-weight: 700; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* こびと: 足もと（画像の下の中央）を軸に、左右の向き（--kx）と体のゆれ（.bob）をつける */
#items img.kobito { transform-origin: 0 0; scale: var(--kx, 1) 1; transition: filter 1.5s; }
#items img.kobito.bob { animation: kobitoBob .55s ease-in-out infinite; }
@keyframes kobitoBob { 0%, 100% { rotate: -4deg; } 50% { rotate: 4deg; } }
#items .kzz { position: absolute; pointer-events: none; font-size: 22px; font-weight: 700; color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,.6);
  animation: kobitoZzz 2.4s ease-in-out infinite; }
/* たんけんこびとが見つけたおたから（頭の上のコイン。タップで受け取る） */
#items .kcoin { position: absolute; width: 40px; height: 40px; margin: -40px 0 0 -20px; pointer-events: none;
  background: url("../assets/ui/icon_coin.png") center / contain no-repeat;
  filter: drop-shadow(0 0 8px rgba(255,220,120,.9)) drop-shadow(0 3px 4px rgba(0,0,0,.5)); animation: kobitoCoin 1s ease-in-out infinite; }
/* かぼちゃこびとの「とりっくおあとりーと！」（頭の上のかぼちゃ。タップでルーレット） */
#items .kpump { position: absolute; width: 46px; height: 46px; margin: -46px 0 0 -23px; pointer-events: none;
  background: url("../assets/ui/trick_mark.png") center / contain no-repeat;
  filter: drop-shadow(0 0 8px rgba(255,150,40,.9)) drop-shadow(0 3px 4px rgba(0,0,0,.5)); animation: kobitoCoin 1s ease-in-out infinite; }
/* ルーレット（1列）。枠の画像（858×896）を幅340pxで重ね、その窓のうしろで絵柄を流す。1コマ 224px（main.js の openTrick の H と同じ） */
.modalBox .reel { position: relative; width: 340px; height: 355px; margin: 6px auto 12px; cursor: pointer; }
.modalBox .reelWin { position: absolute; left: 58px; top: 70px; width: 224px; height: 224px; overflow: hidden; border-radius: 30px;
  background: linear-gradient(#2a1d3a, #4a2c5e 50%, #2a1d3a); box-shadow: inset 0 0 26px rgba(0,0,0,.6); }
.modalBox .reelWin i { display: flex; align-items: center; justify-content: center; height: 224px; }
.modalBox .reelWin img { width: 150px; height: 150px; object-fit: contain; filter: drop-shadow(0 4px 5px rgba(0,0,0,.45)); }
.modalBox .reelFrame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; filter: drop-shadow(0 6px 10px rgba(0,0,0,.4)); }
.modalBox .reel.win .reelFrame { filter: drop-shadow(0 0 18px rgba(255,220,120,.95)); }
.modalBox .reel.miss .reelWin { filter: saturate(.55) brightness(.8); }
.modalBox #trickMsg b { color: var(--gold); }
@keyframes kobitoCoin { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
#info .skill { margin-top: 8px; padding: 8px 12px; border-radius: 10px; background: rgba(156,194,74,.14); }
#info .skill b { color: var(--gold); }
@keyframes kobitoZzz { 0% { opacity: 0; transform: translate(0, 0) scale(.7); } 30% { opacity: .9; } 100% { opacity: 0; transform: translate(14px, -34px) scale(1.2); } }
#items img.ghost.ng { opacity: 0.45; filter: sepia(1) saturate(4) hue-rotate(-35deg); }
#jarRefl { mix-blend-mode: screen; pointer-events: none; opacity: 0.9; }
#hitLayer { left: 0; top: 0; width: 100%; height: 100%; }

#floorGuide {
  border: 3px dashed rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: rgba(156, 194, 74, 0.12);
  opacity: 0; transition: opacity .3s; pointer-events: none;
}
#stage.placing #floorGuide, #stage.editing #floorGuide { opacity: 1; }

/* 結露（水分が多いと出る） */
#condense {
  pointer-events: none; opacity: 0; transition: opacity 2s;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.35) 0 2px, transparent 3px) 0 0/38px 44px,
    radial-gradient(circle at 70% 60%, rgba(255,255,255,.28) 0 1.5px, transparent 2.5px) 0 0/29px 35px,
    linear-gradient(rgba(235, 245, 240, .10), rgba(235, 245, 240, .02));
  -webkit-mask: linear-gradient(to bottom, #000 0%, #000 55%, transparent 80%);
          mask: linear-gradient(to bottom, #000 0%, #000 55%, transparent 80%);
  border-radius: 28px;
}

/* 霧 */
#mist { pointer-events: none; }
#mist i {
  position: absolute; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,255,255,.85), rgba(255,255,255,0));
  animation: mist 1.6s ease-out forwards;
}
@keyframes mist {
  from { opacity: 0; transform: translate(0, 0) scale(.3); }
  20% { opacity: .9; }
  to { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.4); }
}

/* パネル共通 */
.panel {
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(0,0,0,.18);
  display: flex; align-items: center; gap: 12px;
  font-size: 30px; font-weight: 700;
  text-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.bar { height: 14px; border-radius: 8px; background: rgba(255,255,255,.2); overflow: hidden; flex: 1; }
.bar i { display: block; height: 100%; width: 0; border-radius: 8px;
  background: linear-gradient(90deg, var(--moss-deep), var(--moss)); transition: width .5s; }
.bar.water i { background: linear-gradient(90deg, #3f8fb3, var(--water)); }
.bar.water.low i { background: linear-gradient(90deg, #b3643f, #e8a77c); }

/* 上部のパネル: 1段目は「称号」と「コイン・チケット・時計」の2つ、2段目は「レベル・水分・収益」の3つ */
#hud, #hud2 { left: 24px; right: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
#hud2 { grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
#hud { top: 28px; }
#hud2 { top: 116px; }
#hud .panel, #hud2 .panel { height: 76px; min-width: 0; }
/* 称号 */
#hud .titlePanel { padding: 6px 24px 6px 26px; gap: 12px; text-align: left; }
#hud .titlePanel small { flex: none; padding: 2px 10px; border-radius: 999px; background: rgba(242,199,92,.22); color: var(--gold); font-size: 17px; }
#hud .titlePanel b { flex: 1; min-width: 0; font-size: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#hud .titlePanel b.none { color: var(--ink-dim); font-weight: 500; }
#hud .titlePanel b[data-len="l"] { font-size: 20px; }  /* 10〜11文字 */
#hud .titlePanel b[data-len="xl"] { font-size: 17px; } /* 12文字以上（最長 13文字） */
/* 2段目の3つ: アイコン＋上に数字・下に細いメーター（メーターは以前の約半分の長さ） */
#hud2 .panel { padding: 6px 18px 6px 8px; gap: 8px; }
#hud2 .mIcon { width: 46px; height: 46px; flex: none; }
#hud2 .mBody { flex: 1; min-width: 0; }
#hud2 .mTop { font-size: 22px; line-height: 1.1; white-space: nowrap; }
#hud2 .mBody .bar { flex: none; height: 7px; margin-top: 7px; }
#hud .coins { padding: 6px 18px 6px 8px; gap: 6px; font-size: 26px; }
#hud .coins img { width: 54px; height: 54px; flex: none; }
#hud .coins #coins { flex: 1; text-align: right; }
#hud .coins .ticketIcon { width: 40px; height: 40px; margin-left: 6px; }
/* 時計（押すと設定）: 時刻と日数を縦に小さく */
#hud .coins .clock { flex: none; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.05;
  margin-left: 8px; padding-left: 12px; border-left: 1px solid var(--line); font-size: 22px; font-weight: 700; }
#hud .coins .clock small { font-size: 15px; color: var(--ink-dim); }
#hud2 .moist { padding-left: 18px; }
.drop { width: 26px; height: 34px; background: var(--water); flex: none;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; clip-path: path("M13 0 C13 0 26 16 26 23 A13 11 0 0 1 0 23 C0 16 13 0 13 0Z"); }

/* 下部ツールバー */
/* 下のボタンは左右にスワイプできる（6つ目は最初は少し見切れる） */
#toolbar { left: 0; right: 0; bottom: 20px; display: flex; gap: 10px; padding: 14px 24px 4px;
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; scroll-padding: 0 24px; scrollbar-width: none;
  touch-action: pan-x; -webkit-overflow-scrolling: touch; }
#toolbar::-webkit-scrollbar { display: none; }
.tool {
  flex: none; scroll-snap-align: start;
  width: 130px; height: 160px; border-radius: 34px;
  background: var(--glass);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(0,0,0,.22);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 24px; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,.5);
  transition: transform .12s, background .2s;
}
.tool img { width: 96px; height: 96px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0,0,0,.25)); }
.tool span { font-size: 22px; white-space: nowrap; }
.tool:active { transform: scale(.94); }
.tool.on { background: rgba(156, 194, 74, .55); }

/* 収益バブル */
/* 収益パネル（2段目の右）: 次の1コインまでの割合・毎時の収益・細い進捗バー */
#hud2 .income { padding: 6px 18px 6px 8px; gap: 8px; text-align: left; transition: box-shadow .4s, background .4s; }
#hud2 .income .pIcon { position: relative; flex: none; }
#hud2 .income .pIcon img { width: 46px; height: 46px; display: block; }
#hud2 .income .pIcon b { position: absolute; top: -14px; left: -16px; min-width: 40px; padding: 0 8px; height: 30px; line-height: 28px; border-radius: 15px;
  background: var(--danger); border: 2px solid rgba(255,255,255,.8); font-size: 18px; text-align: center; text-shadow: none; }
#hud2 .income .pBody { flex: 1; min-width: 0; }
#hud2 .income .pTop { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; font-size: 22px; line-height: 1.1; white-space: nowrap; }
#hud2 .income .pTop span { font-size: 18px; color: var(--gold); }
#hud2 .income .pBar { height: 7px; border-radius: 4px; background: rgba(255,255,255,.2); overflow: hidden; margin-top: 7px; }
#hud2 .income .pBar i { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, #e0a93a, #f7d774); transition: width .25s linear; }
/* 受け取れるとき: 金色に光る */
#hud2 .income.ready { background: rgba(120, 90, 20, .55); box-shadow: 0 0 0 3px rgba(247,215,116,.75), 0 0 26px rgba(247,215,116,.6); }
#hud2 .income.gain { animation: gainPulse .35s ease-out; }
/* 展示会の開催中のお知らせ（収益の下・右寄せ。まだ出品していない人にだけ出す） */
#exNow { position: absolute; right: 24px; top: 204px; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 9px 20px 9px 12px; border-radius: 999px;
  color: #fff; font-size: 21px; font-weight: 700; line-height: 1.15; text-align: left; letter-spacing: .04em; text-shadow: 0 2px 3px rgba(0,0,0,.45);
  background: linear-gradient(135deg, #e8552d, #c8366b 55%, #8e2a8a); border: 3px solid #ffe9a8;
  box-shadow: 0 0 0 0 rgba(255,220,120,.8), 0 6px 14px rgba(0,0,0,.45); animation: exNowPulse 1.6s ease-in-out infinite; }
#exNow i { flex: none; width: 46px; height: 46px; border-radius: 50%; background: #fff4d6 url("../assets/deco/prize_tsukiniwa_gold.png") center / 74% no-repeat; box-shadow: inset 0 0 0 2px rgba(142,42,30,.25); }
@keyframes exNowPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,220,120,.75), 0 6px 14px rgba(0,0,0,.45); transform: scale(1); }
  50% { box-shadow: 0 0 0 12px rgba(255,220,120,0), 0 6px 14px rgba(0,0,0,.45); transform: scale(1.05); } }
.modalBox .exGuide { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 4px; text-align: left; }
.modalBox .exGuide div { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 16px; background: rgba(255,255,255,.09); }
.modalBox .exGuide b { flex: none; width: 40px; height: 40px; line-height: 40px; border-radius: 50%; text-align: center; background: var(--gold); color: #3a2a08; }
.modalBox .exGuide em { font-style: normal; font-weight: 700; color: var(--gold); }
@keyframes gainPulse { 50% { transform: scale(1.04); } }
/* 苔から湧いてポットへ飛んでいくコイン */
.coinFly { position: absolute; width: 46px; height: 46px; pointer-events: none; z-index: 4;
  transform: translate(-50%, -50%); animation: coinFly 1.3s cubic-bezier(.4,0,.6,1) forwards; }
@keyframes coinFly {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.4); }
  20% { opacity: 1; transform: translate(-50%, -110%) scale(1); }
  100% { opacity: .2; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(.5); }
}

/* モード表示 */
#modeBar {
  left: 50%; transform: translateX(-50%); top: 212px;
  background: var(--glass-strong); border-radius: 999px; padding: 12px 12px 12px 30px;
  display: flex; align-items: center; gap: 18px; font-size: 26px; white-space: nowrap;
  box-shadow: 0 6px 20px rgba(0,0,0,.3);
}
#modeBar button { background: rgba(255,255,255,.16); border-radius: 999px; padding: 10px 26px; }
/* 配置モードの「すべてしまう」: ボタンが2つ並ぶので、すきまと文字を少しつめる */
#modeBar.two { gap: 12px; }
#modeBar.two button { padding: 10px 20px; }
#modeBar #modeStoreAll { background: rgba(224,115,90,.35); font-size: 22px; }

/* シート */
.sheet {
  left: 24px; right: 24px; top: 212px;
  background: var(--glass-strong);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--line); border-radius: 32px;
  padding: 26px 30px; font-size: 26px;
  box-shadow: 0 12px 40px rgba(0,0,0,.4);
  animation: rise .22s ease-out;
}
.sheet.big { top: 212px; bottom: 34px; display: flex; flex-direction: column; z-index: 5; }
@keyframes rise { from { transform: translateY(30px); opacity: 0; } }
.sheetHead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheetHead h2 { margin: 0; font-size: 34px; }
.close { font-size: 44px; line-height: 1; width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,.1); }
.note { color: var(--ink-dim); margin: 6px 0; }
.row { display: flex; gap: 14px; margin: 14px 0; }
.row button, .btn {
  flex: 1; padding: 16px; border-radius: 20px; background: rgba(255,255,255,.12);
  border: 1px solid var(--line); font-weight: 700; font-size: 24px; line-height: 1.3;
}
.row button.on { background: var(--moss-deep); }
.btn.primary { background: var(--moss-deep); }
.btn.danger, .row button.danger { background: rgba(224,115,90,.35); }
.btn:disabled { opacity: .4; cursor: default; }

/* 情報カード */
#info .infoTop { display: flex; gap: 20px; align-items: center; }
#info .thumb { width: 130px; height: 130px; object-fit: contain; background: rgba(255,255,255,.08); border-radius: 22px; padding: 6px; }
#info h3 { margin: 0 0 4px; font-size: 32px; }
#info .stageTag { display: inline-block; font-size: 20px; padding: 2px 14px; border-radius: 999px; background: var(--moss-deep); margin-left: 10px; vertical-align: middle; }
#info .stageTag.w { background: #8a6a3a; }
#info .stat { display: flex; align-items: center; gap: 14px; margin: 10px 0; font-size: 22px; }
#info .stat label { width: 80px; color: var(--ink-dim); }
#info .hint { color: var(--ink-dim); font-size: 22px; margin: 8px 0 0; }

/* ショップ */
.tabs { display: flex; gap: 10px; margin-bottom: 18px; }
.tabs { gap: 8px; }
.tabs button { flex: 1; padding: 12px 6px; border-radius: 18px; background: rgba(255,255,255,.08); font-weight: 700; font-size: 23px; line-height: 1.2; }
.tabs button.on { background: var(--moss-deep); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; overflow-y: auto; padding-bottom: 10px; }
.card {
  background: rgba(255,255,255,.07); border: 1px solid var(--line); border-radius: 24px;
  padding: 16px; display: flex; flex-direction: column; gap: 8px; position: relative;
}
.card img { width: 100%; height: 200px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0,0,0,.35)); }
.card h4 { margin: 0; font-size: 28px; }
.card p { margin: 0; font-size: 19px; color: var(--ink-dim); line-height: 1.45; min-height: 56px; }
.card .price { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 26px; color: var(--gold); }
.card .price img { width: 38px; height: 38px; filter: none; }
.card img.glassThumb { background: radial-gradient(closest-side, rgba(255,255,255,.75), rgba(255,255,255,.25)); border-radius: 18px; padding: 10px; }
.card .have { position: absolute; top: 12px; right: 12px; background: var(--moss-deep); border-radius: 999px; padding: 2px 14px; font-size: 20px; font-weight: 700; }
.card.inv p { min-height: 0; }
/* もちもののカテゴリ: 何も持っていないものは薄く */
.catCard.none { opacity: .5; }
.empty { grid-column: 1 / -1; text-align: center; color: var(--ink-dim); line-height: 1.8; margin: 40px 0; }
.tool { position: relative; }
.badge { position: absolute; top: -8px; right: -8px; min-width: 44px; height: 44px; padding: 0 10px; border-radius: 22px;
  background: var(--moss-deep); border: 2px solid rgba(255,255,255,.7); font-size: 24px; line-height: 40px; }
.card.locked > img:first-child { filter: grayscale(1) brightness(.5); }

.card .lock { position: absolute; top: 70px; left: 0; right: 0; text-align: center; font-size: 26px; font-weight: 700; }

/* モーダル */
#modal { inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 10; }
.modalBox {
  width: 620px; background: var(--glass-strong); border: 1px solid var(--line); border-radius: 36px;
  padding: 40px; text-align: center; font-size: 26px; box-shadow: 0 20px 60px rgba(0,0,0,.5);
  animation: rise .25s ease-out;
}
.modalBox h2 { margin: 0 0 16px; font-size: 38px; }
.modalBox ul { text-align: left; padding-left: 30px; line-height: 1.7; color: var(--ink-dim); }
.modalBox .gain { display: flex; justify-content: center; gap: 30px; font-size: 32px; font-weight: 700; margin: 18px 0; }
.modalBox .gain span { display: flex; align-items: center; gap: 8px; }
.modalBox .gain img { width: 52px; height: 52px; }

/* トースト・浮き文字 */
#toasts { left: 0; right: 0; top: 330px; display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; z-index: 20; }
.toast {
  background: var(--glass-strong); padding: 14px 30px; border-radius: 999px; font-size: 26px; font-weight: 700;
  animation: toast 2.8s ease forwards; box-shadow: 0 6px 20px rgba(0,0,0,.3);
}
@keyframes toast { 0% { opacity: 0; transform: translateY(-10px); } 10%, 80% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.float {
  position: absolute; font-size: 34px; font-weight: 700; pointer-events: none; z-index: 20;
  text-shadow: 0 2px 6px rgba(0,0,0,.6); animation: floatUp 1.4s ease-out forwards;
  transform: translateX(-50%);
}
@keyframes floatUp { to { opacity: 0; transform: translate(-50%, -110px); } }

/* ミッション */
.badge.alert { background: var(--danger); }
.mission { display: flex; align-items: center; gap: 16px; padding: 18px 20px; margin: 12px 0; border-radius: 22px;
  background: rgba(255,255,255,.07); border: 1px solid var(--line); }
.mission .mName { flex: 1; font-weight: 700; }
.mission .mName small { display: block; font-weight: 500; font-size: 21px; color: var(--gold); margin-top: 4px; }
.mission .check { width: 44px; height: 44px; border-radius: 50%; border: 3px solid rgba(255,255,255,.35); flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 28px; }
.mission.done .check { background: var(--moss-deep); border-color: var(--moss); }
.mission .btn { flex: none; width: 190px; font-size: 21px; white-space: nowrap; }
.mission.claimed { opacity: .55; }
.mission .mDesc { display: block; font-weight: 500; font-size: 21px; color: var(--ink-dim); margin-top: 2px; }
.mission .mProg { position: relative; display: block; height: 26px; margin-top: 8px; border-radius: 13px; background: rgba(0,0,0,.25); overflow: hidden; }
.mission .mProg i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--moss-deep); }
.mission .mProg em { position: relative; display: block; text-align: center; font-style: normal; font-size: 18px; line-height: 26px; font-weight: 700; }
#missionList { flex: 1; overflow-y: auto; min-height: 0; }
#missionTabs { margin: 4px 0 6px; }
#missionTabs button { position: relative; }
#missionTabs .badge { top: -12px; right: -4px; min-width: 38px; height: 38px; font-size: 20px; line-height: 34px; }
.mCat { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 4px 4px; font-size: 26px; color: var(--gold); }
.mCat small { font-size: 20px; color: var(--ink-dim); }
.claimAll { display: block; width: 100%; margin: 8px 0 0; }

/* ガラガラポン */
.gacha { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
/* 抽選機: 部品を軸でそろえて重ねる（奥から ドラム → 台 → ハンドル → 玉）。台は動かず、ドラムとハンドルだけが同じ軸で回る
   位置と大きさの割合は、tools/process_garapon.py が表示する値（組み立てた絵 894×885 に対する割合） */
.garapon { position: relative; width: 360px; aspect-ratio: 894 / 885; margin-top: 30px; filter: drop-shadow(0 10px 16px rgba(0,0,0,.4)); }
.garapon img { position: absolute; display: block; pointer-events: none; }
.garapon .gStand { left: 0; bottom: 0; width: 100%; }
.garapon .gDrum, .garapon .gHandle { left: 49.89%; top: 37.74%; }
.garapon .gDrum { width: 85.35%; transform: translate(-50%, -50%) rotate(-45deg); } /* 止まっているとき: 出口は右下（受け皿の上） */
.garapon .gHandle { width: 48.21%; transform: translate(-50%, -50%) rotate(0deg); }
.garapon.spin .gDrum { animation: garaDrum 1.5s cubic-bezier(.45,.05,.3,1); }
.garapon.spin .gHandle { animation: garaHandle 1.5s cubic-bezier(.45,.05,.3,1); }
@keyframes garaDrum { from { transform: translate(-50%, -50%) rotate(-45deg); } to { transform: translate(-50%, -50%) rotate(675deg); } }
@keyframes garaHandle { from { transform: translate(-50%, -50%) rotate(0deg); } to { transform: translate(-50%, -50%) rotate(720deg); } }
/* 出てくる玉: ドラムが止まったら、出口から丸い玉がぽんと飛び出し、受け皿に「カラン」と落ちて2回はずむ
   大きさは変えない（小さく出して大きくすると、しずくが垂れるように見える）。落ちるときは速く、はずむたびに低く */
.garapon .gBall { position: absolute; left: 83.5%; top: 79.6%; width: 30px; height: 30px; margin: -15px 0 0 -15px; opacity: 0;
  box-shadow: inset -6px -7px 9px rgba(0,0,0,.3), inset 4px 4px 6px rgba(255,255,255,.75), 0 0 0 1.5px rgba(0,0,0,.28); }
.garapon .gBall.out { opacity: 1; animation: garaBall .62s linear; }
@keyframes garaBall {
  0% { left: 78.6%; top: 66.8%; opacity: 0; animation-timing-function: ease-out; }
  6% { opacity: 1; }
  14% { left: 80.4%; top: 65.6%; animation-timing-function: cubic-bezier(.55,0,1,.6); } /* 出口から少し飛び出す */
  40% { left: 81.6%; top: 79.6%; animation-timing-function: cubic-bezier(0,.5,.4,1); }  /* 皿に当たる（カラン） */
  54% { left: 82.4%; top: 74.2%; animation-timing-function: cubic-bezier(.6,0,1,.5); }
  68% { left: 82.9%; top: 79.6%; animation-timing-function: cubic-bezier(0,.5,.4,1); }  /* 2回目 */
  77% { left: 83.2%; top: 77.6%; animation-timing-function: cubic-bezier(.6,0,1,.5); }
  86% { left: 83.4%; top: 79.6%; }                                                      /* 3回目。あとは少し転がって止まる */
  100% { left: 83.5%; top: 79.6%; }
}
.gacha .stock { display: flex; gap: 28px; font-size: 28px; font-weight: 700; }
.gacha .stock span { display: flex; align-items: center; gap: 8px; }
.gacha .stock img { width: 48px; height: 48px; }
.gacha .spinBtn { width: 440px; font-size: 30px; padding: 20px; }
.gacha .spinBtn.ten { font-size: 27px; padding: 16px; }
/* 10連の結果: 出た順の一覧（玉・絵・景品）。限定の置物は金色でめだたせる */
.modalBox .gachaList { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 6px; text-align: left; }
.modalBox .gachaList div { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.09);
  font-size: 22px; animation: pop .4s cubic-bezier(.2,1.6,.4,1) backwards; }
.modalBox .gachaList img { width: 46px; height: 46px; object-fit: contain; flex: none; }
.modalBox .gachaList .ball { flex: none; }
.modalBox .gachaList b { min-width: 0; line-height: 1.25; }
.modalBox .gachaList .hit { background: rgba(232,185,58,.22); box-shadow: inset 0 0 0 2px var(--gold); }
.modalBox .gachaList .hit b { color: var(--gold); }
.gacha .odds { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; text-align: left; font-size: 21px; color: var(--ink-dim); margin-top: 6px; }
.ball { display: inline-block; width: 30px; height: 30px; border-radius: 50%; vertical-align: middle;
  box-shadow: inset -5px -6px 8px rgba(0,0,0,.25), inset 4px 4px 6px rgba(255,255,255,.6), 0 2px 4px rgba(0,0,0,.3); }
.ball.big { width: 110px; height: 110px; animation: pop .5s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { from { transform: scale(0) translateY(60px); } }
.modalBox .prize { width: 220px; height: 220px; object-fit: contain; margin: 10px auto; display: block; }

/* 染料パレット */
.palette { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0 4px; }
.palette button { width: 58px; height: 58px; border-radius: 50%; border: 3px solid rgba(255,255,255,.5); }
.palette button.on { outline: 4px solid var(--moss); outline-offset: 2px; }
.palette .reset { width: auto; border-radius: 999px; padding: 0 20px; background: rgba(255,255,255,.12); font-size: 22px; }
.dyeNow { display: flex; justify-content: space-between; margin: 14px 0 0; font-size: 22px; color: var(--ink-dim); }
.dyeNow b { color: var(--ink); }
.dyeNow .left { color: var(--gold); font-size: 19px; }

/* ショップのトップ画面 */
.sheetHead .back { font-size: 56px; line-height: 1; width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,.1); margin-right: 14px; }
.sheetHead h2 { margin-right: auto; }
.gachaBanner {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; padding: 14px 24px 14px 14px; border-radius: 26px; text-align: left;
  background: linear-gradient(120deg, #8e2a1e, #c8402f 55%, #e0a93a); border: 2px solid rgba(247,215,116,.7);
  box-shadow: 0 8px 24px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.3);
}
.gachaBanner img { width: 130px; height: 130px; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0,0,0,.35)); }
.gachaBanner div { flex: 1; }
.gachaBanner b { display: block; font-size: 38px; text-shadow: 0 2px 4px rgba(0,0,0,.4); }
.gachaBanner small { font-size: 22px; opacity: .9; }
.gachaBanner .go { background: #fff4d6; color: #8e2a1e; font-weight: 700; font-size: 26px; padding: 12px 26px; border-radius: 999px; box-shadow: 0 4px 10px rgba(0,0,0,.25); }
.catCard {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 18px 12px 16px; border-radius: 26px;
  background: radial-gradient(circle at 50% 35%, rgba(156,194,74,.22), rgba(255,255,255,.05) 70%); border: 1px solid var(--line);
  transition: transform .12s;
}
.catCard:active { transform: scale(.96); }
.catCard img { width: 100%; height: 170px; object-fit: contain; filter: drop-shadow(0 8px 12px rgba(0,0,0,.4)); margin-bottom: 6px; }
.catCard img.glassThumb { background: radial-gradient(closest-side, rgba(255,255,255,.6), rgba(255,255,255,0)); }
.catCard b { font-size: 32px; }
.catCard small { font-size: 20px; color: var(--ink-dim); }
.catCard .count { margin-top: 6px; font-size: 20px; font-weight: 700; color: var(--gold); }
.catCard .new { position: absolute; top: 12px; right: 12px; background: var(--danger); border-radius: 999px; padding: 2px 14px; font-size: 20px; font-weight: 700; }
/* 見ていない新商品の NEW（商品カードの左上・メニューのショップボタン） */
.card .newTag { position: absolute; top: 12px; left: 12px; z-index: 1; background: var(--danger); border-radius: 999px; padding: 2px 14px; font-size: 20px; font-weight: 700; }
.badge.newMark { background: var(--danger); min-width: 0; padding: 0 10px; font-size: 19px; font-weight: 700; }

/* 目のボタン（右下）: 押すと苔リウム以外の表示を隠す */
#eyeBtn { bottom: 206px; right: 24px; width: 76px; height: 76px; border-radius: 50%; z-index: 3;
  background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); box-shadow: 0 6px 20px rgba(0,0,0,.2); color: var(--ink);
  display: flex; align-items: center; justify-content: center; transition: transform .12s, opacity .3s; }
#eyeBtn:active { transform: scale(.92); }
#eyeBtn svg { width: 46px; height: 46px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
#eyeBtn .shut { display: none; }
#info { z-index: 5; }
.uiOff #eyeBtn { opacity: 0; transition: opacity .6s ease 1s; } /* 閉じた目を1秒見せてから消える（その場所をタップで戻る） */
.uiOff #eyeBtn.peek { opacity: .55; transition: opacity .2s; }     /* 隠している間に画面をタップすると、少しだけ現れる */
.uiOff #eyeBtn .open { display: none; }
.uiOff #eyeBtn .shut { display: block; }
#hud, #hud2, #toolbar, #pending, #toasts, #exNow { transition: opacity .35s; }
.uiOff #hud, .uiOff #hud2, .uiOff #toolbar, .uiOff #pending, .uiOff #toasts, .uiOff #exNow, .uiOff .coinFly, .uiOff .float { opacity: 0; pointer-events: none; }
.uiOff #modeBar, .uiOff #info, .uiOff .sheet { display: none !important; }
/* 閲覧専用（管理ツールから）: 苔リウムと部屋だけを見せる */
.viewOnly #hud, .viewOnly #hud2, .viewOnly #toolbar, .viewOnly #pending, .viewOnly #exNow, .viewOnly #toasts, .viewOnly #eyeBtn, .viewOnly #optBtn,
.viewOnly #modeBar, .viewOnly #info, .viewOnly #hitLayer, .viewOnly #floorGuide, .viewOnly .sheet { display: none !important; }

/* 起動: ロゴ → タイトル。起動中はゲームの表示を隠して背景だけ見せる */
/* :where で強さを下げる（下の出品用 .capture のルールが勝つように） */
#stage.boot > *:not(:where(#bgs, #title, #splash, #modal, #toasts, #maint, #news, #exhibit)) { display: none !important; }
/* 展示会に出品するとき: タイトル画面のまま、見えないところで苔リウムを組み立てて画像にする */
#stage.boot.capture > #jarBody, #stage.boot.capture > #jarRefl, #stage.boot.capture > #soil, #stage.boot.capture > #soilDry, #stage.boot.capture > #items,
#stage.boot.capture > #jarBase:not(.hidden), #stage.boot.capture > #jarReflBack:not(.hidden), #stage.boot.capture > #jarBodyFront:not(.hidden),
#stage.boot.capture > #jarCork:not(.hidden) { display: block !important; visibility: hidden !important; }
#splash { inset: -6px; z-index: 30; background: #000; display: flex; align-items: center; justify-content: center; transition: opacity .8s; }
#splash img { width: 420px; opacity: 0; transition: opacity 1.6s ease; }
#splash.on img { opacity: 1; }
#splash.out { opacity: 0; }
#title { inset: 0; z-index: 8; display: flex; flex-direction: column; align-items: center;
  background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,0) 38%, rgba(0,0,0,0) 55%, rgba(0,0,0,.55));
  animation: titleIn 1.4s ease; }
@keyframes titleIn { from { opacity: 0; } }
.titleLogo { margin-top: 250px; text-align: center; animation: rise 1.6s ease-out; }
.titleLogo small { display: block; font-size: 28px; letter-spacing: .4em; color: var(--ink-dim); text-shadow: 0 2px 8px rgba(0,0,0,.6); }
.titleLogo h1 { margin: 10px 0 0; font-size: 100px; font-weight: 700; letter-spacing: .08em; color: #f5f1e2;
  text-shadow: 0 4px 18px rgba(0,0,0,.55), 0 0 40px rgba(156,194,74,.55); }
.titleMenu { margin-top: auto; margin-bottom: 190px; display: flex; flex-direction: column; gap: 22px; }
.titleBtn { width: 460px; padding: 26px; border-radius: 999px; font-size: 36px; font-weight: 700; letter-spacing: .1em;
  background: var(--glass-strong); border: 1px solid rgba(255,255,255,.28); box-shadow: 0 8px 24px rgba(0,0,0,.35);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: transform .12s, background .2s; }
.titleBtn:active { transform: scale(.96); }
.titleBtn.main { background: linear-gradient(180deg, #78a83a, var(--moss-deep)); } /* おすすめのボタン（データの有無で切り替え） */
.titleBtn:disabled { opacity: .4; }
.titleBtn.sub { font-size: 30px; }
.titleBtn span { margin-left: 14px; font-size: 20px; padding: 2px 12px; border-radius: 999px; background: rgba(255,255,255,.18); vertical-align: middle; letter-spacing: 0; }
.titleBtn { position: relative; }
.titleBtn .badge.newMark { position: absolute; top: -10px; right: -6px; margin: 0; padding: 0 12px; height: 40px; line-height: 36px; font-size: 19px; background: var(--danger); letter-spacing: 0; }

/* コケだより: 苔のはえた木のかわら版（画像が届くまでは木目の板で代用）に付箋を貼る */
#news { inset: 0; z-index: 9; background: rgba(6,10,7,.88); display: flex; flex-direction: column; align-items: center; animation: titleIn .4s ease; }
.newsBoard { position: relative; margin-top: 120px; width: 700px; height: 1000px; border-radius: 26px;
  background: repeating-linear-gradient(90deg, rgba(0,0,0,.06) 0 3px, rgba(0,0,0,0) 3px 46px),
    linear-gradient(180deg, #8a6440, #6f4f31 60%, #5c4128);
  box-shadow: 0 20px 50px rgba(0,0,0,.55), inset 0 0 0 14px #4e3620, inset 0 18px 0 14px rgba(98,140,52,.55); }
.newsBoardImg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; border-radius: 26px; pointer-events: none; }
.newsTitle { position: absolute; top: 46px; left: 0; right: 0; margin: 0; text-align: center; font-size: 44px; letter-spacing: .3em; color: #f5ecd2;
  text-shadow: 0 3px 8px rgba(0,0,0,.6); }
#newsNotes { position: absolute; left: 60px; right: 60px; top: 140px; bottom: 60px; display: grid; grid-template-columns: 1fr 1fr;
  grid-auto-rows: 250px; gap: 26px 34px; align-content: start; }
#newsNotes.all { overflow-y: auto; padding: 10px 6px 20px; }
.newsNote { position: relative; padding: 46px 22px 20px; color: #3a2e22; text-align: left; border-radius: 4px;
  box-shadow: 0 10px 18px rgba(0,0,0,.35), 0 2px 3px rgba(0,0,0,.25); transition: transform .12s; }
.newsNote:active { transform: scale(.95) !important; }
.newsNote > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; pointer-events: none; }
.newsNote > * { position: relative; }
.newsNote::before { content: ""; position: absolute; top: -14px; left: 50%; width: 90px; height: 30px; transform: translateX(-50%) rotate(-3deg);
  background: rgba(255,255,255,.45); box-shadow: 0 1px 3px rgba(0,0,0,.15); } /* テープ（画像が無いとき） */
.newsNote.img { background: none !important; box-shadow: none; } /* 付箋の画像が届いたら、仮の色と影は消す */
.newsNote.img::before { display: none; }
.newsNote .nCat { display: block; font-size: 18px; font-weight: 700; opacity: .7; }
.newsNote .nDate { display: block; font-size: 18px; opacity: .7; margin-top: 2px; }
.newsNote .nTitle { display: block; margin-top: 10px; font-size: 25px; font-weight: 700; line-height: 1.35; }
.newsNote .nNew { position: absolute; top: 10px; right: 10px; padding: 2px 10px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 17px; font-weight: 700; }
.newsBar { margin-top: 34px; display: flex; gap: 24px; }
.newsBar .titleBtn { width: 300px; }
.newsDetail .nCat { display: inline-block; padding: 2px 16px; border-radius: 999px; color: #3a2e22; font-size: 20px; font-weight: 700; }
.newsDetail .nDate { margin-left: 12px; font-size: 20px; color: var(--ink-dim); }
.newsDetail h2 { margin-top: 14px; }
.newsDetail .nBody { max-height: 760px; overflow-y: auto; text-align: left; line-height: 1.8; padding-right: 6px; }
.newsDetail .nBody p, .newsDetail .nBody div { margin: 0 0 12px; }
/* お知らせの見出し: 段落を区切る帯（深い苔色＋左に金の線） */
.newsDetail .nBody h3 { margin: 22px 0 12px; padding: 10px 18px 10px 22px; font-size: 1.1em; letter-spacing: .06em; color: #f6efd8;
  background: linear-gradient(90deg, rgba(74,104,44,.95), rgba(46,66,30,.75) 70%, rgba(46,66,30,0));
  border-left: 6px solid var(--gold); border-radius: 4px; }
.newsDetail .nBody h3:first-child { margin-top: 4px; }
/* 小見出し: 帯見出しより一段小さい区切り（うすい苔色＋左に細い苔色の線）。帯見出しの中の項目に使う */
.newsDetail .nBody h4 { margin: 18px 0 8px; padding: 5px 14px 5px 14px; font-size: 1em; font-weight: 700; letter-spacing: .04em; color: #f3dfa6;
  background: rgba(156,194,74,.16); border-left: 4px solid var(--moss); border-radius: 3px; }
.newsDetail .nBody h3 + h4 { margin-top: 10px; }
.newsDetail .nBody img { max-width: 100%; height: auto; vertical-align: middle; filter: drop-shadow(0 4px 8px rgba(0,0,0,.3)); }
.modalBox:has(.newsDetail) { width: 680px; background: rgba(22,30,24,.97); }

/* 展示会（画像が届くまでは、暗いギャラリーとスポットライトの CSS で代用） */
#exhibit { inset: 0; z-index: 9; overflow: hidden; display: flex; flex-direction: column; align-items: center;
  background: radial-gradient(ellipse 60% 45% at 50% 46%, rgba(255,236,190,.28), rgba(255,236,190,0) 70%),
    linear-gradient(180deg, #1b1712 0%, #2a231b 55%, #3b3025 56%, #1d1813 100%); animation: titleIn .4s ease; }
#exhibit > * { position: relative; }
#exhibit > .exBg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.exHead { margin-top: 120px; text-align: center; text-shadow: 0 3px 10px rgba(0,0,0,.7); }
.exHead small { font-size: 24px; letter-spacing: .4em; color: var(--gold); }
.exHead h2 { margin: 8px 0 4px; font-size: 52px; letter-spacing: .08em; color: #f7efd9; }
.exHead p { margin: 0; font-size: 22px; color: var(--ink-dim); }
.exTop { position: absolute !important; top: 120px; width: 96px; height: 76px; border-radius: 20px; background: var(--glass-strong);
  border: 1px solid rgba(255,255,255,.25); font-size: 26px; font-weight: 700; }
#exClose { right: 28px; font-size: 40px; width: 76px; }
/* 一覧・図録は、上だとテーマの文字に重なるので、画面の下の左右に置く */
#exListBtn, #exBookBtn { top: auto; bottom: 52px; z-index: 4; }
#exListBtn { left: 28px; }
#exBookBtn { right: 28px; }
/* 図録（過去の展示会の一覧） */
.exRow.book img { width: 84px; height: 84px; flex: none; object-fit: contain; border-radius: 12px; background: rgba(0,0,0,.25); }
.exRow.book .sc { width: 130px; font-weight: 700; }
/* 表彰式 */
#exCeremony { position: absolute !important; inset: 0; z-index: 7; display: flex; flex-direction: column; align-items: center; overflow: hidden;
  background: radial-gradient(ellipse at 50% 42%, rgba(70,58,34,.92), rgba(8,7,5,.97) 62%); }
#exCeremony > * { position: relative; }
.cmHead { margin: 130px 0 0; font-size: 34px; letter-spacing: .4em; color: var(--gold); text-align: center; text-shadow: 0 3px 10px rgba(0,0,0,.7); }
.cmHead small { display: block; margin-top: 10px; font-size: 40px; letter-spacing: .08em; color: #f7efd9; }
.cmRank { margin: 34px 0 0; min-height: 96px; font-size: 76px; font-weight: 700; letter-spacing: .1em; color: #f6d77a; text-shadow: 0 4px 16px rgba(0,0,0,.8); }
.cmWork { margin-top: 10px; width: 620px; height: 520px; display: flex; align-items: flex-end; justify-content: center; }
#cmImg { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 0 60px rgba(255,226,150,.35)) drop-shadow(0 18px 24px rgba(0,0,0,.6));
  transition: opacity .7s, transform .7s; }
#cmImg.out { opacity: 0; transform: scale(.82); transition: none; }
.cmPlate { margin-top: 34px; transition: opacity .7s; }
.cmPlate.out { opacity: 0; transition: none; }
#cmSkip { position: absolute !important; right: 28px; bottom: 44px; padding: 16px 30px; border-radius: 999px; font-size: 24px; background: var(--glass-strong); border: 1px solid rgba(255,255,255,.25); }
#exCfBox { position: absolute !important; inset: 0; pointer-events: none; }
#exCfBox i { position: absolute; top: -40px; width: 16px; height: 26px; border-radius: 3px; opacity: .9; animation: cfFall linear forwards; }
@keyframes cfFall { to { transform: translateY(1500px) rotate(720deg); opacity: .7; } }
.exStage { margin-top: 30px; width: 768px; height: 640px; display: flex; align-items: flex-end; justify-content: center; touch-action: pan-y; }
.exWork { position: relative; z-index: 2; width: 520px; height: 600px; display: flex; align-items: flex-end; justify-content: center; }
#exImg { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 18px 24px rgba(0,0,0,.55)); transition: opacity .25s; }
#exImg { cursor: zoom-in; }
#exImg.out { opacity: 0; }
/* 作品をタップしたときの拡大表示 */
#exZoom { position: absolute !important; inset: 0; z-index: 6; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.88); cursor: zoom-out; }
#exZoom img { max-width: 94%; max-height: 88%; object-fit: contain; filter: drop-shadow(0 18px 30px rgba(0,0,0,.6)); }
#exPlus { position: absolute; bottom: 120px; width: 240px; height: 240px; border-radius: 50%; border: 4px dashed rgba(255,255,255,.55);
  background: rgba(255,255,255,.08); font-size: 120px; line-height: 1; color: rgba(255,255,255,.85); }
#exPlus:active { transform: scale(.95); }
#exEmpty { position: absolute; bottom: 220px; left: 0; right: 0; text-align: center; font-size: 28px; line-height: 1.7; color: var(--ink-dim); }
.exPedestal { position: absolute !important; bottom: -60px; left: 50%; width: 560px; height: 120px; transform: translateX(-50%); z-index: 1; border-radius: 10px;
  background: linear-gradient(180deg, #e9e2d3, #b9ae98); box-shadow: 0 30px 40px rgba(0,0,0,.5), inset 0 8px 0 rgba(255,255,255,.5); }
.exArrow { position: absolute !important; bottom: 260px; width: 80px; height: 120px; font-size: 80px; line-height: 1; color: rgba(255,255,255,.85); z-index: 3;
  text-shadow: 0 2px 10px rgba(0,0,0,.6); }
#exPrev { left: 14px; } #exNext { right: 14px; }
.exArrow:disabled { opacity: .15; }
.exPlate { margin-top: 90px; min-width: 460px; max-width: 640px; padding: 22px 40px 20px; text-align: center; border-radius: 10px;
  background: linear-gradient(180deg, #4a3320, #2e1f13); border: 4px solid #c9a35a; box-shadow: 0 10px 24px rgba(0,0,0,.5), inset 0 0 0 3px #6b4b2a; }
.exPlate .exPlateImg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; }
.exPlate.img { background: none; border: 0; box-shadow: none; }
.exPlate b, .exPlate span { position: relative; display: block; }
.exPlate b { font-size: 36px; letter-spacing: .1em; color: #f3dfa6; text-shadow: 0 2px 4px rgba(0,0,0,.6); }
.exPlate span { margin-top: 4px; font-size: 22px; color: #e6d3a6; }
.exMsg { margin: 22px 40px 0; min-height: 36px; text-align: center; font-size: 28px; color: #f5ecd2; text-shadow: 0 2px 8px rgba(0,0,0,.7); }
.exPage { margin: 8px 0 0; font-size: 20px; color: var(--ink-dim); }
.exBar { margin-top: auto; margin-bottom: 70px; }
.exBar .titleBtn { width: 420px; }
.exCount { margin: 0 0 16px; text-align: center; font-size: 28px; letter-spacing: .06em; color: #f5ecd2; text-shadow: 0 2px 8px rgba(0,0,0,.7); font-variant-numeric: tabular-nums; }
#exListBox { position: absolute !important; inset: 110px 30px 50px; z-index: 5; display: flex; flex-direction: column; border-radius: 30px;
  background: rgba(22,30,24,.97); border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.exListHead { display: flex; align-items: center; padding: 24px 30px; border-bottom: 1px solid var(--line); font-size: 32px; }
.exListHead button { margin-left: auto; font-size: 40px; width: 60px; }
#exListBody { overflow-y: auto; padding: 10px 20px 20px; }
.exRow { display: flex; align-items: center; gap: 18px; width: 100%; padding: 18px 16px; border-bottom: 1px solid var(--line); text-align: left; font-size: 26px; }
.exRow .rk { width: 70px; flex: none; font-weight: 700; color: var(--gold); }
.exRow .wk { flex: 1; font-weight: 700; }
.exRow .pl { color: var(--ink-dim); font-size: 22px; }
/* 展示会の称号（作者名の前に、金色の小さな札で） */
.exTitle { display: inline-block; margin-right: 8px; padding: 0 10px; border-radius: 999px; background: rgba(242,199,92,.22); color: var(--gold);
  font-style: normal; font-size: .85em; line-height: 1.5; vertical-align: 1px; }
.exPlate .exTitle { display: inline; margin-right: 6px; padding: 0; background: none; color: #f6d77a; font-size: 1em; } /* プレートの上では札にせず金文字で */
.exRow .sc { width: 120px; text-align: right; color: var(--gold); }
.exRow.mine { background: rgba(156,194,74,.15); border-radius: 16px; }
/* 会場の背景画像があるとき: 画像の展示台（天板 y≈700〜726・幅 x 256〜509）の上に作品を載せ、名札を台の正面に */
#exhibit.hasBg .exPedestal { display: none; }
#exhibit.hasBg > .exStage { position: absolute; left: 0; top: 290px; height: 445px; margin: 0; }
#exhibit.hasBg .exWork { height: 445px; }
#exhibit.hasBg #exImg { max-width: 300px; } /* 台の天板（幅 約250px）から少しはみ出す程度に */
#exhibit.hasBg #exPlus { bottom: 40px; }
#exhibit.hasBg #exEmpty { bottom: 150px; }
#exhibit.hasBg .exArrow { bottom: 150px; }
#exhibit.hasBg > .exPlate { position: absolute; top: 772px; left: 50%; transform: translateX(-50%); margin: 0; }
#exhibit.hasBg > .exMsg { position: absolute; top: 890px; left: 0; right: 0; margin: 0 40px; }
#exhibit.hasBg > .exPage { position: absolute; top: 940px; left: 0; right: 0; text-align: center; }
#exhibit.hasBg > .exBar { position: absolute; bottom: 40px; margin: 0; }
/* 作品名プレートの画像があるとき（横長 約5:1） */
.exPlate.img { width: 500px; min-width: 0; height: 104px; padding: 16px 50px 0; display: flex; flex-direction: column; justify-content: center; }
.exPlate.img b { font-size: 30px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exPlate.img span { font-size: 20px; margin-top: 2px; }

/* 採点の演出 */
.scoreBig { font-size: 120px; font-weight: 700; color: var(--gold); text-shadow: 0 0 30px rgba(242,199,92,.5); margin: 10px 0; }
.scoreBig small { font-size: 40px; }
.modalBox .row2 { display: flex; gap: 16px; justify-content: center; margin-top: 20px; }
.modalBox .row2 .btn { flex: 1; }
.modalBox input.thought { width: 100%; font-size: 28px; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.08); color: inherit; }

.titleFoot { position: absolute; bottom: 60px; margin: 0; font-size: 20px; color: var(--ink-dim); letter-spacing: .1em; }

/* ガラガラポン: 金玉の景品 */
.gacha .prizeHead { align-self: stretch; margin-top: 10px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 26px; font-weight: 700; color: var(--gold); }
.gacha .prizeGrid { align-self: stretch; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.prizeCard { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px; border-radius: 20px;
  background: radial-gradient(circle at 50% 40%, rgba(232,185,58,.22), rgba(255,255,255,.04) 70%); border: 1px solid rgba(232,185,58,.35); }
.prizeCard img { width: 100%; height: 120px; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0,0,0,.4)); }
.prizeCard b { font-size: 19px; line-height: 1.3; }
.prizeCard.rare { border-color: rgba(247,215,116,.9); box-shadow: 0 0 18px rgba(247,215,116,.35); }
.prizeCard .tag { position: absolute; top: 8px; left: 8px; background: linear-gradient(90deg,#c9a13a,#f7d774); color: #5a3d0a; font-size: 17px; font-weight: 700; padding: 1px 10px; border-radius: 999px; }
.prizeCard .got { position: absolute; top: 8px; right: 8px; background: var(--moss-deep); font-size: 16px; font-weight: 700; padding: 1px 10px; border-radius: 999px; }

/* 住まい: 部屋の写真は縦長なので、カードでは切り抜いて見せる */
.card img.roomThumb, .catCard img.roomThumb { object-fit: cover; object-position: 50% 62%; border-radius: 18px; }

/* ショップ: 苔の植えられる数 */
.capNote { grid-column: 1 / -1; margin: 0; padding: 14px 20px; border-radius: 18px; background: rgba(156,194,74,.16); border: 1px solid rgba(156,194,74,.4); font-size: 24px; }
.capNote b { color: var(--moss); }
.capNote small { display: block; font-size: 19px; color: var(--ink-dim); margin-top: 2px; }
/* ガラガラポン: コインでまわす・染料を買う */
.gacha .coinRow { display: flex; gap: 14px; width: 440px; }
.gacha .coinRow .btn { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 22px; }
.gacha .coinRow small { display: flex; align-items: center; gap: 4px; color: var(--gold); font-size: 20px; }
.gacha .coinRow img { width: 26px; height: 26px; }

/* 歯車ボタン（目の横）とオプション */
#optBtn { bottom: 206px; right: 112px; width: 76px; height: 76px; border-radius: 50%; z-index: 3;
  background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); box-shadow: 0 6px 20px rgba(0,0,0,.2); color: var(--ink);
  display: flex; align-items: center; justify-content: center; transition: transform .12s, opacity .35s; }
#optBtn:active { transform: scale(.92); }
#optBtn svg { width: 44px; height: 44px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.uiOff #optBtn { opacity: 0; pointer-events: none; }
#options { z-index: 6; }
.optRow { display: flex; align-items: center; justify-content: space-between; padding: 16px 6px; border-bottom: 1px solid var(--line); font-size: 28px; font-weight: 700; }
.optRow > span { flex: none; width: 140px; }
.optRow .optVol { flex: 1; margin: 0 22px; height: 40px; accent-color: var(--moss); }
#options #muteBtn { margin-top: 14px; }
.toggle { width: 110px; height: 56px; border-radius: 28px; background: rgba(255,255,255,.18); position: relative; transition: background .2s; }
.toggle::after { content: ""; position: absolute; top: 6px; left: 6px; width: 44px; height: 44px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); transition: left .2s; }
.toggle.on { background: var(--moss-deep); }
.toggle.on::after { left: 60px; }
.optField { display: block; margin-top: 20px; font-size: 24px; font-weight: 700; color: var(--ink-dim); }
.optField span { display: block; margin-bottom: 8px; }
.optField input, .nameForm input {
  width: 100%; padding: 16px 20px; border-radius: 18px; border: 1px solid var(--line); background: rgba(255,255,255,.1);
  color: var(--ink); font: inherit; font-size: 30px; font-weight: 700; user-select: text; -webkit-user-select: text; outline: none; }
.optField input:focus, .nameForm input:focus { border-color: var(--moss); background: rgba(255,255,255,.16); }
/* 称号のプルダウン（入力欄と同じ見た目） */
.optField select { width: 100%; padding: 16px 20px; border-radius: 18px; border: 1px solid var(--line); background: rgba(255,255,255,.1);
  color: var(--ink); font: inherit; font-size: 30px; font-weight: 700; outline: none; }
.optField select option { color: #222; }
.optField span small { margin-left: 12px; font-size: 20px; font-weight: 500; }
/* はじめての名前入力 */
.nameForm { text-align: left; margin: 10px 0 4px; }
.nameForm label { display: block; margin-top: 16px; font-size: 24px; font-weight: 700; color: var(--ink-dim); }
.nameForm label span { display: block; margin-bottom: 8px; }
.nameForm .note { text-align: center; margin-top: 18px; font-size: 21px; }

/* メンテナンス画面 */
#maint { inset: -6px; z-index: 50; background: rgba(8,12,9,.94); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 0 70px; text-align: center; }
#maint img { width: 200px; opacity: .8; margin-bottom: 20px; }
#maint h2 { margin: 0; font-size: 44px; letter-spacing: .1em; }
#maint p { margin: 0; font-size: 28px; line-height: 1.7; white-space: pre-line; }
#maint .note { font-size: 24px; color: var(--gold); }
#maint .btn { margin-top: 30px; width: 360px; flex: none; }
.optUid { margin-top: 22px; display: flex; align-items: center; gap: 16px; font-size: 24px; font-weight: 700; color: var(--ink-dim); }
.optUid b { flex: 1; font-size: 30px; color: var(--ink); letter-spacing: .08em; user-select: text; -webkit-user-select: text; }
.optUid button { padding: 10px 22px; border-radius: 999px; font-size: 21px; font-weight: 700; background: rgba(255,255,255,.14); border: 1px solid var(--line); }
/* 引き継ぎ（パスワードの設定・べつの端末のデータを受け取る） */
.nameForm .uidBox { margin-top: 8px; padding: 14px 20px; border-radius: 18px; background: rgba(0,0,0,.22); font-size: 34px; font-weight: 700; letter-spacing: .12em; text-align: center;
  color: var(--ink); user-select: text; -webkit-user-select: text; }
.modalBox .warn { color: var(--gold); font-size: 22px; line-height: 1.6; }
.modalBox .formErr { min-height: 30px; margin: 12px 0 0; color: #ff9d8a; font-size: 22px; font-weight: 700; }
#btnTransfer { position: absolute; left: 50%; bottom: 92px; translate: -50% 0; padding: 14px 44px; border-radius: 999px; font-size: 24px; font-weight: 700; letter-spacing: .1em;
  color: var(--ink); background: rgba(0,0,0,.38); border: 1px solid rgba(255,255,255,.28); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
#btnTransfer:active { transform: scale(.96); }

/* はじめてのプレゼント */
.modalBox .giftMsg { font-size: 23px; line-height: 1.7; }
.modalBox .gift { font-size: 30px; margin: 6px 0; }
.modalBox .gift b { color: var(--moss); }

/* ---------- 株分け・依頼帖・苔庭・銘苔（MVP19） ---------- */
/* 株分けできる苔の頭の上の芽（タップで株分け） */
#items .kkabu { position: absolute; width: 48px; height: 48px; margin: -48px 0 0 -24px; pointer-events: none; border-radius: 50%;
  background: radial-gradient(circle at 50% 60%, rgba(255,255,255,.95) 0 46%, rgba(255,255,255,0) 48%);
  filter: drop-shadow(0 0 8px rgba(190,240,120,.95)) drop-shadow(0 3px 4px rgba(0,0,0,.45)); animation: kobitoCoin 1.1s ease-in-out infinite; }
#items .kkabu::before { content: ""; position: absolute; inset: 8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 30V16' stroke='%235f8a2a' stroke-width='3' stroke-linecap='round'/%3E%3Cpath d='M16 17C16 9 10 5 3 6c0 7 5 11 13 11z' fill='%237fb03a'/%3E%3Cpath d='M16 14c0-7 5-11 13-10 0 7-5 10-13 10z' fill='%239cc24a'/%3E%3C/svg%3E") center / contain no-repeat; }
#info .bar.kabu i { background: linear-gradient(90deg, #b8d86a, #e8f0a0); }

/* 依頼帖（ミッションの「依頼帖」タブ） */
.reqHead { display: flex; justify-content: space-between; align-items: baseline; margin: 6px 4px 0; }
.reqHead b { font-size: 28px; }
.reqHead span { font-size: 21px; color: var(--ink-dim); }
.reqAll { margin: 4px 4px 8px; font-size: 21px; color: var(--gold); }
.mission.req .client { color: var(--moss); margin: 0 0 4px; font-size: 19px; }
.kabuStock { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 16px; }
.kabuChip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 14px 4px 6px; border-radius: 999px; background: rgba(255,255,255,.1); font-size: 21px; font-weight: 700; }
.kabuChip img { width: 40px; height: 32px; object-fit: contain; }
#missionList .empty, #gPanel .empty { color: var(--ink-dim); font-size: 21px; text-align: center; line-height: 1.6; }

/* 苔庭 */
#garden { z-index: 6; }
#gGarden, #gBook { flex: 1; overflow-y: auto; touch-action: pan-y; }
#gView { position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: 22px; overflow: hidden; background: #3a3022; }
#gView .gBase { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#gPlots .gPlot { position: absolute; inset: 0; background: url("../assets/ui/garden_moss.jpg") center / cover no-repeat; animation: plotIn 1.2s ease-out; }
@keyframes plotIn { from { opacity: 0; } }
/* 画像が無いあいだの代わりの絵: 土色の地面と、苔色の区画 */
#garden.noimg #gView { background: radial-gradient(ellipse at 50% 30%, #6e5a3e, #4a3b28 70%), #4a3b28; }
#garden.noimg #gView::before { content: ""; position: absolute; inset: 0; opacity: .5;
  background: repeating-radial-gradient(circle at 30% 40%, rgba(0,0,0,.08) 0 3px, transparent 3px 9px); }
#garden.noimg #gPlots .gPlot { background: radial-gradient(circle at 30% 30%, #8fbf4a, #4f7f24 60%, #3c6a1c); }
#gPins .gPin { position: absolute; width: 50px; height: 50px; margin: -25px 0 0 -25px; border-radius: 50%; font-size: 24px; font-weight: 700;
  background: rgba(30,26,20,.75); border: 3px solid rgba(255,255,255,.6); box-shadow: 0 3px 8px rgba(0,0,0,.5); }
#gPins .gPin.done { background: var(--moss-deep); border-color: #dff0b0; }
#gPins .gPin.now { background: #b98a2a; border-color: #ffe7a0; animation: pinPulse 1.4s ease-in-out infinite; }
#gPins .gPin.lock { opacity: .55; }
#gPins .gPin.sel { outline: 4px solid #fff; outline-offset: 2px; }
@keyframes pinPulse { 50% { transform: scale(1.12); } }
#gStatus { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 4px 4px; font-size: 21px; color: var(--ink-dim); }
#gStatus b { color: var(--ink); }
#gStatus .gBonus { flex-basis: 100%; color: var(--gold); }
#gStatus .gBonus::before { content: "庭の恵み："; }
#gPanel { padding: 10px 4px; }
#gPanel .gTitle { display: flex; justify-content: space-between; align-items: baseline; }
#gPanel .gTitle b { font-size: 30px; }
#gPanel .gTitle span { font-size: 20px; padding: 2px 14px; border-radius: 999px; background: rgba(255,255,255,.12); }
#gPanel .gEffect { margin: 6px 0; color: var(--gold); font-size: 22px; }
#gPanel .note { font-size: 21px; line-height: 1.6; }
#gPanel .gNeed { display: flex; gap: 24px; font-size: 22px; }
#gPanel .gNeed b { font-size: 28px; }
#gPanel .gBar { height: 16px; border-radius: 8px; background: rgba(0,0,0,.3); overflow: hidden; margin: 8px 0 12px; }
#gPanel .gBar i { display: block; height: 100%; background: linear-gradient(90deg, var(--moss-deep), var(--moss)); transition: width .4s; }
#gPanel .gStock { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
#gPanel .gKabu { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 18px;
  background: rgba(255,255,255,.1); border: 1px solid var(--line); font-size: 19px; }
#gPanel .gKabu img { width: 90px; height: 60px; object-fit: contain; }
#gPanel .gKabu b { font-size: 20px; }
#gPanel .gKabu em { font-style: normal; font-weight: 700; padding: 2px 16px; border-radius: 999px; background: var(--moss-deep); }
#gPanel .gKabu:disabled { opacity: .4; }
/* 銘苔図鑑 */
#gBook .note { font-size: 21px; line-height: 1.6; }
#gBook .note b { color: var(--gold); }
.meiGrid { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.meiRow { display: grid; grid-template-columns: 170px repeat(3, 1fr); align-items: center; gap: 8px; padding: 6px 10px; border-radius: 18px; background: rgba(255,255,255,.06); }
.meiRow > b { font-size: 21px; }
.mei { display: flex; flex-direction: column; align-items: center; font-size: 19px; font-weight: 700; }
.mei img { width: 110px; height: 70px; object-fit: contain; filter: brightness(0) opacity(.35); }
.mei.got img { filter: drop-shadow(0 3px 4px rgba(0,0,0,.4)); }
/* 遊び方（タイトルの「遊び方」）: もくじは2列のボタン */
.guideToc { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-height: 760px; overflow-y: auto; text-align: left; }
.guideToc .btn { display: flex; align-items: center; gap: 12px; margin: 0; padding: 16px 18px; font-size: 22px; line-height: 1.35; text-align: left; }
.guideToc .btn b { flex: none; width: 38px; height: 38px; line-height: 38px; border-radius: 50%; text-align: center; background: var(--gold); color: #3a2a08; font-size: 20px; }

/* おてがみ（運営とのやりとり）: 受信箱・送信箱の一覧と、1通を開いたところ */
#letters { z-index: 6; }
#lBody { flex: 1; overflow-y: auto; touch-action: pan-y; }
.lItem { position: relative; display: block; width: 100%; margin: 0 0 12px; padding: 16px 52px 16px 20px; border-radius: 18px; background: rgba(255,255,255,.08); text-align: left; font-size: 24px; line-height: 1.5; }
.lItem small { display: block; margin-bottom: 4px; color: var(--ink-dim); font-size: 19px; }
.lItem.unread::after { content: ""; position: absolute; top: 20px; right: 20px; width: 18px; height: 18px; border-radius: 50%; background: var(--danger); }
.lItem .lTag { margin-left: 10px; padding: 1px 10px; border-radius: 999px; background: var(--moss-deep); color: #fff; font-size: 17px; }
.lNew { width: 100%; margin: 0 0 6px; padding: 18px; font-size: 26px; }
#lBody .note { margin: 4px 0 16px; text-align: center; }
.modalBox:has(.letterView) { width: 680px; }
.letterView { max-height: 780px; overflow-y: auto; text-align: left; touch-action: pan-y; }
.letterView h2 { text-align: center; }
.letterView .lMine, .letterView .lReply { margin: 12px 0; padding: 14px 18px; border-radius: 16px; font-size: 23px; line-height: 1.7; }
.letterView .lMine { background: rgba(255,255,255,.08); }
.letterView .lReply { background: rgba(156,194,74,.16); border-left: 5px solid var(--moss); }
.letterView small { display: block; color: var(--ink-dim); font-size: 18px; }
.letterView p { margin: 4px 0 0; word-break: break-word; }
.letterView .note { text-align: center; }
textarea.letterText { width: 100%; height: 320px; margin-top: 8px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.08); color: inherit; font: inherit; font-size: 24px; line-height: 1.6; resize: none; }
