/* ABC2Tab — mobile-first styles
   Warm/folk minimal palette, system fonts, big tap targets. */

:root{
  --ink:#3a3027;
  --soft:#7d7164;
  --line:#e7ddcd;
  --paper:#fdf8ee;
  --card:#ffffff;
  --wood:#c07f3c;
  --wood-d:#a4662a;
  --ok:#2f7d4f;
  --err-bg:#fdeee9;
  --err-line:#e3a99f;
  --err-ink:#a4452f;
  --shadow:0 6px 22px rgba(120,90,50,.10);
  --radius:14px;
  --tap:44px;
}

*{ box-sizing:border-box; }
/* hidden 属性は display 指定より優先（.placeholder/.dl 等の display:flex に負けないように） */
[hidden]{ display:none !important; }
html,body{ margin:0; padding:0; }
html{ scroll-behavior:smooth; }
body{
  font-family:-apple-system,BlinkMacSystemFont,"Hiragino Maru Gothic ProN",
              "Hiragino Kaku Gothic ProN","Yu Gothic","Segoe UI",Roboto,sans-serif;
  color:var(--ink);
  background:linear-gradient(180deg,#fdf8ee,#f7eedd);
  min-height:100vh;
  font-size:16px;
  line-height:1.5;
  -webkit-text-size-adjust:100%;
}

/* ---------- header ---------- */
.topbar{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:14px 16px;
  border-bottom:1px solid var(--line);
  background:#fffdf8;
}
.brand h1{ margin:0; font-size:22px; letter-spacing:.02em; }
.brand .tagline{ margin:2px 0 0; color:var(--soft); font-size:13px; }

.account-bar{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  font-size:13px;
  color:var(--soft);
}
.global-language-switch{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:3px;
  padding:3px;
  border:1px solid var(--line);
  border-radius:11px;
  background:#f1e8d8;
}
.global-language-switch button{
  min-height:38px;
  padding:6px 12px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:var(--soft);
  font:inherit;
  font-size:13px;
  font-weight:800;
  cursor:pointer;
}
.global-language-switch button.active{
  color:var(--wood-d);
  background:#fff;
  box-shadow:0 1px 4px rgba(70,47,28,.14);
}
.global-language-switch button:focus-visible{
  outline:2px solid var(--wood);
  outline-offset:2px;
}
.review-account-link{
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding:6px 10px;
  border-radius:9px;
  border:1.5px solid var(--wood);
  background:#fff3df;
  color:var(--wood-d);
  font-weight:800;
  text-decoration:none;
}
.review-account-link:active{ transform:translateY(1px); }
.acct-usage{ font-variant-numeric:tabular-nums; }
.badge{
  display:inline-block;
  padding:2px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  background:#f1e8d8;
  color:var(--wood-d);
  border:1px solid var(--line);
}
.badge.pro{ background:var(--wood); color:#fff; border-color:var(--wood); }
.acct-email{ font-size:12px; }

/* ---------- warning banner ---------- */
.warn{
  margin:12px 16px 0;
  padding:12px 14px;
  background:#fff4d6;
  border:1px solid #ecca6e;
  color:#7a5c00;
  border-radius:var(--radius);
  font-size:13.5px;
}
.warn code{ background:#fff; padding:1px 5px; border-radius:5px; }

/* ---------- layout ---------- */
.wrap{
  max-width:760px;
  margin:0 auto;
  padding:16px;
  display:flex;
  flex-direction:column;
  gap:16px;
}

/* ---------- PC左サイドバー（モバイルは非表示・既存レイアウト維持） ---------- */
.sidebar{ display:none; }
@media (min-width:980px){
  .layout{
    display:flex; gap:22px; align-items:flex-start;
    max-width:1180px; margin:0 auto; padding:0 16px;
  }
  .layout > .wrap{ flex:1 1 auto; max-width:none; margin:0; padding:16px 0; }
  .sidebar{
    display:flex; flex-direction:column; gap:3px;
    position:sticky; top:16px; flex:0 0 212px; width:212px;
    margin-top:16px; padding:14px 10px;
    background:#fffdf8; border:1.5px solid var(--line); border-radius:14px;
  }
  .side-brand{ font-weight:800; font-size:16px; padding:4px 10px 10px; color:var(--wood-d); }
  .sidebar a{
    text-decoration:none; color:var(--ink); font-weight:600; font-size:14px;
    padding:9px 11px; border-radius:9px;
  }
  .sidebar a:hover{ background:#fff3df; color:var(--wood-d); }
}
.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow:var(--shadow);
  padding:16px;
}
.card h2{ margin:0 0 12px; font-size:17px; }

/* ---------- form elements ---------- */
label{
  display:block;
  font-size:13px;
  font-weight:600;
  margin:0 0 6px;
}
.hint{ font-size:12.5px; color:var(--soft); margin:6px 0 0; }
.hint.center{ text-align:center; }

textarea{
  width:100%;
  min-height:200px;
  padding:12px;
  border:1.5px solid var(--line);
  border-radius:12px;
  font-family:"SF Mono",Menlo,Consolas,monospace;
  font-size:14px;
  line-height:1.55;
  background:#fffdf8;
  color:var(--ink);
  resize:vertical;
}
input[type=text],input[type=email],input[type=password],input[type=search],input[type=file],select{
  width:100%;
  min-height:var(--tap);
  padding:10px 12px;
  border:1.5px solid var(--line);
  border-radius:11px;
  font-size:16px; /* >=16px avoids iOS zoom-on-focus */
  background:#fffdf8;
  color:var(--ink);
}
input[type=file]{ padding:9px 12px; }
textarea:focus,input:focus,select:focus{
  outline:none;
  border-color:var(--wood);
  box-shadow:0 0 0 3px rgba(192,127,60,.15);
}

.field{ margin-top:14px; }

/* ---------- The Session tune search ---------- */
.the-session-search{
  margin:0 0 16px;
  padding:13px;
  border:1.5px solid var(--line);
  border-radius:14px;
  background:#fffaf1;
}
.the-session-search h3{ margin:0; font-size:15px; }
.tune-search-form{ margin-top:12px; }
.tune-search-row{ display:flex; flex-direction:column; gap:8px; }
.tune-search-row input{ min-width:0; }
.the-session-search .tune-search-row .go.small{
  width:100%; min-height:var(--tap); margin:0;
}
.tune-search-status{
  margin-top:10px;
  padding:9px 11px;
  border-radius:10px;
  background:#f3ede3;
  color:var(--soft);
  font-size:13px;
}
.tune-search-status.loading{ background:#fff4d6; color:#7a5c00; }
.tune-search-status.error{ background:var(--err-bg); color:var(--err-ink); }
.tune-search-status.ok{ background:#eef8f1; color:var(--ok); }
.tune-search-choices{ display:flex; flex-direction:column; gap:8px; margin-top:8px; }
.tune-search-choice{
  width:100%;
  min-height:52px;
  padding:10px 12px;
  border:1.5px solid var(--line);
  border-radius:11px;
  background:#fff;
  color:var(--ink);
  text-align:left;
  cursor:pointer;
}
.tune-search-choice:hover,.tune-search-choice:focus-visible{
  border-color:var(--wood);
  background:#fff7e9;
  outline:none;
}
.tune-search-choice:disabled{ opacity:.55; cursor:default; }
.tune-choice-name{ display:block; font-size:15px; font-weight:700; color:var(--wood-d); }
.tune-choice-meta{ display:block; margin-top:2px; font-size:12px; color:var(--soft); }
.tune-search-selected{
  padding:9px 11px;
  border:1px solid #9dcdb0;
  border-radius:10px;
  background:#f5fbf7;
  font-size:13px;
}
.tune-search-source{ margin:10px 0 0; font-size:12px; color:var(--soft); }
.tune-search-source a{ color:var(--wood-d); font-weight:700; overflow-wrap:anywhere; }

@media (min-width:600px){
  .tune-search-row{ flex-direction:row; align-items:stretch; }
  .tune-search-row input{ flex:1 1 auto; }
  .the-session-search .tune-search-row .go.small{ width:auto; flex:0 0 auto; }
}

.controls{
  display:flex;
  flex-direction:column;
  gap:14px;
  margin-top:6px;
}

/* ---------- example chips ---------- */
.examples{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  margin-top:12px;
}
.examples-label{ font-size:12.5px; color:var(--soft); }
.chip{
  min-height:38px;
  padding:6px 14px;
  border-radius:999px;
  border:1.5px solid var(--line);
  background:#fff7ec;
  color:var(--wood-d);
  font-size:13px;
  font-weight:600;
  cursor:pointer;
}
.chip:hover{ border-color:var(--wood); }

/* ---------- ABC audio playback ---------- */
.playback-panel{
  margin-top:14px;
  padding:12px;
  border:1.5px solid var(--line);
  border-radius:12px;
  background:#fffaf1;
}
.playback-panel > strong{ display:block; font-size:14px; }
.playback-actions,.record-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:9px;
}
.playback-actions .go,.record-actions .go{ flex:1 1 140px; }
.playback-score{
  position:absolute;
  left:-10000px;
  width:720px;
  height:1px;
  overflow:hidden;
}

/* ---------- uploaded/recorded audio ---------- */
#audio-preview{
  display:block;
  width:100%;
  margin-top:10px;
}
.record-panel{
  margin-top:10px;
  padding:10px 12px;
  border:1.5px dashed var(--line);
  border-radius:12px;
  background:#fffdf8;
}
.record-panel.recording{
  border-color:#c95745;
  background:#fff4f1;
}

/* ---------- buttons ---------- */
.go{
  margin-top:16px;
  width:100%;
  min-height:var(--tap);
  padding:13px;
  border:none;
  border-radius:var(--radius);
  background:var(--wood);
  color:#fff;
  font-size:16px;
  font-weight:700;
  cursor:pointer;
  letter-spacing:.02em;
  box-shadow:var(--shadow);
  transition:background .12s,transform .12s,opacity .12s;
}
.go:hover{ background:var(--wood-d); }
.go:active{ transform:translateY(1px); }
.go:disabled{ opacity:.55; cursor:default; }
.go.secondary{ background:#fff7ec; color:var(--wood-d); border:1.5px solid var(--line); box-shadow:none; }
.go.secondary:hover{ border-color:var(--wood); background:#fff; }
.go.ghost{ background:none; color:var(--soft); border:1.5px solid var(--line); box-shadow:none; }
.go.ghost:hover{ color:var(--ink); }

/* ---------- messages ---------- */
.msg{
  margin-top:14px;
  padding:12px 14px;
  border:1.5px solid var(--err-line);
  background:var(--err-bg);
  border-radius:12px;
  color:var(--err-ink);
  font-size:13.5px;
  white-space:pre-wrap;
  display:none;
}
.msg.show{ display:block; }
.msg.ok{ border-color:#9dcdb0; background:#eef8f1; color:var(--ok); }

/* ---------- result ---------- */
.view .placeholder{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  gap:8px;
  min-height:200px;
  color:var(--soft);
  padding:20px;
}
.placeholder .big{ font-size:42px; }

.result-meta{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:10px;
}
.result-title{ font-weight:700; font-size:15px; }
.wm-note{
  font-size:11.5px;
  color:var(--soft);
  background:#f1e8d8;
  padding:2px 8px;
  border-radius:999px;
}

.result-image{ text-align:center; }
.result-image img{ max-width:100%; height:auto; border-radius:10px; }

.guitar-chords{ display:flex; flex-direction:column; gap:14px; }
.chord-score-summary{
  display:flex; align-items:center; flex-wrap:wrap; gap:8px;
  padding:12px; border:1.5px solid var(--line); border-radius:12px; background:#fffaf1;
}
.chord-score-summary .hint{ flex:1 1 100%; margin:0; }
.capo-badge,.chord-source,.chord-beat,.chord-shape{
  display:inline-flex; align-items:center; min-height:24px; padding:2px 8px;
  border-radius:999px; background:#f1e8d8; color:var(--wood-d); font-size:11.5px; font-weight:700;
}
.chord-bar{
  padding:12px; border:1.5px solid var(--line); border-radius:14px; background:#fffdf8;
}
.chord-bar-heading{ display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:9px; }
.chord-rhythm-scroll{ width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; }
.chord-rhythm{
  display:grid; grid-auto-flow:column; grid-auto-columns:minmax(48px,1fr);
  min-width:420px; border:1px solid var(--line); border-radius:10px; overflow:hidden;
}
.chord-rhythm-cell{
  display:grid; grid-template-rows:auto auto auto; min-height:70px; padding:5px 4px;
  text-align:center; border-right:1px solid var(--line); background:#fff;
}
.chord-rhythm-cell:last-child{ border-right:0; }
.chord-rhythm-cell small{ color:var(--soft); font-size:10px; }
.chord-rhythm-cell b{ color:var(--wood-d); font-size:12px; }
.chord-rhythm-cell span{ font-size:20px; line-height:1; }
.chord-voicings{ display:grid; gap:9px; margin-top:10px; }
.chord-voicing{ padding:10px; border:1px solid var(--line); border-radius:11px; background:#fff; }
.chord-voicing-heading{ display:flex; align-items:center; flex-wrap:wrap; gap:7px; margin-bottom:8px; }
.chord-name{ min-width:40px; color:var(--wood-d); font-size:22px; line-height:1; }
.chord-string-grid{ display:grid; grid-template-columns:repeat(6,minmax(38px,1fr)); gap:4px; }
.chord-string{
  display:flex; min-width:0; flex-direction:column; align-items:center; gap:1px;
  padding:5px 2px; border-radius:8px; background:#fff8ec;
}
.chord-string small{ color:var(--soft); font-size:9px; white-space:nowrap; }
.chord-string b{ font-size:20px; font-variant-numeric:tabular-nums; }
.chord-string b.muted{ color:#a4452f; }

@media (min-width:700px){
  .chord-voicings{ grid-template-columns:repeat(2,minmax(0,1fr)); }
}

#whistle-out{
  width:100%;
}

.whistle-scroll-wrap{
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  width:100%;
}

/* ---------- downloads ---------- */
.dl{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:16px;
  justify-content:center;
}
.dl-btn{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:var(--tap);
  padding:10px 18px;
  border-radius:999px;
  background:#fff7ec;
  border:1.5px solid var(--line);
  color:var(--wood-d);
  text-decoration:none;
  font-size:14px;
  font-weight:600;
}
.dl-btn:hover{ border-color:var(--wood); }

.dl-locked{ margin-top:16px; text-align:center; }
.upgrade{
  width:100%;
  min-height:var(--tap);
  padding:13px;
  border:1.5px dashed var(--wood);
  border-radius:var(--radius);
  background:#fff7ec;
  color:var(--wood-d);
  font-size:15px;
  font-weight:700;
  cursor:pointer;
}
.upgrade:hover{ background:#fff; }

/* ---------- details panels ---------- */
details summary{
  cursor:pointer;
  font-size:16px;
  font-weight:700;
  list-style:none;
  padding:2px 0;
  min-height:32px;
  display:flex;
  align-items:center;
}
details summary::-webkit-details-marker{ display:none; }
details summary::before{ content:"▸ "; color:var(--soft); margin-right:6px; }
details[open] summary::before{ content:"▾ "; }
.details-body{ margin-top:12px; }
.sep{ border:none; border-top:1px dashed var(--line); margin:16px 0; }

/* ---------- draft / dry-link notes ---------- */
.draft-note{
  margin-top:14px;
  padding:12px 14px;
  border:1.5px solid #ecca6e;
  background:#fff4d6;
  color:#7a5c00;
  border-radius:12px;
  font-size:13.5px;
  white-space:pre-wrap;
}
.dry-link{
  margin-top:12px;
  padding:12px 14px;
  border:1.5px solid var(--line);
  background:#fffdf8;
  border-radius:12px;
  font-size:13.5px;
  word-break:break-all;
}
.dry-link a{ color:var(--wood-d); font-weight:600; }

/* ---------- spinner ---------- */
.spin{
  width:18px;height:18px;
  border:2.5px solid rgba(255,255,255,.35);
  border-top-color:#fff;
  border-radius:50%;
  animation:spin .8s linear infinite;
  display:inline-block;
  vertical-align:-4px;
  margin-right:8px;
}
@keyframes spin{ to{ transform:rotate(360deg); } }

/* ---------- admin link ---------- */
.admin-link{
  font-size:12px; font-weight:700; color:var(--wood-d);
  text-decoration:none; padding:2px 10px; border:1px solid var(--line);
  border-radius:999px; background:#fff7ec;
}
.admin-link:hover{ border-color:var(--wood); }

/* ---------- small / danger buttons ---------- */
.go.small{
  width:auto; min-height:34px; margin-top:0; padding:6px 12px;
  font-size:13px; box-shadow:none;
}
.go.ghost.danger{ color:var(--err-ink); border-color:var(--err-line); }
.go.ghost.danger:hover{ background:var(--err-bg); }

/* ---------- practice summary pills ---------- */
.practice-summary{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:12px; }
.pill{
  display:inline-block; padding:3px 10px; border-radius:999px;
  font-size:12px; font-weight:700; border:1px solid var(--line);
  background:#f6efe2; color:var(--soft);
}
.pill.total{ background:#efe6d4; color:var(--wood-d); }
.pill.cap-full{ background:#fdeee9; color:var(--err-ink); border-color:var(--err-line); }
.pill.st-new{ background:#f1ece3; color:#8a7d6a; }
.pill.st-learning{ background:#fff1d6; color:#9a6a00; }
.pill.st-polishing{ background:#e7f0ff; color:#3a63b0; }
.pill.st-mastered{ background:#e7f7ec; color:var(--ok); }

/* ---------- history ---------- */
.history-toolbar{
  display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:12px;
}
.history-toolbar select{ width:auto; min-height:38px; flex:1; min-width:140px; }
.rhythm-group{ margin-bottom:16px; }
.rhythm-head{
  margin:0 0 8px; font-size:13px; letter-spacing:.06em; color:var(--wood-d);
  border-bottom:1.5px solid var(--line); padding-bottom:4px;
}
.tune-row{
  display:flex; flex-direction:column; gap:8px;
  padding:10px 0; border-bottom:1px dashed var(--line);
}
.tune-main{ display:flex; flex-direction:column; gap:2px; }
.tune-title.linkish{
  background:none; border:none; padding:0; text-align:left; cursor:pointer;
  font-size:15px; font-weight:700; color:var(--ink);
}
.tune-title.linkish:hover{ color:var(--wood-d); text-decoration:underline; }
.tune-meta{ font-size:12px; color:var(--soft); }
.tune-ctl{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.status-select{ width:auto; min-height:34px; flex:0 0 auto; font-size:13px; padding:5px 8px; }
.status-select.st-mastered{ border-color:#9dcdb0; }
.status-select.st-learning{ border-color:#ecca6e; }

/* ---------- score OMR (sheet music -> ABC) ---------- */
.score-omr{
  margin-top:10px; padding:10px 12px;
  border:1.5px dashed var(--line); border-radius:12px; background:#fffdf8;
}
.score-omr > label{ font-weight:700; font-size:13px; }
.omr-row{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-top:6px; }
.omr-row input[type=file]{ flex:1; min-width:0; }
.go.small{ width:auto; min-height:38px; padding:8px 14px; font-size:14px; flex:0 0 auto; }

/* ---------- identify (title search) ---------- */
.identify-block{ margin-top:6px; }
.identify-out{ display:flex; flex-direction:column; gap:8px; margin-top:8px; }
.cand{
  display:flex; flex-direction:column; gap:2px;
  border:1.5px solid var(--line); border-left-width:5px; border-radius:10px;
  padding:9px 12px; background:#fffdf8; text-decoration:none; color:inherit;
}
.cand-actions{ display:flex; gap:8px; flex-wrap:wrap; margin-top:7px; }
.cand-actions .go{ margin:0; width:auto; flex:1 1 130px; }
.cand-source{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:7px 11px;
  border:1.5px solid var(--line);
  border-radius:10px;
  color:var(--wood-d);
  font-size:13px;
  font-weight:700;
  text-decoration:none;
}
.cand:hover{ background:#fff7e9; }
.cand-name{ font-weight:700; font-size:15px; color:var(--wood-d); }
.cand-meta{ font-size:12px; color:var(--soft); }
.cand-high{ border-left-color:#3f9d6b; }
.cand-medium{ border-left-color:#e0a93c; }
.cand-low{ border-left-color:#c2bcae; }

/* ---------- teachers ---------- */
.teachers{ display:flex; flex-direction:column; gap:12px; margin-top:6px; }
.teacher-card{
  border:1.5px solid var(--line); border-radius:12px; padding:12px; background:#fffdf8;
}
.teacher-name{ font-weight:700; font-size:15px; }
.teacher-style{ font-size:12px; color:var(--wood-d); margin-top:2px; }
.teacher-blurb{ font-size:13px; color:var(--soft); margin:8px 0; }
.teacher-go{ width:auto; }
.teacher-status{ margin-top:8px; font-size:11px; color:var(--wood-d); }
.course-card{ background:#fbf7ef; }
.pro-tag{
  display:inline-block; margin-left:6px; padding:1px 7px; border-radius:999px;
  font-size:10px; font-weight:800; letter-spacing:.05em; vertical-align:middle;
  color:#fff; background:var(--wood);
}
.auth-row{ display:flex; gap:10px; }
.auth-row .go{ flex:1; }
.apple-row{ margin-top:6px; }
.apple-btn{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  background:#111;
  border:1.5px solid #111;
  color:#fff;
}
.apple-btn:hover{ background:#000; }
.apple-logo{ font-size:19px; line-height:1; }
.google-row{ margin-top:6px; }
.or-sep{ display:flex; align-items:center; gap:10px; color:var(--soft); font-size:12px; margin:12px 0; }
.or-sep::before, .or-sep::after{ content:""; flex:1; height:1px; background:var(--line); }
.google-btn{ display:flex; align-items:center; justify-content:center; gap:10px; text-decoration:none; }
.g-logo{
  display:inline-flex; align-items:center; justify-content:center;
  width:20px; height:20px; border-radius:50%; background:#fff; color:#4285f4;
  font-weight:800; font-family:Arial, sans-serif; border:1px solid var(--line);
}
.pr-badge{
  display:inline-block; margin-left:8px; padding:1px 7px; border-radius:999px;
  font-size:10px; font-weight:700; letter-spacing:.04em; vertical-align:middle;
  color:#fff; background:var(--wood-d);
}
.hint.tiny{ font-size:11px; }

/* ---------- Pro purchase / subscription disclosure ---------- */
.pro-purchase{
  margin:16px 0;
  padding:14px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fffaf3;
}
.pro-purchase-head{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  margin-bottom:8px;
}
.pro-purchase-title{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.iap-language-switch{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:4px;
  margin:12px 0;
  padding:4px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#f1e8d8;
}
.iap-language-switch button{
  min-height:44px;
  padding:8px 12px;
  border:0;
  border-radius:9px;
  background:transparent;
  color:var(--soft);
  font:inherit;
  font-weight:800;
  cursor:pointer;
}
.iap-language-switch button.active{
  background:#fff;
  color:var(--wood-d);
  box-shadow:0 1px 4px rgba(70,47,28,.14);
}
.iap-language-switch button:focus-visible{
  outline:2px solid var(--wood);
  outline-offset:2px;
}
.iap-language-block{
  margin-top:10px;
}
.iap-language-block .hint{
  margin:4px 0 0;
  line-height:1.65;
}
.pro-purchase .auth-row{
  flex-direction:column;
  margin-top:14px;
}
.pro-purchase .auth-row .go{
  width:100%;
  min-height:var(--tap);
}
.iap-action{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:3px;
  line-height:1.3;
  white-space:normal;
}
.iap-terms{
  margin-top:14px;
  padding-top:2px;
  border-top:1px solid var(--line);
}

/* ---------- footer ---------- */
.foot{
  text-align:center;
  padding:24px 16px 40px;
  color:var(--soft);
  font-size:12px;
}
.foot p{ margin:0; }

/* ---------- wider screens ---------- */
@media (min-width:760px){
  .topbar{
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
  }
  .account-bar{ justify-content:flex-end; }
  .controls{ flex-direction:row; }
  .controls .field{ flex:1; margin-top:0; }
}

@media (min-width:1100px){
  .layout{ max-width:1480px; }
  .layout > .wrap{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    align-items:start;
    gap:18px;
  }
  .layout > .wrap > section:nth-of-type(n+3){ grid-column:1 / -1; }
  .layout > .wrap > section:nth-of-type(2){ position:sticky; top:16px; }
  .topbar{ padding-inline:max(20px,calc((100vw - 1450px)/2)); }
}

/* ---------- danger zone (account deletion) ---------- */
.danger-zone{ margin-top:18px; padding-top:14px; border-top:1px solid var(--line); }
.link-danger{
  background:none; border:none; padding:0; cursor:pointer;
  color:#b3261e; font-size:13px; text-decoration:underline;
}
.link-danger:hover{ color:#8c1d18; }
.delete-confirm{ margin-top:10px; }
.go.danger{ background:#b3261e; border-color:#b3261e; }
.go.danger:hover{ background:#8c1d18; }
