/* App pages (/sync, /powapowa, /ja/…). Each app wears its own detail page's look:
   Sync = the app's settings list (grouped rows), Powapowa = film roll and light table. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow-x: clip; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; }
.top, main, footer, .outro { width: 100%; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.top { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; max-width: none;
  padding-top: calc(10px + env(safe-area-inset-top)); padding-bottom: 10px; }
.top a { text-decoration: none; white-space: nowrap; }
.top .app { display: inline-flex; align-items: center; gap: 8px; }
.top .app img { width: 26px; height: 26px; }
.top .lang { justify-self: end; }
main { max-width: 720px; padding-bottom: 24px; }
h1, h2 { text-wrap: balance; }
p, ul, dl { margin: 0; }
figure { margin: 0; }
.stores { display: flex; flex-wrap: wrap; gap: 10px; }
.stores a { text-decoration: none; }
.photo img { display: block; width: 100%; height: auto; }
.photo.pair > div { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.photo.pair img { aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 58%; }
.table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; min-width: 520px; border-collapse: collapse; }
th, td { text-align: left; vertical-align: top; }
footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; max-width: 720px; padding-bottom: calc(32px + env(safe-area-inset-bottom)); }
footer a { text-decoration: none; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 4px; }

/* ── Sync: the app's own grouped list ── */
.sync {
  --label: #000; --secondary: rgba(60, 60, 67, 0.6); --separator: rgba(60, 60, 67, 0.29); --fill: rgba(118, 118, 128, 0.12);
  --grouped: #F2F2F7; --tint: #007AFF;
  background: var(--grouped); color: var(--label);
  font: 17px/1.45 -apple-system, 'SF Pro Text', system-ui, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
}
.sync .top { background: rgba(242, 242, 247, 0.86); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--separator); font-size: 17px; }
.sync .top .home, .sync .top .lang { color: var(--tint); }
.sync .top .home::before { content: '‹'; margin-right: 4px; font-size: 22px; line-height: 0; position: relative; top: 1px; }
.sync .top .app { font-weight: 600; }
.sync .top .app img { border-radius: 6px; }
.sync .hero { padding-top: 28px; }
.sync h1 { margin: 0 0 10px; font-size: 34px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.sync .hero > p { font-size: 17px; line-height: 1.5; }
.sync .hero > p + p { margin-top: 10px; }
.sync .stores { margin: 20px 0 26px; }
.sync .stores a { padding: 11px 18px; border-radius: 12px; background: var(--tint); color: #fff; font-size: 15px; font-weight: 600; }
.sync .stores a.alt { background: var(--fill); color: var(--tint); }
.sync .day { background: #fff; border-radius: 10px; overflow: hidden; padding-top: 12px; }
.sync .day svg { display: block; width: 100%; height: auto; max-height: 72vh; font-family: -apple-system, 'SF Pro Text', system-ui, 'Hiragino Sans', sans-serif; }
.sync .day .tracks { display: flex; padding: 0 12px 6px; }
.sync .day .tracks span { flex: 1; display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.sync .day .tracks b { font-size: 17px; font-weight: 700; }
.sync .day .tracks em { font-style: normal; font-size: 12px; color: var(--secondary); }
.sync .day .tracks i { width: 30px; flex: none; }
.sync figcaption { padding: 7px 16px 0; font-size: 13px; line-height: 1.4; color: var(--secondary); }
.sync .day figcaption { padding: 4px 16px 12px; border-top: 0.5px solid var(--separator); padding-top: 10px; }
.sync .grp { margin-top: 34px; }
.sync .grp h2 { margin: 0; padding: 0 16px 7px; font-size: 13px; font-weight: 400; line-height: 1.35; letter-spacing: 0.02em; text-transform: uppercase; color: var(--secondary); }
.sync .card { background: #fff; border-radius: 10px; overflow: hidden; }
.sync .card > p { padding: 11px 16px; }
.sync .card > p + p { padding-top: 0; }
.sync .card a, .sync .outro a { color: var(--tint); text-decoration: none; }
.sync .card ul { list-style: none; padding: 0; }
.sync .card li, .sync .faq dt { position: relative; padding: 11px 16px; }
.sync .card li + li::before, .sync .card > * + ul > li:first-child::before, .sync .faq dt + dd + dt::before {
  content: ''; position: absolute; top: 0; left: 16px; right: 0; border-top: 0.5px solid var(--separator); }
.sync .card > * + ul > li:first-child::before { left: 0; }
.sync .card strong { font-weight: 600; }
.sync .card > .stores { margin: 4px 16px 14px; }
.sync .card > figure { border-top: 0.5px solid var(--separator); }
.sync .card > figure:first-child { border-top: 0; }
.sync .card > figure figcaption { padding-bottom: 11px; }
.sync .card > .day { border-radius: 0; }
.sync table { font-size: 15px; }
.sync th, .sync td { padding: 10px 12px; border-bottom: 0.5px solid var(--separator); }
.sync th { font-size: 13px; font-weight: 400; color: var(--secondary); text-transform: uppercase; letter-spacing: 0.02em; }
.sync tr:last-child td { border-bottom: 0; }
.sync td:first-child { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--secondary); }
.sync .faq dt { padding-bottom: 2px; font-weight: 400; }
.sync .faq dd { margin: 0; padding: 0 16px 11px; font-size: 15px; line-height: 1.45; color: var(--secondary); }
.sync .outro { max-width: 720px; padding-top: 10px; font-size: 13px; color: var(--secondary); }
.sync footer { padding-top: 30px; font-size: 15px; color: var(--secondary); }
.sync footer a { color: var(--tint); }
.sync :lang(ja) .grp h2, .sync:lang(ja) .grp h2 { letter-spacing: 0; }
@media (min-width: 900px) {
  .sync .hero { padding-top: 48px; }
  .sync h1 { font-size: 44px; }
}

/* ── Powapowa: film roll up top, light table below ── */
.powapowa {
  --cream: #f3eee6; --amber: #f0a742; --pencil: #ff3d8b; --base: #17120f; --ink: #231d24;
  --soft: 'Gowun Dodum', -apple-system, system-ui, sans-serif; --mono: 'Share Tech Mono', ui-monospace, Menlo, monospace;
  color: var(--ink); background-color: #f1ece4; background-image: radial-gradient(70% 40% at 50% 30%, #fffdf9, #f1ece4 70%, #e7e0d5);
  font: 17px/1.7 var(--soft);
}
.powapowa:lang(ja) { --soft: 'Hiragino Maru Gothic ProN', 'Gowun Dodum', 'Hiragino Sans', sans-serif; }
.powapowa .top { background: #0b090d; color: var(--cream); font: 13px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }
.powapowa .top .app img { border-radius: 6px; }
.powapowa .top .home, .powapowa .top .lang { color: rgba(243, 238, 230, 0.7); }
.powapowa main { max-width: none; padding-left: 0; padding-right: 0; }
.powapowa main > *, .powapowa footer, .powapowa .outro { max-width: 720px; margin-left: auto; margin-right: auto; }
.powapowa .hero { max-width: none; color: var(--cream); background-color: #0b090d; background-image: radial-gradient(90% 60% at 50% 35%, #1d1424, #0b090d 72%);
  padding: 34px max(20px, env(safe-area-inset-right)) 40px max(20px, env(safe-area-inset-left)); }
.powapowa .hero > * { max-width: 720px; margin-left: auto; margin-right: auto; }
.powapowa h1 { margin-bottom: 14px; font-size: clamp(30px, 7vw, 46px); font-weight: 400; line-height: 1.25; letter-spacing: -0.01em;
  text-shadow: 0 0 22px rgba(255, 200, 230, 0.4); }
.powapowa .hero > p { color: rgba(243, 238, 230, 0.78); }
.powapowa .stores { margin: 22px auto 30px; }
.powapowa .stores a { padding: 12px 18px; border-radius: 99px; background: #141214; color: #f4f4f4; font: 14px/1.2 var(--mono); letter-spacing: 0.06em; }
.powapowa .hero .stores a { background: var(--cream); color: #141214; }
.powapowa .photo { position: relative; padding: 30px 7px; background: var(--base); box-shadow: 0 6px 20px rgba(40, 25, 30, 0.18); }
.powapowa .photo::before, .powapowa .photo::after { content: ''; position: absolute; left: 0; right: 0; height: 12px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='12'%3E%3Crect x='5' y='0' width='12' height='12' rx='2.6' fill='%23f1ece4'/%3E%3C/svg%3E") 0 0 / 22px 12px repeat-x; }
.powapowa .hero .photo::before, .powapowa .hero .photo::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='12'%3E%3Crect x='5' y='0' width='12' height='12' rx='2.6' fill='%230b090d'/%3E%3C/svg%3E"); }
.powapowa .photo::before { top: 9px; } .powapowa .photo::after { bottom: 9px; }
.powapowa .photo img { background: #0d0a0a; }
.powapowa figcaption { margin-top: 10px; font: 12px/1.5 var(--mono); letter-spacing: 0.06em; color: var(--amber); }
.powapowa .grp { margin-top: 64px; padding: 0 max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left)); }
.powapowa .grp h2 { display: inline-block; margin: 0 0 22px; padding: 6px 12px 5px; border-radius: 2px; background: #141214; color: #f4f4f4;
  font: 700 13px/1.3 Arial, Helvetica, 'Hiragino Sans', sans-serif; letter-spacing: 0.16em; text-transform: uppercase; transform: rotate(-1.2deg); }
.powapowa:lang(ja) .grp h2 { letter-spacing: 0.08em; }
.powapowa .grp:nth-of-type(even) h2 { transform: rotate(1deg); }
.powapowa .card > * + * { margin-top: 14px; }
.powapowa .card ul { padding-left: 1.2em; }
.powapowa .card li + li { margin-top: 8px; }
.powapowa .card li::marker { color: var(--pencil); }
.powapowa .card strong { font-weight: 400; box-shadow: inset 0 -0.42em 0 rgba(255, 61, 139, 0.22); }
.powapowa .card a { text-decoration-color: rgba(35, 29, 36, 0.35); text-underline-offset: 3px; }
.powapowa .card > .stores { margin: 22px 0 4px; }
.powapowa .faq-grp .card { position: relative; padding: 26px clamp(18px, 4vw, 36px) 20px; background-color: #d8bf94; color: #3b2a1b;
  background-image: radial-gradient(rgba(80, 50, 20, 0.06) 1px, transparent 1px); background-size: 4px 4px;
  box-shadow: 0 10px 30px rgba(60, 40, 20, 0.22); transform: rotate(-0.6deg); }
.powapowa .faq dt { padding-top: 14px; font: 13px/1.5 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.powapowa:lang(ja) .faq dt { font-family: var(--soft); font-weight: 700; letter-spacing: 0; }
.powapowa .faq dt:first-child { padding-top: 0; }
.powapowa .faq dd { margin: 4px 0 0; padding-bottom: 14px; border-bottom: 1px solid rgba(59, 42, 27, 0.35); font-size: 16px; line-height: 1.6; }
.powapowa .faq dd:last-child { border-bottom: 0; padding-bottom: 0; }
.powapowa .faq a { color: inherit; }
.powapowa .outro { margin-top: 56px; padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right));
  font: 13px/1.6 var(--mono); letter-spacing: 0.06em; color: #7a7178; }
.powapowa .outro a { color: var(--ink); }
.powapowa footer { padding-top: 34px; padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right));
  justify-content: flex-start; font: 13px var(--mono); letter-spacing: 0.06em; }
.powapowa footer a { border-bottom: 1px solid rgba(35, 29, 36, 0.35); padding-bottom: 2px; }
@media (max-width: 640px) { .powapowa .photo { padding: 28px 4px; } }

/* Japanese headings break between phrases, not mid-word */
:lang(ja) h1, :lang(ja) h2 { word-break: auto-phrase; }
