/* Foreign-resident home repair — design tokens and components (see DESIGN_SYSTEM.md).
   Font-family is set per page in an inline <style> (one language's fonts only). */

:root {
  --bg: #EDEEE8;
  --bg-raised: #F7F7F3;
  --ink: #1B1916;
  --ink-soft: #5C574E;
  --line: #C5C1B6;
  --line-strong: #8E887C;
  --copper: #B44A1A;
  --copper-ink: #7A2E0E;
  --ok: #1E5A44;
  --ok-soft: #DCE8E2;
  --urgent-bg: #F3E4D8;
  --normal-bg: #E4E8E2;
  --focus: #1E5A44;
  --danger: #9B2C1A;
  --photo-mat: #FFFFFF;
  --font: "Noto Sans", system-ui, sans-serif;
  --pad: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 17px; -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
html[lang="th"] body, html[lang="si"] body, html[lang="ta"] body { line-height: 1.7; letter-spacing: 0.005em; }

h1, h2, h3 { font-weight: 700; line-height: 1.2; margin: 0 0 0.5rem; overflow-wrap: break-word; }
html[lang="en"] h1, html[lang="vi"] h1, html[lang="ko"] h1,
html[lang="en"] h2, html[lang="vi"] h2, html[lang="ko"] h2 { letter-spacing: -0.02em; }
html[lang="th"] h1, html[lang="si"] h1, html[lang="ta"] h1,
html[lang="th"] h2, html[lang="si"] h2, html[lang="ta"] h2 { line-height: 1.35; }
h1 { font-size: clamp(1.75rem, 7vw, 2.4rem); }
h2 { font-size: clamp(1.35rem, 5vw, 1.75rem); margin-bottom: 1rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1rem; max-width: 60ch; }
ul, ol { max-width: 64ch; }
a { color: var(--ok); text-underline-offset: 0.15em; }
a:hover { color: var(--ink); }
img { max-width: 100%; }
small { font-size: 0.85em; }
.num { font-variant-numeric: tabular-nums; }

.wrap { padding: 0 var(--pad); max-width: 1040px; margin: 0 auto; }
section { padding: 40px 0; border-top: 1px solid var(--line); }
@media (min-width: 720px) { section { padding: 56px 0; } }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.skip {
  position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff;
  padding: 8px 12px; z-index: 100; text-decoration: none;
}
.skip:focus { left: 8px; }

/* ---- top bar ---- */
.topbar { border-bottom: 1px solid var(--line); background: var(--bg); }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; min-height: 56px; gap: 12px; }
.wordmark { display: inline-flex; gap: 10px; align-items: center; font-weight: 700; color: var(--ink); text-decoration: none; min-height: 44px; }
.wordmark img { width: 26px; height: 26px; display: block; }
.langs { position: relative; }
.langs summary {
  list-style: none; cursor: pointer; padding: 0 8px; min-height: 44px;
  display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap;
}
.langs summary::-webkit-details-marker { display: none; }
.langs summary::after { content: ""; width: 8px; height: 8px; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: translateY(-2px) rotate(45deg); }
.langs ul {
  position: absolute; right: 0; top: 100%; margin: 4px 0 0; padding: 4px 0; list-style: none;
  background: var(--bg-raised); border: 1px solid var(--line-strong); min-width: 190px; z-index: 40;
}
.langs li a { display: block; padding: 12px 16px; color: var(--ink); text-decoration: none; min-height: 48px; }
.langs li a:hover { background: var(--bg); }
.langs li a[aria-current] { font-weight: 700; border-left: 3px solid var(--copper); padding-left: 13px; }

/* ---- hero ---- */
.hero { border-top: 0; padding: 28px 0 0; }
.hero-grid { display: grid; gap: 24px; }
@media (min-width: 720px) { .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: start; } }
.hero .slogan { display: block; }
.hero .h1sub { display: block; font-size: 1.02rem; font-weight: 600; color: var(--ink-soft); margin-top: 14px; letter-spacing: 0; line-height: 1.45; max-width: 46ch; }
.lead { font-size: 1.05rem; max-width: 52ch; }
.support { border-left: 3px solid var(--copper); padding: 6px 0 6px 16px; font-weight: 600; max-width: 50ch; margin: 20px 0 24px; }
.cta-sub { font-size: 0.9rem; color: var(--ink-soft); margin: 10px 0 0; }
.hero-photo { margin: 24px calc(var(--pad) * -1) -28px 32px; position: relative; z-index: 1; }
@media (min-width: 720px) { .hero-photo { margin: 8px 0 -40px 0; } }
.hero-photo img, .photo { display: block; width: 100%; height: auto; background: var(--photo-mat); border: 1px solid var(--line); }
.hero-photo figcaption, .cap { font-size: 0.78rem; color: var(--ink-soft); margin-top: 6px; padding-right: var(--pad); }
.hero + section { padding-top: 64px; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px; border: 1px solid transparent; border-radius: 2px;
  font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; text-align: center;
}
.btn-primary { background: var(--copper); color: #fff; }
.btn-primary:hover { background: var(--copper-ink); color: #fff; }
.btn-secondary { background: var(--bg-raised); color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: #fff; }
.btn[disabled] { opacity: 0.6; cursor: wait; }
.btn-wide { width: 100%; }
@media (min-width: 720px) { .btn-wide { width: auto; min-width: 300px; } }

/* ---- how it works ---- */
.steps { list-style: none; counter-reset: step; margin: 8px 0 0 16px; padding: 0 0 0 28px; border-left: 1px solid var(--line-strong); max-width: 720px; }
.steps li { counter-increment: step; position: relative; padding: 0 0 28px 0; display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: start; }
.steps li:last-child { padding-bottom: 8px; }
.steps li::before {
  content: counter(step); position: absolute; left: -44px; top: -2px; width: 31px; height: 31px;
  border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink);
  display: grid; place-items: center; font-weight: 700; font-size: 0.9rem; font-variant-numeric: tabular-nums;
}
.steps h3 { margin: 0 0 4px; font-size: 1.08rem; }
.steps p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }
.steps img { width: 84px; height: 84px; object-fit: cover; display: block; border: 1px solid var(--line); background: var(--photo-mat); }
@media (min-width: 720px) { .steps img { width: 136px; height: 136px; } }

/* ---- trust ticket ---- */
.two-col { display: grid; gap: 32px; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; } }
.ticket { list-style: none; margin: 0; padding: 0; border: 1px solid var(--ink); background: var(--bg-raised); max-width: 600px; }
.ticket li { display: grid; grid-template-columns: 30px 1fr; gap: 14px; padding: 16px; border-top: 1px dashed var(--line-strong); }
.ticket li:first-child { border-top: 0; }
.ticket h3 { margin: 0 0 2px; font-size: 1.02rem; }
.ticket p { margin: 0; font-size: 0.95rem; color: var(--ink-soft); }
.ticket .ico { width: 26px; height: 26px; margin-top: 2px; }

.ba { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 600px; }
.ba figure { margin: 0; }
.ba img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; display: block; border: 1px solid var(--line); background: var(--photo-mat); }
.ba figcaption { font-weight: 600; font-size: 0.9rem; margin-top: 6px; }
.ba-note { font-size: 0.85rem; color: var(--ink-soft); margin-top: 12px; max-width: 56ch; }

/* ---- photo strip ---- */
.strip-wrap { margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad) 8px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--pad); -webkit-overflow-scrolling: touch; }
.strip { display: flex; gap: 12px; list-style: none; margin: 0; padding: 0; max-width: none; }
/* Three complete cards per "page" on a phone (no card cut at the screen edge); captions wrap. */
.strip li { flex: 0 0 calc((100% - 12px) / 3); min-width: 0; scroll-snap-align: start; }
@media (min-width: 720px) { .strip li { flex-basis: calc((100% - 60px) / 6); } }
.strip a { display: block; text-decoration: none; color: var(--ink); }
.strip img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; display: block; border: 1px solid var(--line); background: var(--photo-mat); }
.strip span { display: block; font-size: 0.85rem; font-weight: 600; margin-top: 6px; line-height: 1.35; overflow-wrap: break-word; hyphens: auto; }

/* ---- form ---- */
.form fieldset { border: 0; padding: 0; margin: 0 0 40px; min-width: 0; }
.form legend { font-size: 1.2rem; font-weight: 700; padding: 0; margin-bottom: 8px; line-height: 1.3; }
.hint { font-size: 0.9rem; color: var(--ink-soft); margin: 0 0 12px; max-width: 56ch; }
.intro { max-width: 56ch; }

.services { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; list-style: none; margin: 0; padding: 0; max-width: none; }
@media (min-width: 720px) { .services { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .services { grid-template-columns: repeat(4, 1fr); } }
.svc { position: relative; }
.svc input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.svc label {
  display: block; height: 100%; min-height: 96px; padding: 12px; border: 1px solid var(--line-strong);
  background: var(--bg-raised); border-radius: 2px; cursor: pointer;
}
.svc label .ico { width: 28px; height: 28px; display: block; margin-bottom: 8px; }
.svc .name { display: block; font-weight: 600; line-height: 1.3; }
.svc .en { display: block; font-size: 0.85rem; color: var(--ink-soft); margin-top: 2px; }
.svc .kw { display: block; font-size: 0.78rem; color: var(--ink-soft); margin-top: 6px; line-height: 1.35; }
.svc input:checked + label { border: 2px solid var(--ink); padding: 11px; background: #fff; }
.svc input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 2px; }

.lbl { display: block; font-weight: 600; font-size: 0.95rem; margin: 0 0 6px; }
.field { margin-bottom: 16px; max-width: 560px; }
input[type="text"], input[type="date"], input[type="password"], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 2px;
  background: var(--bg-raised); font: inherit; color: var(--ink); line-height: 1.4;
}
select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
textarea { min-height: 120px; resize: vertical; }
.field.err input, .field.err select, .field.err textarea { border-color: var(--danger); border-width: 2px; }
.err-msg { color: var(--danger); font-size: 0.9rem; margin-top: 6px; font-weight: 600; }
.err-msg:empty { display: none; }
.errbox { border: 2px solid var(--danger); padding: 12px 16px; margin-bottom: 24px; background: var(--bg-raised); font-weight: 600; max-width: 560px; }
.errbox ul { margin: 8px 0 0; padding-left: 1.2rem; font-weight: 400; }

.photo-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.photo-add {
  display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 20px;
  border: 1px solid var(--ink); background: var(--bg-raised); font-weight: 700; cursor: pointer; border-radius: 2px;
}
.photo-add:hover { background: #fff; }
.photo-add .ico { width: 24px; height: 24px; }
.js .native-input { position: absolute; opacity: 0; width: 1px; height: 1px; overflow: hidden; }
.no-js .photo-add { display: none; }
.photo-count { font-size: 0.95rem; font-weight: 600; }
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 0; list-style: none; padding: 0; max-width: 560px; }
@media (min-width: 720px) { .thumbs { grid-template-columns: repeat(4, 1fr); } }
.thumbs li { position: relative; aspect-ratio: 1 / 1; border: 1px solid var(--line); background: var(--photo-mat); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs button {
  position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; border: 1px solid var(--ink);
  background: #fff; border-radius: 2px; cursor: pointer; display: grid; place-items: center; padding: 0; color: var(--ink);
}
.thumbs button .ico { width: 20px; height: 20px; }

.tickets { display: grid; gap: 12px; max-width: 760px; }
@media (min-width: 720px) { .tickets { grid-template-columns: 1fr 1fr; align-items: stretch; } }
.tk { position: relative; }
.tk input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.tk label { display: block; height: 100%; padding: 16px 16px 18px; border: 1px solid var(--line-strong); border-radius: 2px; cursor: pointer; }
.tk-urgent label { background: var(--urgent-bg); border-left: 4px solid var(--copper); }
.tk-normal label { background: var(--normal-bg); }
.tk-name { display: inline-block; font-weight: 700; font-size: 1.05rem; margin-bottom: 8px; }
.tk-urgent .tk-name { border: 2px solid var(--copper); color: var(--copper-ink); padding: 1px 8px; transform: rotate(-1.5deg); }
.tk-normal .tk-name { border-bottom: 2px solid var(--ink); }
.tk p { margin: 0; font-size: 0.95rem; max-width: none; }
.tk input:checked + label { outline: 2px solid var(--ink); outline-offset: -2px; }
.tk input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 2px; }
.tk-date { margin-top: 16px; display: grid; gap: 12px; max-width: 560px; }
@media (min-width: 720px) { .tk-date { grid-template-columns: 1fr 1fr; } }
.tk-date .field { margin: 0; }

.apps { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 16px; max-width: none; }
.apps li { position: relative; }
.apps input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.apps label { display: inline-flex; align-items: center; min-height: 48px; padding: 0 16px; border: 1px solid var(--line-strong); background: var(--bg-raised); border-radius: 2px; font-weight: 600; cursor: pointer; }
.apps input:checked + label { border: 2px solid var(--ink); padding: 0 15px; background: #fff; }
.apps input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 2px; }

.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 0.95rem; max-width: 560px; cursor: pointer; }
.consent input { width: 24px; height: 24px; margin: 2px 0 0; flex: none; accent-color: var(--ok); }
.submit-row { margin-top: 24px; }
.status { margin-top: 12px; font-weight: 600; min-height: 1.5em; }
.status.err { color: var(--danger); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- guided questions (intake) ---- */
.svc-continue { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.svc-continue .btn { min-height: 48px; }
.svc-continue .hint { margin: 0; }
.js .svc-continue { display: none; }
.intake { margin: -16px 0 40px; max-width: 760px; }
.iq { border-left: 3px solid var(--line-strong); padding: 4px 0 4px 16px; }
.iq-title { font-size: 1.1rem; margin: 0 0 4px; }
.iq-empty { margin: 0; }
.form .q { margin: 20px 0 0; }
.form .q legend { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.q-sub { font-weight: 400; font-size: 0.88rem; color: var(--ink-soft); }
.opts { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; max-width: none; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.opt label {
  display: inline-flex; align-items: center; min-height: 48px; padding: 8px 16px; border: 1px solid var(--line-strong);
  background: var(--bg-raised); border-radius: 2px; font-weight: 600; cursor: pointer; line-height: 1.3;
}
.opt input:checked + label { border: 2px solid var(--copper); padding: 7px 15px; background: #fff; }
.q-multi .opt input:checked + label::before { content: ""; width: 10px; height: 6px; border-left: 2px solid var(--copper); border-bottom: 2px solid var(--copper); transform: rotate(-45deg) translateY(-2px); margin-right: 10px; }
.opt input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 2px; }
.q-text { max-width: 360px; }
.q-num { max-width: 120px; }
.q .hint { margin: 6px 0 8px; }
.q-photo { display: flex; gap: 8px; align-items: flex-start; font-size: 0.9rem; color: var(--ink-soft); margin: 10px 0 0; max-width: 60ch; }
.q-photo .ico { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.q-photo b { color: var(--ink); font-weight: 600; }
.iq-photo { margin-top: 20px; }
.safety { display: block; margin: 12px 0 0; padding: 10px 14px; border: 2px solid var(--danger); background: var(--bg-raised); font-size: 0.95rem; max-width: 60ch; }
.safety b { color: var(--danger); }
/* JS reveals notes for chosen answers. Without JS they stay visible unless :has() can do the same. */
html.js .safety:not(.on) { display: none; }
.urgent-suggest { display: none; margin: 16px 0 0; padding: 10px 14px; background: var(--urgent-bg); border-left: 4px solid var(--copper); font-size: 0.95rem; max-width: 60ch; }
.urgent-suggest b { color: var(--copper-ink); }
fieldset .urgent-suggest { margin: 0 0 12px; }
.suggest-urgent .urgent-suggest { display: block; }
@supports selector(:has(a)) {
  html.no-js .form:has(.iq input[data-urgent]:checked) .urgent-suggest { display: block; }
  html.no-js .q:not(:has(input[data-safety="gas"]:checked)) .safety[data-safety="gas"]:not(.on),
  html.no-js .q:not(:has(input[data-safety="electric"]:checked)) .safety[data-safety="electric"]:not(.on),
  html.no-js .q:not(:has(input[data-safety="water"]:checked)) .safety[data-safety="water"]:not(.on),
  html.no-js .q:not(:has(input[data-safety="wet_electric"]:checked)) .safety[data-safety="wet_electric"]:not(.on),
  html.no-js .q:not(:has(input[data-safety="overflow"]:checked)) .safety[data-safety="overflow"]:not(.on),
  html.no-js .q:not(:has(input[data-safety="lockout"]:checked)) .safety[data-safety="lockout"]:not(.on) { display: none; }
}
.thanks .safety { margin: 0 0 20px; }

/* ---- admin summary card ---- */
.sum-card { border: 1px solid var(--ink); background: var(--bg-raised); padding: 16px; max-width: 720px; margin: 0 0 24px; }
.sum-card h2 { font-size: 1.2rem; margin: 0 0 12px; }
.sum-card dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 12px; }
.sum-card dt { font-weight: 600; color: var(--ink-soft); }
.sum-card dd { margin: 0; overflow-wrap: anywhere; }
.sum-warn { border: 2px solid var(--danger); padding: 6px 10px; font-weight: 700; color: var(--danger); margin: 0 0 12px; }
.sum-card textarea { min-height: 180px; font-size: 0.9rem; background: #fff; }
.sum-copy { display: flex; gap: 12px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.no-js .sum-copy button { display: none; }
.sum-short { display: block; font-size: 0.82rem; color: var(--ink-soft); margin-top: 2px; }

/* ---- next steps / faq / misc ---- */
.next ol { padding-left: 1.3rem; margin: 0; }
.next li { margin-bottom: 10px; }
.faq details { border-top: 1px solid var(--line); max-width: 720px; }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { padding: 16px 44px 16px 0; font-weight: 600; cursor: pointer; position: relative; list-style: none; min-height: 48px; line-height: 1.4; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 10px; top: 50%; width: 11px; height: 11px; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: translateY(-75%) rotate(45deg); transition: transform 120ms; }
.faq details[open] summary::after { transform: translateY(-25%) rotate(-135deg); }
.faq details p { padding: 0 0 18px; margin: 0; max-width: 62ch; }

.nationwide p { max-width: 64ch; }

/* ---- footer ---- */
footer { border-top: 1px solid var(--line-strong); padding: 32px 0 128px; font-size: 0.9rem; color: var(--ink-soft); }
.footer-cols { display: grid; gap: 28px; }
@media (min-width: 720px) { .footer-cols { grid-template-columns: 1.2fr 1fr 1fr; gap: 40px; } }
footer h2 { font-size: 1rem; color: var(--ink); margin-bottom: 8px; letter-spacing: 0; }
.biz { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 0; }
.biz dt { font-weight: 600; }
.biz dd { margin: 0; overflow-wrap: anywhere; }
.contacts { list-style: none; padding: 0; margin: 0; }
.contacts li { padding: 2px 0; }
.contacts b { color: var(--ink); font-weight: 600; }
.ph { color: var(--ink-soft); border-bottom: 1px dashed var(--line-strong); }
.ph-note { font-size: 0.8rem; margin-top: 16px; }
.footer-langs { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.footer-langs a { color: var(--ink-soft); }

/* ---- sticky request bar ---- */
.sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: 8px var(--pad) calc(8px + env(safe-area-inset-bottom, 0px));
  background: var(--bg-raised); border-top: 1px solid var(--line-strong);
  display: flex; justify-content: flex-end; align-items: center; gap: 16px;
}
.sticky .sub { font-size: 0.85rem; color: var(--ink-soft); display: none; margin: 0; }
@media (min-width: 420px) { .sticky .sub { display: block; } }
.sticky .btn { min-height: 48px; }
@media (min-width: 900px) {
  .sticky { left: auto; right: 24px; bottom: 24px; border: 1px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); padding: 8px 8px 8px 16px; }
}
.sticky { display: none; }
body.past-hero .sticky { display: flex; }
body.form-visible .sticky, body.form-focus .sticky { display: none; }

/* ---- thanks ---- */
.thanks { border-top: 0; padding: 48px 0 64px; }
.code { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 0.06em; border: 2px solid var(--ink); display: inline-block; padding: 8px 18px; background: var(--bg-raised); margin: 8px 0 20px; }

/* ---- language picker (root) ---- */
.picker { border-top: 0; padding: 32px 0 48px; }
.picker h1 { font-size: clamp(1.4rem, 5.5vw, 2rem); max-width: 30ch; }
.lang-list { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 10px; max-width: none; }
@media (min-width: 600px) { .lang-list { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .lang-list { grid-template-columns: repeat(3, 1fr); } }
.lang-list a {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 76px; padding: 14px 20px;
  border: 1px solid var(--line-strong); background: var(--bg-raised); color: var(--ink); text-decoration: none;
  font-size: 1.45rem; font-weight: 700; border-radius: 2px; line-height: 1.3;
}
.lang-list a .ln { white-space: nowrap; flex: none; }
.lang-list a small { font-size: 0.82rem; font-weight: 400; color: var(--ink-soft); text-align: right; }
.lang-list a:hover { border-color: var(--ink); background: #fff; }
.lang-list a.suggest { border: 2px solid var(--copper); padding: 13px 19px; }
.picker-slogans { border-left: 3px solid var(--copper); padding: 4px 0 4px 16px; margin: 0 0 8px; max-width: 46ch; }
.picker-slogans p { margin: 0 0 4px; font-weight: 600; }
.picker-slogans .ko { color: var(--ink-soft); font-weight: 400; }
.picker-photo { margin: 32px 0 0 48px; }
@media (min-width: 720px) { .picker-photo { margin: 40px 0 0 25%; } }
.picker-photo img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; max-height: 360px; border: 1px solid var(--line); background: var(--photo-mat); }
.picker-foot { padding: 24px 0 40px; font-size: 0.85rem; color: var(--ink-soft); }

/* ---- admin ---- */
.admin { border-top: 0; padding: 24px 0 48px; }
.admin h1 { font-size: 1.5rem; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 20px; max-width: none; }
.admin-nav a { display: inline-block; padding: 8px 12px; border: 1px solid var(--line-strong); background: var(--bg-raised); color: var(--ink); text-decoration: none; font-size: 0.9rem; min-height: 40px; }
.admin-nav a[aria-current] { border: 2px solid var(--ink); background: #fff; }
.admin table { width: 100%; border-collapse: collapse; font-size: 0.9rem; max-width: none; }
.admin th, .admin td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin th { font-weight: 600; border-bottom: 1px solid var(--line-strong); }
.tag { display: inline-block; border: 1px solid var(--line-strong); padding: 0 6px; font-size: 0.8rem; font-weight: 600; white-space: nowrap; }
.tag-urgent { background: var(--urgent-bg); border-color: var(--copper); color: var(--copper-ink); }
.tag-normal { background: var(--normal-bg); }
.admin-photos { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 8px 0; max-width: none; }
.admin-photos img { width: 160px; height: 160px; object-fit: cover; border: 1px solid var(--line); display: block; background: var(--photo-mat); }
.admin dl.biz { max-width: 720px; }
.admin pre { white-space: pre-wrap; font: inherit; background: var(--bg-raised); border: 1px solid var(--line); padding: 12px; max-width: 720px; }
@media (max-width: 720px) {
  .admin table, .admin thead, .admin tbody, .admin tr, .admin td { display: block; }
  .admin thead { display: none; }
  .admin tr { border: 1px solid var(--line-strong); margin-bottom: 12px; padding: 8px 12px; background: var(--bg-raised); }
  .admin td { border: 0; padding: 4px 0; }
  .admin td::before { content: attr(data-l) ": "; font-weight: 600; }
  .admin td.nolabel::before { content: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print { .sticky, .langs, .skip { display: none !important; } }

/* ---- hero order: CTA right after the support line, longer lead after it ---- */
.hero .cta-sub + .lead { margin-top: 20px; }
.picker .lang-list { margin-top: 20px; }
.picker-slogans { margin-top: 8px; }

/* ---- narrow screens: labels above values (footer business info, admin, private page) ---- */
@media (max-width: 560px) {
  .biz, .sum-card dl { grid-template-columns: 1fr; gap: 0; }
  .biz dt, .sum-card dt { margin-top: 8px; }
  .biz dt:first-child, .sum-card dt:first-child { margin-top: 0; }
}

/* ---- private request page ---- */
.mr h2 { margin-top: 32px; }
.mr-stage { border: 1px solid var(--ink); background: var(--bg-raised); padding: 16px; margin: 20px 0; max-width: 640px; }
.mr-stage .lbl { margin: 0 0 4px; color: var(--ink-soft); }
.mr-stage h2 { margin: 0 0 8px; font-size: 1.25rem; }
.mr-stage p:last-child { margin-bottom: 0; }
.mr-meta { max-width: 640px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 8px; }
.mr-prop { border: 1px solid var(--line); border-radius: 2px; background: var(--bg-raised); padding: 16px; margin: 0 0 16px; max-width: 640px; }
.mr-prop-pending { border: 2px solid var(--copper); padding: 15px; }
.mr-prop-superseded { opacity: 0.75; }
.mr-prop h3 { margin: 0 0 12px; }
.mr-rev { font-weight: 400; color: var(--ink-soft); font-size: 0.9rem; }
.mr-st-pending { background: var(--urgent-bg); border-color: var(--copper); color: var(--copper-ink); }
.mr-st-approved { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.mr-photos { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.mr-photos img { width: 140px; height: 140px; object-fit: cover; display: block; border: 1px solid var(--line); background: var(--photo-mat); }
.mr-decide { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.mr-buttons { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.mr-hold { border-left: 3px solid var(--copper); padding: 4px 0 4px 12px; font-weight: 600; margin: 12px 0 0; }
/* Chat thread: one chronological list. SameFix at the start edge, the customer at the end edge.
   Almost-square corners, 1px hairlines, no shadows, no avatars. */
.mr-thread { list-style: none; padding: 0; margin: 0 0 20px; max-width: 640px; display: flex; flex-direction: column; gap: 12px; }
.mr-item { display: flex; flex-direction: column; align-items: flex-start; }
.mr-item-you { align-items: flex-end; }
.mr-bubble { max-width: min(88%, 34rem); border: 1px solid var(--line); border-radius: 2px; background: var(--bg-raised); padding: 10px 14px; }
.mr-item-you .mr-bubble { background: var(--normal-bg); border-color: var(--line-strong); }
.mr-item-status .mr-bubble { background: transparent; border-style: solid; border-color: var(--line); padding: 6px 12px; }
.mr-item-status .mr-body { font-weight: 600; }
.mr-bubble-card { max-width: 100%; width: 100%; border: 0; padding: 0; background: transparent; }
.mr-bubble-card .mr-prop { margin: 8px 0 0; max-width: none; }
.mr-lead { margin: 0 0 4px; }
.mr-from { margin: 0 0 4px; font-size: 0.85rem; color: var(--ink-soft); }
.mr-from b { color: var(--ink); margin-inline-end: 6px; }
.mr-body { white-space: pre-wrap; margin: 0; overflow-wrap: anywhere; }
.mr-item-decision .mr-decision-note { margin: 6px 0 0; }
.mr-jump { margin: 8px 0 0; }
.mr-jump a { display: inline-flex; align-items: center; min-height: 48px; font-weight: 600; color: var(--copper-ink); }
.mr-compose .btn, .mr-buttons .btn { min-height: 52px; min-width: 48px; }
.mr-compose { max-width: 640px; }
.mr-steps { padding-left: 1.3rem; max-width: 64ch; }
.mr-steps li { margin-bottom: 8px; }
.mr-withdraw { border-top: 1px solid var(--line); padding: 24px 0 0; margin-top: 32px; }
.mr-notice { color: var(--ok); }

/* ---- admin: customer page section ---- */
.adm-customer, .op-card { border: 1px solid var(--line-strong); background: var(--bg-raised); padding: 16px; max-width: 720px; margin: 0 0 24px; }
.adm-customer h2, .op-card h2 { font-size: 1.2rem; margin: 0 0 12px; }
.adm-customer h3 { margin-top: 20px; }
.adm-pending { border: 2px solid var(--copper); padding: 10px 12px; margin: 12px 0; background: #fff; }
.adm-props, .adm-thread { list-style: none; padding: 0; margin: 0 0 12px; max-width: none; }
.adm-prop, .adm-msg { border-top: 1px solid var(--line); padding: 8px 0; }
.adm-prop p { margin: 0 0 6px; }
.adm-msg pre { margin: 0; }
.adm-msg-staff { padding-left: 10px; border-left: 3px solid var(--ok); }
.adm-link { border: 2px solid var(--ink); background: #fff; padding: 10px 12px; margin: 12px 0; }
.adm-link textarea { font-size: 0.85rem; }
.adm-linkforms { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-pending { background: var(--urgent-bg); border-color: var(--copper); color: var(--copper-ink); }


.num.nowrap { white-space: nowrap; }
.adm-jump { margin: 0 0 1rem; font-size: 0.95rem; }
.mr-leave { margin-top: 0.35rem; }
.mr-id { margin: 0 0 0.75rem; }
.mr-tech { margin: 0.75rem 0; }
.mr-decision-note { margin: 0.5rem 0; }

/* Admin: chat compose, translation slots, notify pack */
.adm-compose { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.adm-canned { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; }
.adm-canned .field { flex: 1 1 260px; margin-bottom: 0; }
.js .adm-canned-load { display: none; }
.no-js .adm-suggest { display: none; }
.adm-buttons { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 0 0 12px; }
.adm-buttons .btn, .adm-compose .btn, .adm-ko .btn { min-height: 48px; }
.adm-ko { margin-top: 8px; }
.adm-ko textarea { min-height: 72px; }
.adm-ko-main { font-weight: 600; margin: 0 0 8px; }
.adm-msg-event .lbl { margin: 0; color: var(--ink-soft); }
