/*
  試作デザイン案2「革とベージュ」(?theme=leather)
  - 画面の組み方・動きは「夜空の占い館」と共通（theme-cosmic.css / fx.js）。ここでは見た目だけ上書きする
  - ベージュの紙の地に、コニャック色の革・ステッチ・金の箔押しで、革小物ブランドのような落ち着いた質感に
*/
:root.cosmic.leather {
  --bg: #f3ece1;
  --bg2: #ebe2d4;
  --card: #fbf7f0;
  --glass: #fbf7f0;
  --ink: #3a2a1f;
  --muted: #8b7865;
  --accent: #8a5a36;
  --accent2: #6b4a33;
  --gold: #a8844f;
  --accent-ink: #f6ead8;
  --border: #e2d6c4;
  --yes: #8a5a36;
  --no: #6f6257;
  --unk: #a8988a;
  --shadow: 0 10px 30px rgba(80, 50, 20, .08);
  --red: #a3352f;
  --leather: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .1 0 0 0 0 .06 0 0 0 0 .03 0 0 0 .9 -.35'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"), linear-gradient(160deg, #9a6a43, #7b4d2c 55%, #5e3a22);
  --leather-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .1 0 0 0 0 .06 0 0 0 0 .03 0 0 0 .22 -.1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"), linear-gradient(160deg, #f4e7d2, #ead9bd);
  --serif: 'Shippori Mincho B1', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --latin: 'Cormorant Garamond', 'Shippori Mincho B1', serif;
  color-scheme: light;
}
:root.cosmic.leather { background: #f3ece1; }
:root.cosmic.leather body { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .25 0 0 0 0 .15 0 0 0 .35 -.12'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"), radial-gradient(120% 60% at 50% 0%, #f8f3ea, #efe6d8 70%); background-attachment: fixed; color: var(--ink); }
:root.cosmic.leather body::before, :root.cosmic.leather body::after { display: none; }

/* ---------- 文字 ---------- */
:root.cosmic.leather h1 { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--ink); font-family: var(--serif); font-weight: 800; letter-spacing: .06em; }
:root.cosmic.leather:lang(en) h1 { font-family: var(--latin); font-weight: 700; letter-spacing: .02em; }
:root.cosmic.leather .tagline { color: var(--muted); font-family: var(--serif); font-weight: 600; letter-spacing: .14em; text-transform: none; }
:root.cosmic.leather:lang(en) .tagline { font-family: var(--latin); font-size: 14px; letter-spacing: .06em; font-style: italic; }
:root.cosmic.leather .label { color: var(--accent); letter-spacing: .14em; font-family: var(--serif); }
:root.cosmic.leather .label::before { content: ''; width: 14px; height: 1px; background: var(--gold); text-shadow: none; flex: none; }
:root.cosmic.leather .lead, :root.cosmic.leather .hint { color: var(--muted); }

/* ---------- ヘッダー ---------- */
:root.cosmic.leather .brand { font-size: 0; color: transparent; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23f1d9a2'/%3E%3Cstop offset='.5' stop-color='%23c9a15e'/%3E%3Cstop offset='1' stop-color='%23946c33'/%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='12' cy='9' r='4.2' fill='url(%23g)'/%3E%3Cpath d='M9.7 11.5 8.4 19.5h7.2l-1.3-8z' fill='url(%23g)'/%3E%3C/svg%3E")  center / 70% no-repeat, var(--leather); border: 0; box-shadow: 0 4px 10px rgba(70, 40, 20, .2); outline: 1px dashed rgba(240, 220, 190, .6); outline-offset: -4px; }
:root.cosmic.leather .lang, :root.cosmic.leather .back { background: #fffdf9; color: var(--ink); border: 1px solid #d9cab4; box-shadow: 0 2px 6px rgba(80, 50, 20, .06); }
:root.cosmic.leather #app:has(> main > .hero:not(.hero-small)) .lang::before { color: var(--accent); font-family: var(--latin); font-size: 14px; font-weight: 700; }

/* ---------- パネル（クリーム色の厚紙にステッチ） ---------- */
:root.cosmic.leather .card, :root.cosmic.leather .panel {
  background: #fbf7f0; border: 1px solid #e2d6c4; border-radius: 18px;
  box-shadow: 0 1px 0 #fff inset, 0 12px 30px rgba(80, 50, 20, .08);
}
:root.cosmic.leather .panel::before, :root.cosmic.leather .card::before {
  inset: 6px; padding: 0; border-radius: 13px; background: none; -webkit-mask: none; mask: none; opacity: 1;
  border: 1px dashed rgba(150, 115, 80, .4);
}

/* ---------- タイル・入力（選ぶと革のタブになる） ---------- */
:root.cosmic.leather .tile, :root.cosmic.leather .chip, :root.cosmic.leather .pick-pill, :root.cosmic.leather input.name-input { background: #f6efe4; border: 1px solid #e4d8c6; color: var(--ink); }
:root.cosmic.leather .tile { border-radius: 12px; }
:root.cosmic.leather .tile:hover { background: #efe5d6; }
:root.cosmic.leather .tile .ti { filter: sepia(.25) saturate(.85); }
:root.cosmic.leather .tile.on, :root.cosmic.leather .chip.on {
  background: var(--leather); border-color: #5e3a22; color: #f6ead8;
  box-shadow: 0 6px 14px rgba(70, 40, 20, .25), inset 0 1px 0 rgba(255, 255, 255, .18);
  outline: 1px dashed rgba(240, 220, 190, .65); outline-offset: -5px;
}
:root.cosmic.leather .tile.on .ti { transform: translateY(-1px) scale(1.06); filter: none; }
:root.cosmic.leather .tile:active { box-shadow: inset 0 2px 6px rgba(70, 40, 20, .2); }
:root.cosmic.leather .pick-pill { color: var(--muted); background: #fffdf9; }
:root.cosmic.leather .pick-pill.on { border-color: var(--accent); box-shadow: none; }
:root.cosmic.leather .pick-pill select { color: var(--ink); }
:root.cosmic.leather .pick-pill select option { background: #fff; color: var(--ink); }
:root.cosmic.leather .pick-pill::after { color: var(--gold); }
:root.cosmic.leather input.name-input { background: #fffdf9; border-radius: 12px; }
:root.cosmic.leather input.name-input::placeholder { color: #b9a892; }
:root.cosmic.leather input.name-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(138, 90, 54, .12); }
:root.cosmic.leather .pick-note { color: var(--muted); }
:root.cosmic.leather .link, :root.cosmic.leather .mine-link { background: #f7f1e7; border-color: #d9cab4; color: var(--muted); }

/* ---------- ボタン（コニャックの革にステッチと型押し文字） ---------- */
:root.cosmic.leather .btn { background: #fffdf9; border: 1px solid #d9cab4; color: var(--ink); border-radius: 12px; }
:root.cosmic.leather .btn.primary {
  background: var(--leather); color: #f6ead8; border-radius: 14px;
  font-family: var(--serif); font-weight: 800; letter-spacing: .14em;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, .35), 0 1px 0 rgba(255, 255, 255, .12);
  box-shadow: 0 10px 22px rgba(70, 40, 20, .28), inset 0 1px 0 rgba(255, 255, 255, .2);
  outline: 1px dashed rgba(240, 220, 190, .7); outline-offset: -6px;
}
:root.cosmic.leather .btn.primary::after { background: linear-gradient(110deg, transparent 40%, rgba(255, 240, 220, .18) 50%, transparent 60%); animation-duration: 6s; }
:root.cosmic.leather .btn.primary:active { transform: translateY(1px) scale(.99); box-shadow: 0 4px 10px rgba(70, 40, 20, .25), inset 0 2px 6px rgba(0, 0, 0, .25); }
:root.cosmic.leather .btn.primary small { color: #e9d6ba; opacity: .9; letter-spacing: .06em; font-family: 'M PLUS Rounded 1c', sans-serif; font-weight: 500; text-shadow: none; }
:root.cosmic.leather .sub { color: var(--muted); }
:root.cosmic.leather .bulk-toggle { background: #fffdf9; color: var(--accent); border-color: #d9cab4; }
:root.cosmic.leather .sent-link { color: var(--accent); }
:root.cosmic.leather .legal, :root.cosmic.leather .legal a { color: var(--muted); }

/* ---------- 紋章（水晶玉の代わり: 革の丸いタグに金の鍵穴） ---------- */
:root.cosmic.leather .crystal {
  background: var(--leather); animation: none;
  box-shadow: 0 8px 18px rgba(70, 40, 20, .28), inset 0 1px 0 rgba(255, 255, 255, .2), inset 0 -3px 8px rgba(0, 0, 0, .25);
}
:root.cosmic.leather .crystal .neb { display: none; }
:root.cosmic.leather .crystal .shine {
  left: 11%; top: 11%; width: 78%; height: 78%; border-radius: 50%; transform: none;
  border: 1px dashed rgba(240, 220, 190, .7);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23f1d9a2'/%3E%3Cstop offset='.5' stop-color='%23c9a15e'/%3E%3Cstop offset='1' stop-color='%23946c33'/%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='12' cy='9' r='4.2' fill='url(%23g)'/%3E%3Cpath d='M9.7 11.5 8.4 19.5h7.2l-1.3-8z' fill='url(%23g)'/%3E%3C/svg%3E") center / 72% no-repeat;
}
:root.cosmic.leather .crystal .dots { /* ときどき革の上を光がなでる */
  background: linear-gradient(110deg, transparent 40%, rgba(255, 240, 220, .22) 50%, transparent 60%);
  transform: translateX(-120%); animation: btn-shine 7s ease-in-out infinite 2s;
}
:root.cosmic.leather .crystal-base, :root.cosmic.leather .crystal-wrap::after { display: none; }
:root.cosmic.leather .crystal-wrap { height: var(--size, 132px); }
:root.cosmic.leather main > .hero:not(.hero-small) .hero-art.cosmic-hero { height: 60px; }
:root.cosmic.leather .stage-art .orb { filter: drop-shadow(0 8px 12px rgba(80, 50, 20, .18)); }
:root.cosmic.leather .stage-art .orb::before { background: radial-gradient(closest-side, rgba(214, 191, 148, .45), transparent); }
:root.cosmic.leather .stage-art .spark, :root.cosmic.leather .stage-art .letter { filter: drop-shadow(0 4px 6px rgba(80, 50, 20, .15)); }
:root.cosmic.leather .loader-stage p { color: var(--gold); }

/* ---------- 使い方 ---------- */
:root.cosmic.leather .howto { background: #f7f0e5; border: 1px solid #e2d6c4; }
:root.cosmic.leather .howto-title { color: var(--accent); font-family: var(--serif); letter-spacing: .1em; }
:root.cosmic.leather .howto-open, :root.cosmic.leather .howto-note { color: var(--muted); }
:root.cosmic.leather .howto-open::after { color: var(--gold); }
:root.cosmic.leather .howto-lead { color: var(--ink); font-family: var(--serif); }
:root.cosmic.leather .howto-steps li { color: var(--ink); }
:root.cosmic.leather .howto-ic { background: #fffdf9; border-color: var(--gold); }
:root.cosmic.leather .howto-steps li:not(:last-child)::after { border-left-color: rgba(168, 132, 79, .5); }

/* ---------- 真ん中に寄せる画面 ---------- */
:root.cosmic.leather .chips li { background: #fbf7f0; border-color: #e2d6c4; color: var(--muted); }
:root.cosmic.leather .done-pill { background: #e8efe2; color: #4b6b45; border-color: #c9d8c1; box-shadow: none; }
:root.cosmic.leather .opt-tag { border-color: #d9cab4; color: var(--muted); }
:root.cosmic.leather .hint-box { background: #fbf7f0; border: 1px solid var(--gold); box-shadow: var(--shadow); }
:root.cosmic.leather .hint-box strong { color: var(--accent); text-shadow: none; font-family: var(--serif); }

/* ---------- 答える側: 生成りの革カード ---------- */
:root.cosmic.leather .progress { background: #e5dccd; }
:root.cosmic.leather .progress span { background: linear-gradient(90deg, #b08d57, #8a5a36); box-shadow: none; }
:root.cosmic.leather .progress span::after { content: '◆'; font-size: 10px; color: var(--gold); text-shadow: none; animation: none; right: -5px; }
:root.cosmic.leather .card-bg { background: #efe6d8; border: 1px solid #e0d3bf; }
:root.cosmic.leather .qcard {
  color: var(--ink); background: var(--leather-light);
  border: 1px solid #d8c4a4;
  box-shadow: 0 18px 40px rgba(80, 50, 20, .18), inset 0 1px 0 rgba(255, 255, 255, .6);
}
:root.cosmic.leather .qcard::before { border: 1px dashed rgba(138, 90, 54, .45); background: none; }
:root.cosmic.leather .qcard::after { display: none; }
:root.cosmic.leather .qemoji { filter: drop-shadow(0 6px 8px rgba(80, 50, 20, .18)); }
:root.cosmic.leather .qemoji::before { border: 1px solid rgba(168, 132, 79, .5); box-shadow: 0 0 0 6px rgba(255, 253, 249, .6); background: #fffdf9; animation: none; }
:root.cosmic.leather .qnum { font-family: var(--latin); color: var(--accent); text-shadow: none; font-size: 15px; }
:root.cosmic.leather .qtext { color: var(--ink); text-shadow: none; font-family: var(--serif); font-weight: 800; letter-spacing: .03em; }
:root.cosmic.leather .stamp { background: #fffdf9; box-shadow: 0 4px 10px rgba(80, 50, 20, .12); }
:root.cosmic.leather .tip-text { background: var(--ink); color: #f6ead8; }
:root.cosmic.leather .round { background: #fffdf9; color: var(--ink); border: 1px solid #ddd0bc; box-shadow: 0 4px 10px rgba(80, 50, 20, .08); }
:root.cosmic.leather .round.mid { color: var(--accent); }
:root.cosmic.leather .arrow { filter: drop-shadow(0 6px 10px rgba(70, 40, 20, .2)); }
:root.cosmic.leather .arrow.yes { background: var(--leather); color: #f6ead8; }
:root.cosmic.leather .arrow.no { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .1 0 0 0 0 .06 0 0 0 0 .03 0 0 0 .9 -.35'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"), linear-gradient(160deg, #8c7d6f, #66594e); color: #f3ece1; }
:root.cosmic.leather .swipe-hint { color: var(--muted); }

/* ---------- 伝書鳩・予告・モーダル ---------- */
:root.cosmic.leather .pigeon-stage { background: radial-gradient(circle at 50% 55%, rgba(251, 247, 240, .95), rgba(239, 230, 216, .95)); }
:root.cosmic.leather .heart { color: var(--accent); text-shadow: none; }
:root.cosmic.leather .sent-toast { background: #fffdf9; border-color: #e2d6c4; color: var(--ink); }
:root.cosmic.leather .img-modal-box { background: #fffdf9; border-color: #e2d6c4; }
:root.cosmic.leather .warn { background: #f6ecd6; color: #7a5a2a; border-color: #e6d3a8; }

/* ---------- 結果 ---------- */
:root.cosmic.leather .pick { background: #fffdf9; border: 1px solid #e2d6c4; border-radius: 16px; box-shadow: 0 10px 24px rgba(80, 50, 20, .08); }
:root.cosmic.leather .pick:first-child { border-color: var(--gold); box-shadow: 0 14px 30px rgba(80, 50, 20, .14); outline: 1px dashed rgba(168, 132, 79, .55); outline-offset: -6px; }
:root.cosmic.leather .pick::before { background: linear-gradient(110deg, transparent 35%, rgba(255, 245, 225, .8) 50%, transparent 65%); }
:root.cosmic.leather .pick h3 { font-family: var(--serif); font-weight: 800; }
:root.cosmic.leather .rank { background: var(--leather); color: #f6ead8; box-shadow: none; font-family: var(--latin); font-size: 14px; }
:root.cosmic.leather .reason { color: var(--muted); }
:root.cosmic.leather .stores .btn.amazon { border-color: #d9a55a; }
:root.cosmic.leather .stores .btn.rakuten { color: #a3352f; border-color: #d9a29d; }
:root.cosmic.leather .fb-fit, :root.cosmic.leather .fb-none { background: #fffdf9; color: var(--muted); border-color: #d9cab4; }
:root.cosmic.leather .fb-fit.on, :root.cosmic.leather .fb-none.on, :root.cosmic.leather .fb-reactions .btn.on { background: var(--leather); color: #f6ead8; border-color: #5e3a22; }
:root.cosmic.leather .fb-lead { background: #f4ede2; }
:root.cosmic.leather .fb-status { color: var(--accent); }
:root.cosmic.leather .others summary, :root.cosmic.leather .for-whom { color: var(--accent); }
:root.cosmic.leather .badge { background: #f4ede2; color: var(--muted); border-color: #e2d6c4; }
:root.cosmic.leather .badge.ok { background: var(--leather); color: #f6ead8; }
:root.cosmic.leather .try-others { border-color: var(--gold); }
:root.cosmic.leather .debug { background: #f4ede2; }

/* ---------- 広告枠 ---------- */
:root.cosmic.leather .ad { border-color: #d9cab4; color: #b3a28c; }
:root.cosmic.leather .ad-banner { background: rgba(243, 236, 225, .95); border-top: 1px solid #e2d6c4; }
:root.cosmic.leather .fx-spark { text-shadow: none; }
:root.cosmic.leather .giver-hint { margin: 12px 0 14px; text-align: left; }
:root.cosmic.leather .giver-hint .hint { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
:root.cosmic.leather .giver-hint { padding: 12px 14px; }
:root.cosmic.leather .giver-hint strong { font-size: 15px; line-height: 1.55; }
:root.cosmic.leather .guide-card { background: var(--leather-light); border: 1px solid var(--gold); outline: 1px dashed rgba(138, 90, 54, .45); outline-offset: -6px; }
:root.cosmic.leather .guide-card-text b { font-family: var(--serif); color: var(--accent); }
:root.cosmic.leather .brand .key-badge { display: none; }
