/* Grease Da Groove site. Tokens follow the app (src/styles.css). */
:root {
  color-scheme: dark;
  --bg: #0d1117; --bg2: #11161d; --card: #161b22; --card2: #1c2230;
  --line: #232a36; --line2: #30363d;
  --text: #e6edf3; --muted: #9aa7b4; --faint: #6b7683;
  --green: #39d353; --green-ink: #04210c; --green-glow: #17331f;
  --blue: #58a6ff; --orange: #f2994a; --purple: #bc7bff;
  --danger: #f85149; --warn: #d29922;
  --phone-rim: #2a313b; --shadow: 0 30px 70px rgba(0,0,0,.55);
  --radius: 18px;
  /* System fonts only. Japanese glyphs fall back to Hiragino (Apple), Yu Gothic UI / Meiryo (Windows), Noto CJK (Android). */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, "Noto Sans JP", "Noto Sans CJK JP", Helvetica, Arial, sans-serif;
}
/* Japanese: a Japanese face for Latin too (consistent metrics), no negative tracking, strict kinsoku, phrase breaks. */
:root:lang(ja) { --font: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, "Noto Sans JP", "Noto Sans CJK JP", Roboto, "Segoe UI", sans-serif; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f3f6f9; --bg2: #e7ecf2; --card: #ffffff; --card2: #eef2f6;
    --line: #d6dde6; --line2: #a8b5c5;
    --text: #11161d; --muted: #4a5563; --faint: #6b7683;
    --green: #1f9d3a; --green-ink: #ffffff; --green-glow: #d4f1db;
    --blue: #1f5fc4; --orange: #ad5009; --purple: #7038c8;
    --danger: #c0392b; --warn: #8a6100;
    --phone-rim: #1b2029; --shadow: 0 30px 60px rgba(60,75,95,.28);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.08; letter-spacing: -0.03em; margin: 0; }
p { margin: 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

/* demo ribbon (mock API) */
.demo { background: #d29922; color: #1a1300; text-align: center; font-size: 14px; font-weight: 600; padding: 6px 16px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav .links { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.nav .links a { color: var(--muted); text-decoration: none; }
.nav .links a:hover { color: var(--text); }
.nav .links a.pill { color: var(--text); border: 1px solid var(--line2); padding: 7px 14px; border-radius: 999px; font-weight: 600; }
@media (max-width: 640px) { .nav .links .opt { display: none; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 14px; border: 1px solid transparent; font: 600 16px/1 var(--font); cursor: pointer; text-decoration: none; transition: transform .15s, background .15s, opacity .15s; }
.btn-primary { background: var(--green); color: var(--green-ink); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line2); }
.btn-ghost:hover { background: var(--card2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; }
.linkbtn { background: none; border: 0; padding: 8px 0; min-height: 44px; color: var(--muted); font: inherit; font-size: 15px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:hover { color: var(--text); }

/* store badges: dark ink on light, light ink on dark, like the official badges */
.badges { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.badge { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px 10px 15px; min-height: 56px; border-radius: 14px; background: var(--text); color: var(--bg); min-width: 186px; text-decoration: none; transition: transform .15s; }
.badge:hover { transform: translateY(-2px); }
.open-app { margin: 0 0 16px; }
.open-app .btn { min-height: 56px; min-width: 186px; font-size: 18px; }
.badge svg { width: 26px; height: 26px; flex: none; }
.badge small { display: block; font-size: 11px; line-height: 1.1; opacity: .75; }
.badge b { display: block; font-size: 18px; line-height: 1.15; font-weight: 600; }

/* hero */
.hero { text-align: center; padding: 64px 0 0; background: radial-gradient(80% 60% at 50% 0%, var(--green-glow) 0%, transparent 70%); }
.hero h1 { font-size: clamp(40px, 7.4vw, 78px); line-height: 1.02; letter-spacing: -0.04em; font-weight: 800; margin: 0 0 18px; }
.hero h1 span { color: var(--green); }
.hero .lead { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); max-width: 560px; margin: 0 auto 28px; }
.hero .fine { margin-top: 14px; font-size: 14px; color: var(--faint); }
.hero-art { margin: 48px auto 0; width: 100%; max-width: 1200px; padding: 0 8px; mask-image: linear-gradient(to bottom, #000 72%, transparent); -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .hero-art { mask-image: none; -webkit-mask-image: none; padding: 0; width: calc(100% - 32px); border-radius: 28px; box-shadow: var(--shadow); }
}

/* section heads */
.section { padding-top: 104px; }
.head { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.head h2 { font-size: clamp(30px, 4.4vw, 48px); margin-bottom: 12px; }
.head p { color: var(--muted); font-size: 18px; }
.eyebrow { font-weight: 700; font-size: 13px; letter-spacing: .09em; text-transform: uppercase; color: var(--c, var(--green)); }

/* modes */
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mode { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.mode h3 { font-size: 24px; margin: 6px 0 10px; }
.mode p { color: var(--muted); }
.mode ul { margin: 16px 0 0; }
.mode.full { border-color: color-mix(in srgb, var(--c) 45%, var(--line)); }
@media (max-width: 720px) { .modes { grid-template-columns: 1fr; } }

/* feature rows */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 104px 0 0; }
.feature.flip .text { order: 2; }
.feature h2 { font-size: clamp(32px, 4.4vw, 50px); margin: 10px 0 16px; }
.feature p { color: var(--muted); font-size: 18px; margin: 0 0 18px; }
.c-green { --c: var(--green); } .c-blue { --c: var(--blue); } .c-orange { --c: var(--orange); } .c-purple { --c: var(--purple); }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: baseline; }
.ticks li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--green)); transform: translateY(-2px); }
.phones { position: relative; display: flex; justify-content: center; align-items: center; min-height: 560px; }
.phones::before { content: ""; position: absolute; inset: 8% 10%; background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 34%, transparent), transparent); filter: blur(30px); }
.phone { position: relative; width: min(290px, 68vw); border-radius: 42px; border: 6px solid var(--phone-rim); box-shadow: var(--shadow); overflow: hidden; background: #000; }
.phones.two .phone:first-child { transform: rotate(-6deg) translateX(30px); z-index: 1; }
.phones.two .phone:last-child { transform: rotate(5deg) translateX(-30px) translateY(30px); width: min(260px, 60vw); }
@media (max-width: 860px) {
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 36px; padding-top: 80px; }
  .feature.flip .text { order: 0; }
  .phones { min-height: 0; }
  .phones.two .phone:last-child { display: none; }
  .phones.two .phone:first-child { transform: none; }
}

/* sync band */
.band { margin: 112px 0 0; padding: 68px 0; background: var(--bg2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.band h2 { font-size: clamp(30px, 4vw, 44px); margin: 0 0 12px; }
.band p { color: var(--muted); max-width: 580px; margin: 0 auto; font-size: 18px; }
.icon-tile { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto 18px; background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); }
.facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.facts span { border: 1px solid var(--line2); border-radius: 999px; padding: 6px 14px; font-size: 15px; color: var(--muted); }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 900px; margin: 0 auto; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 26px; display: flex; flex-direction: column; gap: 6px; }
.plan h3 { font-size: 17px; letter-spacing: 0; color: var(--muted); font-weight: 600; }
.plan .price { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.plan .price small { font-size: 16px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan p { color: var(--muted); font-size: 15px; }
.plan.best { border-color: color-mix(in srgb, var(--green) 55%, var(--line)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--green) 30%, transparent) inset; }
.tag { align-self: flex-start; font-size: 13px; font-weight: 700; color: var(--green); background: color-mix(in srgb, var(--green) 14%, transparent); padding: 3px 10px; border-radius: 999px; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; max-width: 420px; } }

/* newsletter */
.news { max-width: 560px; margin: 0 auto; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 30px 26px; text-align: center; }
.news h2 { font-size: clamp(26px, 3.4vw, 34px); margin-bottom: 8px; }
.news > p { color: var(--muted); margin-bottom: 20px; }
.inline-form { display: flex; gap: 10px; }
.inline-form .input { flex: 1; min-width: 0; }
@media (max-width: 480px) { .inline-form { flex-direction: column; } }
.consent { margin-top: 12px; font-size: 13px; color: var(--faint); }
.consent a { color: var(--muted); }

/* forms */
.field { display: grid; gap: 6px; text-align: left; }
.field label { font-size: 14px; font-weight: 600; color: var(--muted); }
.input { width: 100%; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line2); background: var(--bg); color: var(--text); font: 17px var(--font); }
.input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 25%, transparent); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.input:disabled { opacity: .45; cursor: not-allowed; }
.input.code { font-size: 26px; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; padding-left: calc(14px + .4em); }
.msg { min-height: 0; font-size: 15px; text-align: left; margin-top: 10px; }
.msg:empty { display: none; }
.msg.err { color: var(--danger); }
.msg.ok { color: var(--green); }
.msg.info { color: var(--muted); }
.status { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 10px 14px; border-radius: 12px; font-weight: 600; margin-top: 14px; }
.status.ok { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); }
.status.err { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.status.info { background: var(--card2); color: var(--muted); }

/* auth + account cards */
.page { min-height: calc(100vh - 60px); display: flex; flex-direction: column; }
.page main { flex: 1; width: 100%; padding-top: 48px; padding-bottom: 72px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 28px 24px; max-width: 440px; margin: 0 auto; }
.card.wide { max-width: 620px; }
.card h1 { font-size: 30px; margin-bottom: 6px; }
.card .sub { color: var(--muted); margin-bottom: 22px; }
.card .center { text-align: center; }
@media (max-width: 480px) { .card { padding: 24px 16px; } .acct-head h1 { font-size: 20px; } }
.app-icon { width: 64px; height: 64px; border-radius: 16px; margin: 0 auto 16px; }
.stack { display: grid; gap: 12px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 14px; margin: 18px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sso { display: grid; gap: 10px; }
.btn-sso { background: var(--card2); color: var(--text); border-color: var(--line2); width: 100%; }
.btn-sso:hover:not(:disabled) { background: var(--bg2); }
.btn-sso svg { width: 20px; height: 20px; }
.gis-slot { display: flex; justify-content: center; min-height: 44px; }
.row-actions { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* account */
.acct-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.avatar { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--green) 18%, transparent); color: var(--green); font-weight: 800; font-size: 22px; flex: none; }
.acct-head h1 { font-size: 24px; margin: 0; overflow-wrap: anywhere; }
.acct-head p { color: var(--muted); font-size: 15px; }
.group { border: 1px solid var(--line); border-radius: 16px; margin: 0 0 16px; overflow: hidden; }
.group h2 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); font-weight: 700; padding: 14px 16px 4px; }
.item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 16px; min-height: 56px; border-top: 1px solid var(--line); }
.group h2 + .item { border-top: 0; }
.item b { display: block; font-weight: 600; }
.item span.d { display: block; color: var(--muted); font-size: 14px; }
.item .btn { min-height: 44px; padding: 0 16px; flex: none; }
.chip { font-size: 14px; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: var(--card2); color: var(--muted); white-space: nowrap; }
.chip.pro { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); }
.switch { position: relative; width: 52px; height: 32px; flex: none; appearance: none; -webkit-appearance: none; margin: 0; border-radius: 999px; background: var(--line2); cursor: pointer; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.switch:checked { background: var(--green); }
.switch:checked::after { transform: translateX(20px); }
.switch:disabled { opacity: .5; cursor: progress; }
.danger-zone summary { cursor: pointer; list-style: none; color: var(--danger); font-weight: 600; padding: 14px 16px; min-height: 52px; display: flex; align-items: center; }
.danger-zone summary::-webkit-details-marker { display: none; }
.danger-zone .body { padding: 0 16px 16px; display: grid; gap: 12px; }
.danger-zone p { color: var(--muted); font-size: 15px; }
.skeleton { height: 18px; border-radius: 8px; background: var(--card2); margin: 10px 0; }

/* closing + footer */
.closing { text-align: center; padding: 112px 0 88px; background: radial-gradient(70% 70% at 50% 100%, var(--green-glow) 0%, transparent 70%); }
.closing img.icon { width: 96px; height: 96px; border-radius: 24px; margin: 0 auto 20px; box-shadow: var(--shadow); }
.closing h2 { font-size: clamp(30px, 4vw, 44px); margin: 0 0 24px; }
.footer { border-top: 1px solid var(--line); padding: 26px 0 40px; color: var(--muted); font-size: 14px; }
.footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; flex-wrap: wrap; }
.footer .links { display: flex; gap: 6px 18px; flex-wrap: wrap; }
.footer a { text-decoration: none; padding: 8px 0; display: inline-block; }
.footer a:hover, .footer button:hover { color: var(--text); }
.footer button { background: none; border: 0; color: inherit; font: inherit; padding: 8px 0; cursor: pointer; }

/* consent bar */
.consent-bar { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; max-width: 520px; margin: 0 auto; background: var(--card); border: 1px solid var(--line2); border-radius: 16px; box-shadow: var(--shadow); padding: 14px 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 15px; }
.consent-bar p { flex: 1 1 200px; }
.consent-bar .btns { display: flex; gap: 8px; flex: 1 1 200px; }
.consent-bar .btns .btn { flex: 1; }
.consent-bar .btn { min-height: 44px; padding: 0 16px; font-size: 15px; }

/* legal pages */
.legal { max-width: 680px; margin: 0 auto; padding: 32px 16px 64px; font-size: 16px; }
.legal h1 { font-size: 30px; margin: 0 0 6px; }
.legal h2 { font-size: 19px; letter-spacing: -0.01em; margin: 32px 0 8px; padding-top: 18px; border-top: 1px solid var(--line); }
.legal p, .legal li { margin: 0 0 10px; }
.legal ul { padding-left: 20px; }
.legal a { color: var(--green); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .badge:hover, .btn-primary:hover { transform: none; }
}

h1, h2, .hero .lead, .band p, .head p { text-wrap: balance; }

/* languages */
:lang(ja) body { line-break: strict; overflow-wrap: break-word; }
:lang(ja) :is(h1, h2, h3, .hero h1, .plan .price) { letter-spacing: 0; word-break: auto-phrase; }
:lang(ja) .hero h1 { font-size: clamp(32px, 6.2vw, 72px); line-height: 1.2; }
:lang(ja) :is(h1, h2, h3) { line-height: 1.3; }
:lang(ja) :is(.lead, .head p, .band p, .feature p) { word-break: auto-phrase; }
:lang(de) :is(h1, h2, h3, p, li, .facts span, .plan .price), :lang(fr) :is(h1, h2, h3) { -webkit-hyphens: auto; hyphens: auto; }
.btn { line-height: 1.2; text-align: center; }
.plan .price.word { font-size: 28px; letter-spacing: -0.02em; }
.lang-offer { display: flex; align-items: center; justify-content: center; gap: 4px 12px; padding: 4px 8px 4px 16px; background: var(--bg2); border-bottom: 1px solid var(--line); font-size: 14px; }
.lang-offer a { color: var(--text); font-weight: 600; text-underline-offset: 3px; padding: 8px 0; }
.lang-offer button { background: none; border: 0; color: var(--muted); font: 20px/1 var(--font); width: 40px; height: 40px; cursor: pointer; border-radius: 10px; }
.lang-offer button:hover { color: var(--text); background: var(--card2); }
.footer .en-note { padding: 8px 0; color: var(--faint); }
.footer .langs { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 0 16px; }
.footer .langs a[aria-current] { color: var(--text); font-weight: 600; }
/* long sign-in labels (es, fr) next to the brand on 320 px phones */
@media (max-width: 380px) {
  .nav .wrap { gap: 8px; }
  .brand { font-size: 15px; gap: 8px; }
  .nav .links a.pill { font-size: 14px; padding: 6px 10px; }
}

/* Place page (/p/<id>): figures from the API, the usual week as Rhythm draws it (solid this week, faint usual). */
.pl[aria-busy="true"] { min-height: 300px; }
.pl-trail { display: flex; flex-wrap: wrap; font-size: 14px; margin-bottom: 4px; }
.pl-trail a { color: var(--muted); text-decoration: none; padding: 6px 0; }
.pl-trail a:hover { color: var(--text); }
.pl-trail a + a::before { content: "›"; padding: 0 8px; color: var(--faint); }
.pl h1 { font-size: clamp(30px, 6vw, 40px); overflow-wrap: anywhere; }
.pl h1:empty { display: none; }
.pl-sk .skeleton { display: block; }
.pl-sk .skeleton:first-child { height: 36px; width: 55%; }
.pl-sk .skeleton:nth-child(2) { height: 52px; width: 70%; margin-top: 22px; }
.pl-sk .skeleton:nth-child(3) { height: 18px; width: 60%; margin-top: 22px; }
.pl-line { color: var(--muted); margin-top: 8px; }
.pl-figs { margin-top: 18px; }
.pl-total { color: var(--muted); font-size: 18px; line-height: 1.3; }
.pl-total b { font-size: clamp(42px, 9vw, 58px); font-weight: 800; color: var(--text); letter-spacing: -0.03em; }
.pl-err { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; color: var(--muted); margin-top: 8px; }
.pl-err .linkbtn { color: var(--text); text-decoration: underline; }
#pl-home { margin-top: 18px; }
.pl-get { text-align: center; max-width: 620px; margin: 36px auto 0; }
.pl-get > p { color: var(--muted); margin-bottom: 14px; }
#pl-open { margin-top: 14px; }
.pl-attr { text-align: center; color: var(--faint); font-size: 13px; margin: 28px auto 0; }
.pl-attr a { color: inherit; }
