/* =====================================================================
   muuttoboksi.com: tyylit
   Brändi: korallinpunainen laatikko, keltainen kansi, kermanvalkoinen pohja.
   Fontit: Baloo 2 (otsikot) ja Nunito (teksti), palvelimelta itseltä.
   ===================================================================== */

@font-face {
  font-family: 'Baloo 2';
  src: url('/fonts/baloo2-latin.woff2') format('woff2');
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('/fonts/nunito-latin.woff2') format('woff2');
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  /* Sivun leveys ja reunat: kapealla 16 px, leveällä näytöllä enintään 64 px */
  --page-max: 1600px;
  --page-pad: clamp(16px, 4vw, 64px);

  /* Ydinvärit */
  --coral: #ff7a5c;
  --coral-deep: #e35f42;
  --lid: #f6c453;
  --cream: #fff8f0;

  /* Semanttiset, vaalea teema */
  --bg: #fff8f0;
  --bg-tint: #fff1e4;
  --surface: #ffffff;
  --surface-2: #fff4ea;
  --surface-3: #ffe9da;
  --line: #f1dccd;
  --line-strong: #e6c6b2;
  --ink: #3a2e28;
  --ink-2: #7a6156;
  --ink-3: #a58a7d;
  --brand: #ff7a5c;
  --brand-hover: #ff6a48;
  --on-brand: #2b1a14;
  --brand-ink: #b4432a;
  --brand-soft: #ffe4da;
  --accent: #f6c453;
  --accent-soft: #fff0c7;
  --accent-ink: #7a5a00;
  --success: #2f8a5b;
  --success-soft: #dcf2e5;
  --danger: #c1432a;
  --danger-soft: #fde3dc;
  --focus: #2f6feb;
  --shadow-sm: 0 1px 2px rgb(90 50 30 / 0.06), 0 1px 1px rgb(90 50 30 / 0.04);
  --shadow: 0 1px 2px rgb(90 50 30 / 0.05), 0 8px 24px -8px rgb(90 50 30 / 0.16);
  --shadow-lg: 0 24px 60px -16px rgb(90 50 30 / 0.3);
  --scrim: rgb(40 25 18 / 0.45);

  --font-head: 'Baloo 2', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Nunito', 'Segoe UI', system-ui, sans-serif;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --pill: 999px;

  --gutter: 16px;
  --sidebar: 248px;
  --tabbar: 68px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #1c1512;
    --bg-tint: #221a16;
    --surface: #271e1a;
    --surface-2: #2f2520;
    --surface-3: #3a2d26;
    --line: #3e302a;
    --line-strong: #54413a;
    --ink: #fbeee4;
    --ink-2: #c9ad9d;
    --ink-3: #9a8174;
    --brand: #ff8a6e;
    --brand-hover: #ff9c84;
    --on-brand: #2b1a14;
    --brand-ink: #ffa48d;
    --brand-soft: #4a2a20;
    --accent-soft: #4a3a14;
    --accent-ink: #f6c453;
    --success: #6fd39d;
    --success-soft: #1f3a2b;
    --danger: #ff8f7a;
    --danger-soft: #4a221b;
    --focus: #7aa7ff;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.3);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px -8px rgb(0 0 0 / 0.5);
    --shadow-lg: 0 24px 60px -16px rgb(0 0 0 / 0.7);
    --scrim: rgb(0 0 0 / 0.6);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #1c1512;
  --bg-tint: #221a16;
  --surface: #271e1a;
  --surface-2: #2f2520;
  --surface-3: #3a2d26;
  --line: #3e302a;
  --line-strong: #54413a;
  --ink: #fbeee4;
  --ink-2: #c9ad9d;
  --ink-3: #9a8174;
  --brand: #ff8a6e;
  --brand-hover: #ff9c84;
  --on-brand: #2b1a14;
  --brand-ink: #ffa48d;
  --brand-soft: #4a2a20;
  --accent-soft: #4a3a14;
  --accent-ink: #f6c453;
  --success: #6fd39d;
  --success-soft: #1f3a2b;
  --danger: #ff8f7a;
  --danger-soft: #4a221b;
  --focus: #7aa7ff;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.3);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px -8px rgb(0 0 0 / 0.5);
  --shadow-lg: 0 24px 60px -16px rgb(0 0 0 / 0.7);
  --scrim: rgb(0 0 0 / 0.6);
  color-scheme: dark;
}

/* ---------- Perusta ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  line-height: 1.12;
  margin: 0;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 {
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem);
  font-weight: 800;
}
h2 {
  font-size: 1.45rem;
  font-weight: 700;
}
h3 {
  font-size: 1.12rem;
  font-weight: 700;
}
p {
  margin: 0;
  text-wrap: pretty;
}
a {
  color: var(--brand-ink);
  text-underline-offset: 3px;
}
img {
  max-width: 100%;
  display: block;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}
/* Ikonien oletuskoko; tarkemmat säännöt ohittavat tämän. */
:where(svg[aria-hidden='true']:not([width]):not([class])) {
  width: 1.2em;
  height: 1.2em;
  flex: none;
  vertical-align: -0.2em;
}
[tabindex='-1']:focus {
  outline: none;
}
::selection {
  background: var(--accent);
  color: #2b1a14;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.tnum {
  font-variant-numeric: tabular-nums;
}
.muted {
  color: var(--ink-2);
}
.small {
  font-size: 0.875rem;
}
.center {
  text-align: center;
}
.nowrap {
  white-space: nowrap;
}
@media (max-width: 440px) {
  .hide-xs {
    display: none !important;
  }
}

/* ---------- Asettelun apurit ---------- */

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--gap, 16px);
}
.stack-sm {
  --gap: 8px;
}
.stack-lg {
  --gap: 28px;
}
.row {
  display: flex;
  align-items: center;
  gap: var(--gap, 12px);
  flex-wrap: wrap;
}
.row-tight {
  --gap: 8px;
}
.spread {
  justify-content: space-between;
}
.grow {
  flex: 1 1 auto;
  min-width: 0;
}
.grid {
  display: grid;
  gap: 16px;
}
.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}
.grid-3 {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
}

/* ---------- Logo ---------- */

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.28rem;
  letter-spacing: -0.01em;
  line-height: 1;
}
.logo svg {
  flex: none;
}
.logo-dot {
  color: var(--coral-deep);
}
:root[data-theme='dark'] .logo-dot {
  color: var(--brand);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .logo-dot {
    color: var(--brand);
  }
}

/* ---------- Painikkeet ---------- */

.btn {
  --btn-bg: var(--surface);
  --btn-ink: var(--ink);
  --btn-line: var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--pill);
  border: 1.5px solid var(--btn-line);
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.15s var(--ease), box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn:hover {
  border-color: var(--ink-3);
}
.btn:active {
  transform: scale(0.97);
}
.btn[disabled],
.btn[aria-busy='true'] {
  opacity: 0.6;
  pointer-events: none;
}
.btn svg {
  width: 20px;
  height: 20px;
  flex: none;
}
.btn-primary {
  --btn-bg: var(--brand);
  --btn-ink: var(--on-brand);
  --btn-line: transparent;
  box-shadow: 0 1px 0 rgb(0 0 0 / 0.04), 0 6px 16px -6px rgb(227 95 66 / 0.55);
}
.btn-primary:hover {
  --btn-bg: var(--brand-hover);
  border-color: transparent;
}
.btn-accent {
  --btn-bg: var(--accent);
  --btn-ink: #2b1a14;
  --btn-line: transparent;
}
.btn-ghost {
  --btn-bg: transparent;
  --btn-line: transparent;
}
.btn-ghost:hover {
  --btn-bg: var(--surface-2);
  border-color: transparent;
}
.btn-danger {
  --btn-ink: var(--danger);
  --btn-line: color-mix(in srgb, var(--danger) 40%, transparent);
}
.btn-danger:hover {
  --btn-bg: var(--danger-soft);
  border-color: var(--danger);
}
.btn-danger-solid {
  --btn-bg: var(--danger);
  --btn-ink: #fff;
  --btn-line: transparent;
}
.btn-sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.875rem;
}
.btn-sm svg {
  width: 18px;
  height: 18px;
}
.btn-lg {
  min-height: 54px;
  padding: 0 26px;
  font-size: 1.05rem;
}
.btn-block {
  width: 100%;
}
.icon-btn {
  text-decoration: none;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--pill);
  border: 0;
  background: transparent;
  color: var(--ink);
  flex: none;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:hover {
  background: var(--surface-2);
}
.icon-btn svg {
  width: 22px;
  height: 22px;
}
.link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--brand-ink);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.5px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.7s linear infinite;
  flex: none;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Lomakkeet ---------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.label {
  font-weight: 800;
  font-size: 0.9rem;
}
.label-opt {
  font-weight: 600;
  color: var(--ink-2);
}
.input,
.select,
.textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 1rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.textarea {
  min-height: 96px;
  resize: vertical;
}
.input::placeholder,
.textarea::placeholder {
  color: var(--ink-3);
}
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent);
}
.select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23a58a7d' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 8 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.hint {
  font-size: 0.85rem;
  color: var(--ink-2);
}
.form-error {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--danger-soft);
  color: var(--danger);
  font-weight: 700;
  font-size: 0.92rem;
}
.form-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 0.92rem;
}
.form-note svg,
.form-error svg {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 1px;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 700;
}
.check input {
  width: 20px;
  height: 20px;
  accent-color: var(--coral-deep);
  flex: none;
}

/* Kuusinumeroinen koodi */
.code-input {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.7rem;
  letter-spacing: 0.32em;
  text-align: center;
  padding-left: calc(14px + 0.32em);
  font-variant-numeric: tabular-nums;
  min-height: 60px;
}

/* Valintakortit (sijainti, perhe) */
.choice-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
}
.choice {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: var(--r);
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  min-height: 60px;
}
.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.choice:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px var(--brand);
}
.choice:has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.choice-title {
  font-weight: 800;
  line-height: 1.25;
}
.choice-sub {
  font-size: 0.82rem;
  color: var(--ink-2);
}
.choice-add {
  border-style: dashed;
  color: var(--brand-ink);
  font-weight: 800;
  justify-content: center;
  background: transparent;
}

/* Segmentoitu valitsin */
.segmented {
  display: inline-flex;
  padding: 4px;
  border-radius: var(--pill);
  background: var(--surface-2);
  border: 1px solid var(--line);
  gap: 2px;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.segmented button {
  border: 0;
  background: transparent;
  padding: 7px 14px;
  border-radius: var(--pill);
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--ink-2);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.segmented button[aria-pressed='true'] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.segmented .count {
  font-size: 0.78rem;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* ---------- Kortit, merkit ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.card-pad {
  padding: 22px;
}
@media (max-width: 600px) {
  .card-pad {
    padding: 18px;
  }
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title svg {
  width: 22px;
  height: 22px;
  color: var(--brand-ink);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--pill);
  font-size: 0.78rem;
  font-weight: 800;
  background: var(--surface-2);
  color: var(--ink-2);
  white-space: nowrap;
  line-height: 1.4;
}
.badge svg {
  width: 14px;
  height: 14px;
}
.badge-moved {
  background: var(--success-soft);
  color: var(--success);
}
.badge-open {
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.badge-family {
  background: var(--brand-soft);
  color: var(--brand-ink);
}
.badge-pending {
  background: var(--surface-3);
  color: var(--ink-2);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--pill);
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 0.88rem;
  font-weight: 700;
  max-width: 100%;
}
.chip > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chip button {
  border: 0;
  background: transparent;
  padding: 0;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: -6px;
  border-radius: 50%;
  color: var(--ink-2);
}
.chip button:hover {
  background: var(--surface-3);
  color: var(--danger);
}
.chip button svg {
  width: 14px;
  height: 14px;
}
mark {
  background: var(--accent);
  color: #2b1a14;
  border-radius: 4px;
  padding: 0 2px;
}

/* ---------- Tyhjät tilat ---------- */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 44px 20px;
}
.empty-art {
  width: 96px;
  height: 96px;
  margin-bottom: 4px;
}
.empty p {
  color: var(--ink-2);
  max-width: 42ch;
}

.skeleton {
  border-radius: var(--r);
  background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2));
  background-size: 200% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
}
@keyframes shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

/* =====================================================================
   Sovelluksen kehys
   ===================================================================== */

.app-shell {
  min-height: 100dvh;
}
.sidebar {
  display: none;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 60px;
  padding: 0 8px 0 var(--gutter);
  padding-top: env(safe-area-inset-top);
  box-sizing: content-box;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.topbar.scrolled {
  border-bottom-color: var(--line);
}
.app-content {
  min-width: 0;
}
.app-main {
  padding: 18px var(--gutter) calc(var(--tabbar) + 40px + env(safe-area-inset-bottom));
}

.tabbar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  height: calc(var(--tabbar) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(16px);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  border-top: 1px solid var(--line);
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: var(--tabbar);
  text-decoration: none;
  color: var(--ink-3);
  font-size: 0.7rem;
  font-weight: 800;
  -webkit-tap-highlight-color: transparent;
  background: none;
  border: 0;
}
.tab svg {
  width: 24px;
  height: 24px;
}
.tab[aria-current='page'] {
  color: var(--brand-ink);
}
.tab-scan {
  position: relative;
}
.tab-scan .scan-orb {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-top: -26px;
  border-radius: 20px;
  background: var(--brand);
  color: var(--on-brand);
  box-shadow: 0 10px 24px -8px rgb(227 95 66 / 0.7), 0 0 0 5px var(--bg);
  transition: transform 0.2s var(--ease);
}
.tab-scan:active .scan-orb {
  transform: scale(0.92);
}
.tab-scan .scan-orb svg {
  width: 28px;
  height: 28px;
}

@media (min-width: 960px) {
  .app-shell {
    display: grid;
    grid-template-columns: var(--sidebar) 1fr;
  }
  .topbar,
  .tabbar {
    display: none;
  }
  .sidebar {
    position: sticky;
    top: 0;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 22px 16px;
    border-right: 1px solid var(--line);
    background: var(--bg-tint);
  }
  .sidebar .logo {
    padding: 4px 10px 20px;
  }
  .app-main {
    padding: 36px clamp(32px, 3.5vw, 64px) 64px;
    width: 100%;
  }
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--ink-2);
  font-weight: 800;
  transition: background 0.15s, color 0.15s;
}
.nav-link svg {
  width: 22px;
  height: 22px;
  flex: none;
}
.nav-link:hover {
  background: var(--surface-2);
  color: var(--ink);
}
.nav-link[aria-current='page'] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.nav-link[aria-current='page'] svg {
  color: var(--brand-ink);
}
.sidebar-scan {
  margin: 10px 0 14px;
}
.sidebar-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--ink);
}
.user-chip:hover {
  background: var(--surface-2);
}
.avatar {
  text-decoration: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--accent);
  color: #2b1a14;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.82rem;
  line-height: 1;
  letter-spacing: 0.02em;
  flex: none;
}
.user-chip .name {
  font-weight: 800;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-chip .email {
  font-size: 0.78rem;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Sivun otsikko */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.page-head p {
  color: var(--ink-2);
  margin-top: 6px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  color: var(--ink-2);
  font-weight: 800;
  font-size: 0.9rem;
  text-decoration: none;
}
.back-link:hover {
  color: var(--ink);
}
.back-link svg {
  width: 18px;
  height: 18px;
}

/* Sivunvaihdon animaatio */
.view-enter {
  animation: view-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes view-in {
  from {
    opacity: 0;
    transform: translate3d(0, 12px, 0);
  }
}
/* Latausluurangon tilalle tuleva sisältö: pelkkä häivytys, ei liikettä. */
.reveal {
  animation: reveal 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes reveal {
  from {
    opacity: 0;
  }
}
/* Kuvat häivytetään esiin latautuessaan. */
.fade-img {
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.fade-img.loaded {
  opacity: 1;
}
@media print {
  .fade-img {
    opacity: 1 !important;
    transition: none !important;
  }
}
/* Koristekuvat eivät ole tekstiä: niitä ei voi valita eikä kopioida. */
[aria-hidden='true'],
.mock {
  user-select: none;
  -webkit-user-select: none;
}
.mock {
  pointer-events: none;
}

/* =====================================================================
   Julkinen kehys (etusivu, kirjautuminen, ehdot)
   ===================================================================== */

/* Yläpalkki: kelluva, pyöristetty palkki sivun yläreunassa */
/* ---------- Julkisten sivujen yläpalkki ----------
 * Selkeä valkoinen palkki ohuella alaviivalla. Tekstilinkit, aktiivinen sivu
 * tummana ja ohut viiva alla. Puhelimella valikko koko näytön valkoisena kerroksena.
 */
.hd {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top);
  background: color-mix(in srgb, #fff 88%, transparent);
  backdrop-filter: saturate(1.6) blur(18px);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s, background 0.4s;
}
.hd.scrolled {
  border-bottom-color: var(--line);
}
.hd-bar {
  position: relative;
  z-index: 2;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--page-pad);
  height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.hd-bar .logo {
  flex: none;
}
.hd-links {
  display: none;
  gap: 6px;
  margin: 0 auto;
}
.hd-links a {
  position: relative;
  padding: 8px 12px;
  color: var(--ink-2);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.2s;
}
.hd-links a::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.hd-links a:hover,
.hd-links a[aria-current='page'] {
  color: var(--ink);
}
.hd-links a[aria-current='page']::after {
  transform: scaleX(1);
}
.hd-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}
.hd-actions > .lang-switch,
.hd-login {
  display: none;
}
.hd-login {
  color: var(--ink);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
}
.hd-login:hover {
  color: var(--brand-ink);
}
.hd-cta {
  min-height: 42px;
  padding: 0 18px;
  font-size: 0.95rem;
}
.hd-menu {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.hd-burger {
  position: relative;
  width: 18px;
  height: 9px;
}
.hd-burger i {
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), top 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.hd-burger i:first-child {
  top: 0;
}
.hd-burger i:last-child {
  top: 7px;
}
.hd.open .hd-burger i:first-child {
  top: 3.5px;
  transform: rotate(45deg);
}
.hd.open .hd-burger i:last-child {
  top: 3.5px;
  transform: rotate(-45deg);
}
@media (min-width: 1040px) {
  .hd-links {
    display: flex;
  }
  .hd-actions > .lang-switch,
  .hd-login {
    display: inline-flex;
  }
  .hd-menu {
    display: none;
  }
}
@media (max-width: 560px) {
  .hd-bar {
    height: 64px;
  }
  .hd-cta {
    display: none;
  }
}

/* Koko näytön valikko */
.hd-sheet {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: calc(92px + env(safe-area-inset-top)) var(--page-pad) calc(24px + env(safe-area-inset-bottom));
  background: #fff;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s 0.4s;
}
.hd.open .hd-sheet {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.hd.open {
  background: #fff;
}
.hd-locked,
.hd-locked body {
  overflow: hidden;
}
.hd-sheet-links {
  display: grid;
}
.hd-sheet-links a {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.9rem;
  line-height: 1.1;
  text-decoration: none;
  opacity: 0;
  transform: translate3d(0, 12px, 0);
  transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1), transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.hd.open .hd-sheet-links a {
  opacity: 1;
  transform: none;
  transition-delay: calc(80ms + var(--i, 0) * 45ms);
}
.hd-sheet-links a[aria-current='page'] {
  color: var(--brand-ink);
}
.hd-sheet-foot {
  display: grid;
  gap: 10px;
}
.hd-sheet-foot .lang-switch {
  justify-self: start;
  margin-top: 6px;
}
@media (min-width: 1040px) {
  .hd-sheet {
    display: none;
  }
}

/* ---------- Julkisten sivujen alapalkki ----------
 * Valkoinen, ohut yläviiva. Logo ja kuvaus, neljä linkkisaraketta ja alarivi:
 * tekijänoikeus, evästeasetukset tekstilinkkinä ja kieli.
 */
.ft {
  padding: clamp(56px, 7vw, 96px) var(--page-pad) calc(28px + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
}
.ft-inner {
  max-width: var(--page-max);
  margin: 0 auto;
}
.ft-top {
  display: grid;
  gap: 40px;
  padding-bottom: clamp(40px, 5vw, 64px);
}
@media (min-width: 960px) {
  .ft-top {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 2fr);
    gap: 64px;
  }
}
.ft-brand p {
  margin: 14px 0 0;
  max-width: 26em;
  line-height: 1.6;
}
.ft-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 24px;
}
@media (min-width: 760px) {
  .ft-cols {
    grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.3fr);
  }
}
@media (max-width: 759px) {
  .ft-col:last-child {
    grid-column: 1 / -1;
  }
}
.ft-col h3 {
  margin: 0 0 14px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--ink);
}
.ft-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.ft-col a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.95rem;
  overflow-wrap: break-word;
  transition: color 0.2s;
}
.ft-col a:hover {
  color: var(--ink);
}
.ft-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
}
.ft-bottom p {
  margin: 0 auto 0 0;
}
/* Evästeasetukset pelkkänä tekstilinkkinä */
.ft-cookie {
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--ink-2);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.ft-cookie:hover {
  color: var(--ink);
}

.site-main {
  min-height: calc(100dvh - 68px - 160px);
}
.wrap {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--page-pad);
}
.wrap-narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.lang-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--pill);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.lang-switch button {
  border: 0;
  background: none;
  padding: 4px 10px;
  border-radius: var(--pill);
  font-weight: 800;
  font-size: 0.78rem;
  color: var(--ink-2);
}
.lang-switch button[aria-pressed='true'] {
  background: var(--brand);
  color: var(--on-brand);
}
.site-footer {
  margin-top: 88px;
  background: var(--bg-tint);
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  gap: 32px;
  padding-top: 44px;
  padding-bottom: 32px;
  grid-template-columns: 1fr 1fr;
}
.footer-brand {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  max-width: 34ch;
}
.footer-brand p {
  color: var(--ink-2);
}
@media (min-width: 760px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
  .footer-brand {
    grid-column: auto;
  }
}
.footer-col h3 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 12px;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.footer-col a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.footer-col a:hover {
  color: var(--brand-ink);
  text-decoration: underline;
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 18px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
}
.footer-bottom p {
  flex: 1 1 320px;
}

/* ---------- Etusivu ---------- */

/* Ankkuriin vieritetty kohta välähtää hetken (esim. koodihaku). */
.anchor-flash {
  animation: anchor-flash 1.4s var(--ease);
}
@keyframes anchor-flash {
  0%,
  100% {
    box-shadow: var(--shadow);
  }
  30% {
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--brand) 35%, transparent), var(--shadow-lg);
  }
}

/* Yläosa: teksti vasemmalla, valokuva oikealla (puhelimella allekkain). */
.lp-hero {
  padding: 20px 0 0;
}
.lp-hero-grid {
  display: grid;
  gap: 28px;
  align-items: center;
}
@media (min-width: 980px) {
  .lp-hero {
    padding: 32px 0 0;
  }
  .lp-hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: clamp(40px, 5vw, 96px);
    min-height: min(700px, calc(100dvh - 130px));
  }
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  border-radius: var(--pill);
  background: var(--surface);
  border: 1px solid var(--line);
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--ink-2);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  max-width: 100%;
  transition: border-color 0.2s, transform 0.25s var(--ease);
}
.eyebrow:hover {
  border-color: var(--line-strong);
  transform: translate3d(0, -1px, 0);
}
.eyebrow svg {
  width: 16px;
  height: 16px;
  flex: none;
}
.eyebrow .dot {
  display: inline-grid;
  place-items: center;
  padding: 2px 8px;
  border-radius: var(--pill);
  background: var(--accent);
  color: #2b1a14;
  font-size: 0.75rem;
  flex: none;
}
.lp-hero h1 {
  font-size: clamp(2.5rem, 1.4rem + 4.4vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 22px 0 22px;
  max-width: 13ch;
}
.lp-hero h1 .hl {
  color: var(--coral-deep);
}
:root[data-theme='dark'] .lp-hero h1 .hl {
  color: var(--brand);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .lp-hero h1 .hl {
    color: var(--brand);
  }
}
.lp-lede {
  font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.25rem);
  color: var(--ink-2);
  max-width: 50ch;
}
.lp-cta {
  margin-top: 30px;
}
.lp-shot {
  margin: 0;
}
.lp-shot img {
  width: 100%;
  height: clamp(260px, 52vw, 640px);
  object-fit: cover;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  background: var(--surface-2);
}
@media (min-width: 980px) {
  .lp-shot img {
    height: min(640px, calc(100dvh - 170px));
  }
}

/* Koodihaku: keskitetty kortti */
.lp-dock {
  max-width: 980px;
  margin: 48px auto 0;
  padding: clamp(28px, 4vw, 48px) clamp(20px, 4vw, 56px);
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  scroll-margin: 100px 0;
}
@media (min-width: 980px) {
  .lp-dock {
    margin-top: 72px;
  }
}
.lp-dock-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--brand-soft);
  color: var(--brand-ink);
  margin-bottom: 16px;
}
.lp-dock-icon svg {
  width: 28px;
  height: 28px;
}
.lp-dock h2 {
  font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.3rem);
}
.lp-dock-text {
  color: var(--ink-2);
  margin-top: 10px;
  max-width: 54ch;
}
.lp-dock-form {
  width: 100%;
  max-width: 760px;
  margin-top: 26px;
  display: grid;
  gap: 12px;
  align-items: center;
}
@media (min-width: 760px) {
  .lp-dock-form {
    grid-template-columns: 1fr auto auto;
  }
}
.lp-or {
  color: var(--ink-3);
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.lp-code-row {
  display: flex;
  gap: 10px;
}
.lp-code {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 60px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: 0.22em;
  text-align: center;
  background: var(--surface-2);
  border-style: dashed;
  border-radius: 16px;
}
.lp-code::placeholder {
  color: var(--ink-3);
  opacity: 0.6;
}
.lp-code-row .btn,
.lp-scan {
  min-height: 60px;
  padding: 0 26px;
  border-radius: 16px;
}
.lp-dock-ticks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 20px;
  margin-top: 18px;
  color: var(--ink-2);
  font-size: 0.88rem;
  font-weight: 700;
}
.lp-dock-ticks span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lp-dock-ticks svg {
  width: 16px;
  height: 16px;
  color: var(--success);
}

/* Osiot */
.section {
  padding: clamp(64px, 8vw, 112px) 0 0;
  scroll-margin-top: 80px;
}
.section-head {
  max-width: 680px;
  margin: 0 auto clamp(28px, 4vw, 48px);
  text-align: center;
}
.section-head p {
  color: var(--ink-2);
  margin-top: 10px;
  font-size: 1.05rem;
}
.section-head h2 {
  font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.6rem);
}
.lp-kicker {
  display: inline-block;
  margin-bottom: 10px;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-ink);
}

/* Näin se toimii: vuorottelevat rivit */
.lp-rows {
  display: grid;
  gap: clamp(40px, 6vw, 88px);
}
.lp-row {
  display: grid;
  gap: 24px;
  align-items: center;
}
@media (min-width: 900px) {
  .lp-row {
    grid-template-columns: 1.15fr 0.85fr;
    gap: clamp(40px, 5vw, 88px);
  }
  .lp-row.flip .lp-row-media {
    order: 2;
  }
}
.lp-row-media img {
  width: 100%;
  height: clamp(240px, 34vw, 480px);
  object-fit: cover;
  border-radius: var(--r-xl);
  background: var(--surface-2);
}
.lp-panel {
  display: grid;
  place-items: center;
  height: clamp(240px, 34vw, 480px);
  border-radius: var(--r-xl);
  background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 60%), var(--accent-soft);
  padding: 24px;
}
.lp-row-text .step-n {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1rem;
  line-height: 1;
  margin-bottom: 16px;
}
.lp-row-text h3 {
  font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2.2rem);
}
.lp-row-text p {
  color: var(--ink-2);
  font-size: 1.08rem;
  margin-top: 12px;
  max-width: 44ch;
}
.mock-label {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  align-items: center;
  width: min(380px, 100%);
  padding: 16px;
  border-radius: 16px;
  background: #fff;
  color: #2b211c;
  border: 2px solid #2b211c;
  box-shadow: 7px 7px 0 var(--lid);
  rotate: -2deg;
}
.mock-label img {
  width: 96px;
  height: 96px;
}
.mock-label .brand {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.8rem;
}
.mock-label b {
  display: block;
  font-family: var(--font-head);
  font-size: 1.8rem;
  line-height: 1;
  letter-spacing: 0.04em;
  margin: 6px 0 4px;
}
.mock-label small {
  font-weight: 800;
  font-size: 0.85rem;
  color: #5a4a42;
}

/* Ominaisuudet: esittely vasemmalla, kortit oikealla */
.feat {
  display: grid;
  gap: 32px;
}
@media (min-width: 1000px) {
  .feat {
    grid-template-columns: minmax(280px, 0.8fr) 2fr;
    gap: clamp(40px, 5vw, 88px);
    align-items: start;
  }
  .feat-intro {
    position: sticky;
    top: 110px;
  }
}
.feat-intro h2 {
  font-size: clamp(1.8rem, 1.3rem + 1.8vw, 2.8rem);
  max-width: 14ch;
}
.feat-intro p {
  color: var(--ink-2);
  font-size: 1.08rem;
  margin: 14px 0 24px;
  max-width: 40ch;
}
.feat-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}
.feat-card {
  padding: 26px;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
}
@media (hover: hover) {
  .feat-card:hover {
    transform: translate3d(0, -3px, 0);
    box-shadow: var(--shadow);
    border-color: var(--line-strong);
  }
}
.feat-card h3 {
  font-size: 1.2rem;
  margin-top: 18px;
}
.feat-card p {
  color: var(--ink-2);
  margin-top: 8px;
}
.feat-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
}
.feat-icon svg {
  width: 26px;
  height: 26px;
}
.tone-coral {
  background: var(--brand-soft);
  color: var(--brand-ink);
}
.tone-lid {
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.tone-green {
  background: var(--success-soft);
  color: var(--success);
}

/* Tilinsiirto */
.transfer-band {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  padding: 28px;
  background: linear-gradient(135deg, #3a2e28, #5b4237);
  color: #fff8f0;
  display: grid;
  gap: 20px;
  align-items: center;
}
.transfer-band h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.2rem);
}
.transfer-band p {
  color: #f1dccd;
  max-width: 60ch;
}
.transfer-band .btn {
  --btn-bg: var(--accent);
  --btn-ink: #2b1a14;
  --btn-line: transparent;
}
.transfer-band .ghost-boxes {
  position: absolute;
  right: -20px;
  bottom: -30px;
  width: 200px;
  opacity: 0.16;
}
@media (min-width: 800px) {
  .transfer-band {
    grid-template-columns: 1fr auto;
    padding: 40px 48px;
  }
}

/* Lopun kehotus kuvan päällä */
.lp-final {
  position: relative;
  overflow: hidden;
  margin-top: clamp(64px, 8vw, 112px);
  border-radius: var(--r-xl);
  color: #fff8f0;
  text-align: center;
  isolation: isolate;
}
.lp-final img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.lp-final::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgb(43 26 20 / 0.55), rgb(43 26 20 / 0.82));
}
.lp-final-inner {
  padding: clamp(56px, 8vw, 120px) 24px;
}
.lp-final h2 {
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3.4rem);
  max-width: 18ch;
  margin: 0 auto;
}
.lp-final p {
  margin: 14px auto 28px;
  max-width: 46ch;
  font-weight: 700;
  color: #f1dccd;
}


/* ---------- Kirjautuminen ---------- */

/* Koko näytön jako: kuva vasemmalla, lomake oikealla (puhelimella kuva ylhäällä). */
.auth-split {
  min-height: 100dvh;
  display: grid;
  background: var(--bg);
}
@media (min-width: 960px) {
  .auth-split {
    grid-template-columns: minmax(0, 1fr) minmax(480px, 0.9fr);
  }
}
.auth-visual {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 210px;
  padding: calc(18px + env(safe-area-inset-top)) var(--page-pad) 22px;
  color: #fff8f0;
  isolation: isolate;
}
.auth-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.auth-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgb(43 26 20 / 0.35) 0%, rgb(43 26 20 / 0.25) 35%, rgb(43 26 20 / 0.85) 100%);
}
.auth-visual .logo {
  color: #fff8f0;
}
.auth-visual .logo .logo-dot {
  color: var(--coral);
}
.auth-visual h2 {
  font-size: clamp(1.6rem, 1.1rem + 2vw, 3rem);
  max-width: 14ch;
  text-shadow: 0 2px 18px rgb(0 0 0 / 0.3);
}
.auth-brand-list,
.auth-brand-steps {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.auth-brand-list li,
.auth-brand-steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  line-height: 1.3;
}
.auth-brand-list .ic,
.auth-brand-steps .n {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgb(255 248 240 / 0.16);
  border: 1px solid rgb(255 248 240 / 0.3);
  backdrop-filter: blur(6px);
  color: #fff8f0;
  font-family: var(--font-body);
  font-weight: 800;
  line-height: 1;
}
.auth-brand-list .ic svg {
  width: 20px;
  height: 20px;
}
.auth-brand-steps + .auth-brand-list {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid rgb(255 248 240 / 0.25);
}
@media (max-width: 959px) {
  .auth-brand-list,
  .auth-brand-steps {
    display: none;
  }
}
@media (min-width: 960px) {
  .auth-visual {
    position: sticky;
    top: 0;
    height: 100dvh;
    padding: 36px clamp(32px, 4vw, 64px) 48px;
  }
}

/* Lomakepuoli */
.auth-main {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 18px var(--page-pad) calc(20px + env(safe-area-inset-bottom));
}
@media (min-width: 960px) {
  .auth-main {
    padding: 28px clamp(32px, 4vw, 72px) 28px;
  }
}
.auth-main-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.auth-main-top .back-link {
  margin: 0;
}
.auth-main-center {
  flex: 1;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 32px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}
.auth-main-foot {
  display: flex;
  justify-content: center;
  gap: 20px;
  font-size: 0.85rem;
}
.auth-main-foot a {
  color: var(--ink-2);
  font-weight: 700;
}
.auth-card {
  width: 100%;
}
.auth-card h1 {
  font-size: clamp(1.7rem, 1.4rem + 1vw, 2.2rem);
}
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border-radius: var(--pill);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.auth-tabs a {
  padding: 10px 12px;
  border-radius: var(--pill);
  text-align: center;
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--ink-2);
  text-decoration: none;
  transition: background 0.25s var(--ease), color 0.25s, box-shadow 0.25s;
}
.auth-tabs a[aria-current='page'] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.auth-main-center > .back-link {
  margin: 0;
  align-self: flex-start;
}

/* Salasanan näyttäminen */
.pw-wrap {
  position: relative;
}
.pw-wrap .input {
  padding-right: 52px;
}
.pw-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  translate: 0 -50%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-3);
}
.pw-toggle:hover {
  color: var(--ink);
  background: var(--surface-2);
}
.pw-toggle svg {
  width: 20px;
  height: 20px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-3);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.divider::before,
.divider::after {
  content: '';
  height: 1px;
  flex: 1;
  background: var(--line);
}
.email-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 14px;
  border-radius: var(--pill);
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-weight: 800;
  max-width: 100%;
}
.email-pill span {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Siirto ---------- */

.transfer-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}
.transfer-steps li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.transfer-steps .n {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--accent);
  color: #2b1a14;
  font-family: var(--font-head);
  font-weight: 800;
}
.welcome-hero {
  text-align: center;
  padding: 24px 0 8px;
}
.welcome-hero .confetti {
  width: 120px;
  margin: 0 auto 12px;
}
.stat-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  gap: 12px;
}
.stat {
  padding: 18px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line);
}
.stat-n {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 2rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat-l {
  color: var(--ink-2);
  font-weight: 700;
  font-size: 0.88rem;
  margin-top: 6px;
}
.stat-link {
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s var(--ease);
}
.stat-link:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

/* ---------- Koti ---------- */

.home-hero {
  display: grid;
  gap: 20px;
  padding: 24px;
  border-radius: var(--r-xl);
  background: linear-gradient(135deg, var(--brand-soft), var(--accent-soft));
  border: 1px solid var(--line);
  align-items: center;
}
@media (min-width: 720px) {
  .home-hero {
    grid-template-columns: auto 1fr;
    gap: 32px;
    padding: 32px;
  }
}
.ring {
  position: relative;
  width: 148px;
  height: 148px;
  margin: 0 auto;
}
.ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.ring .track {
  stroke: color-mix(in srgb, var(--ink) 10%, transparent);
}
.ring .value {
  stroke: var(--coral-deep);
  transition: stroke-dashoffset 1s var(--ease);
}
.ring-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}
.ring-label b {
  font-family: var(--font-head);
  font-size: 2.1rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ring-label span {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--ink-2);
}
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  gap: 10px;
}
.quick {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 16px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  transition: transform 0.15s var(--ease), border-color 0.15s;
  text-align: left;
}
.quick:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}
.quick .qi {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-ink);
}
.quick .qi svg {
  width: 22px;
  height: 22px;
}
.loc-progress {
  display: grid;
  gap: 14px;
}
.bar {
  height: 10px;
  border-radius: var(--pill);
  background: var(--surface-3);
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--coral), var(--lid));
  transition: width 0.8s var(--ease);
}
.banner {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  padding: 16px 18px;
  border-radius: var(--r);
  background: var(--ink);
  color: var(--bg);
}
.banner p {
  flex: 1 1 260px;
  color: color-mix(in srgb, var(--bg) 80%, transparent);
}
.banner b {
  color: var(--bg);
}
.banner .btn {
  --btn-bg: var(--accent);
  --btn-ink: #2b1a14;
  --btn-line: transparent;
}

/* ---------- Laatikot ---------- */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}
.search {
  position: relative;
  flex: 1 1 320px;
}
.search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  translate: 0 -50%;
  width: 20px;
  height: 20px;
  color: var(--ink-3);
  pointer-events: none;
}
.search .input {
  padding-left: 44px;
  border-radius: var(--pill);
  min-height: 50px;
}
.box-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}
.box-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.18s var(--ease), box-shadow 0.18s, border-color 0.18s;
}
.box-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--line-strong);
}
.box-card.is-moved {
  background: color-mix(in srgb, var(--success-soft) 35%, var(--surface));
}
.box-card-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.box-thumb {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
  flex: none;
  background: var(--surface-2);
}
.box-thumb-empty {
  display: grid;
  place-items: center;
  color: var(--ink-3);
}
.box-thumb-empty svg {
  width: 34px;
  height: 34px;
}
.box-code {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.45rem;
  line-height: 1;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
.box-code .hash {
  color: var(--ink-3);
  margin-right: 1px;
}
.box-loc {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-2);
  font-weight: 700;
  font-size: 0.88rem;
  margin-top: 6px;
  min-width: 0;
}
.box-loc svg {
  width: 16px;
  height: 16px;
  flex: none;
}
.box-loc span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.item-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.item-preview .chip {
  font-size: 0.82rem;
  padding: 3px 10px;
}
.box-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}
.moved-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px 0 8px;
  border-radius: var(--pill);
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--ink-2);
  position: relative;
  z-index: 1;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.moved-toggle .tick {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  transition: background 0.2s, border-color 0.2s;
}
.moved-toggle .tick svg {
  width: 14px;
  height: 14px;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.2s, transform 0.25s var(--ease);
}
.moved-toggle[aria-pressed='true'] {
  background: var(--success-soft);
  border-color: transparent;
  color: var(--success);
}
.moved-toggle[aria-pressed='true'] .tick {
  background: var(--success);
  border-color: var(--success);
  color: var(--surface);
}
.moved-toggle[aria-pressed='true'] .tick svg {
  opacity: 1;
  transform: none;
}
/* Koko kortti tai rivi on linkki; merkintäpainike on sen päällä (z-index 1). */
.box-card .stretched,
.box-row .stretched {
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.result-count {
  color: var(--ink-2);
  font-weight: 700;
  font-size: 0.9rem;
  margin: -4px 0 14px;
}

/* ---------- Laatikon tiedot ---------- */

.detail {
  display: grid;
  gap: 18px;
}
@media (min-width: 900px) {
  .detail {
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: start;
  }
  .detail-side {
    position: sticky;
    top: 24px;
  }
}
.detail-code {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2.4rem, 2rem + 2vw, 3.2rem);
  line-height: 1;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}
.detail-code .hash {
  color: var(--ink-3);
}
.items-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.items-list li {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 4px;
  border-bottom: 1px dashed var(--line);
  font-weight: 700;
}
.items-list li:last-child {
  border-bottom: 0;
}
.items-list li::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: var(--coral);
  flex: none;
  transform: rotate(45deg);
}
.gallery {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
}
.gallery button {
  padding: 0;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--surface-2);
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s var(--ease);
}
.gallery button:hover img {
  transform: scale(1.04);
}
.status-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 5px;
  gap: 4px;
  border-radius: var(--r);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.status-switch button {
  border: 0;
  background: transparent;
  min-height: 46px;
  border-radius: 12px;
  font-weight: 800;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.status-switch button svg {
  width: 20px;
  height: 20px;
}
.status-switch button[aria-pressed='true'] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.status-switch button.moved[aria-pressed='true'] {
  background: var(--success);
  color: #fff;
}
.meta-list {
  display: grid;
  gap: 10px;
  margin: 0;
}
.meta-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.92rem;
}
.meta-list dt {
  color: var(--ink-2);
  font-weight: 700;
}
.meta-list dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
}
.loc-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.loc-card .pin {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--brand-soft);
  color: var(--brand-ink);
  flex: none;
}
.loc-card .pin svg {
  width: 24px;
  height: 24px;
}

/* Laatikon tarra */
.box-label {
  --label-ink: #2b211c;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  color: var(--label-ink);
  border: 2px solid #2b211c;
  box-shadow: 6px 6px 0 var(--accent);
}
.box-label .qr {
  width: 100px;
  height: 100px;
  image-rendering: pixelated;
}
.box-label .l-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.82rem;
  line-height: 1;
}
.box-label .l-brand .logo-dot {
  color: #e35f42;
}
.box-label .l-code {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.7rem;
  white-space: nowrap;
  line-height: 1;
  letter-spacing: 0.05em;
  margin: 8px 0 4px;
  font-variant-numeric: tabular-nums;
}
.box-label .l-loc {
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.2;
}
.box-label .l-items {
  font-size: 0.78rem;
  line-height: 1.3;
  margin-top: 4px;
  color: #5a4a42;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.box-label .l-foot {
  grid-column: 1 / -1;
  font-size: 0.7rem;
  font-weight: 700;
  color: #7a6156;
  border-top: 1.5px dashed #d8c3b5;
  padding-top: 8px;
}

/* ---------- Laatikkolomake ---------- */

.items-editor {
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--surface);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.items-editor:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent);
}
.items-editor .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.items-editor .add-row {
  display: flex;
  gap: 8px;
}
.items-editor .input {
  border: 0;
  background: var(--surface-2);
  min-height: 44px;
}
.items-editor .input:focus {
  box-shadow: none;
}
.photo-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
}
.photo-tile {
  position: relative;
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface-2);
}
.photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-tile .remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  display: grid;
  place-items: center;
  background: rgb(30 20 15 / 0.7);
  color: #fff;
}
.photo-tile .remove svg {
  width: 16px;
  height: 16px;
}
.photo-tile.uploading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgb(255 255 255 / 0.5);
}
.photo-add {
  aspect-ratio: 1;
  border-radius: 16px;
  border: 2px dashed var(--line-strong);
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--brand-ink);
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
  position: relative;
}
.photo-add svg {
  width: 28px;
  height: 28px;
}
.photo-add input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.photo-add:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.sticky-actions {
  position: sticky;
  bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 10px);
  z-index: 5;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 10px;
  border-radius: var(--pill);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
@media (min-width: 960px) {
  .sticky-actions {
    bottom: 20px;
  }
}

/* ---------- Sijainnit ---------- */

.loc-tile {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.loc-photo {
  aspect-ratio: 16 / 8;
  object-fit: cover;
  width: 100%;
  background: var(--surface-2);
}
.loc-photo-empty {
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(-45deg, var(--surface-2) 0 14px, var(--bg-tint) 14px 28px);
  color: var(--ink-3);
}
.loc-photo-empty svg {
  width: 40px;
  height: 40px;
}
.loc-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.loc-notes {
  font-size: 0.9rem;
  color: var(--ink-2);
  white-space: pre-line;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-2);
}

/* ---------- Perhe ---------- */

.member {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.member:last-child {
  border-bottom: 0;
}
.member .avatar {
  width: 40px;
  height: 40px;
}
.invite-box {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  padding: 10px;
  border-radius: var(--r);
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
}
.invite-box code {
  flex: 1 1 200px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.85rem;
  padding: 0 6px;
}

/* ---------- Asetukset ---------- */

.settings {
  display: grid;
  gap: 16px;
  align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
}
/* Profiilikortti ja pikalinkit koko leveydelle */
.settings > :nth-child(-n + 2) {
  grid-column: 1 / -1;
}
.setting-row {
  display: flex;
  gap: 12px 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.setting-row > div:first-child {
  flex: 1 1 260px;
}
.danger-zone {
  border-color: color-mix(in srgb, var(--danger) 35%, var(--line));
}
.table-wrap {
  overflow-x: auto;
  margin: 0 -22px;
  padding: 0 22px;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.table th {
  text-align: left;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-2);
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.switch {
  position: relative;
  width: 52px;
  height: 30px;
  flex: none;
}
.switch input {
  appearance: none;
  margin: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--pill);
  background: var(--surface-3);
  border: 1.5px solid var(--line-strong);
  cursor: pointer;
  transition: background 0.2s;
}
.switch input::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease);
}
.switch input:checked {
  background: var(--danger);
  border-color: var(--danger);
}
.switch input:checked::after {
  transform: translateX(22px);
}

/* ---------- Dialogit ---------- */

dialog.sheet {
  border: 0;
  padding: 0;
  background: var(--surface);
  color: var(--ink);
  width: min(560px, 100%);
  max-width: 100%;
  max-height: min(92dvh, 900px);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
dialog.sheet::backdrop {
  background: var(--scrim);
  backdrop-filter: blur(2px);
}
dialog.sheet[open] {
  display: flex;
  flex-direction: column;
  animation: sheet-in 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
dialog.sheet.closing {
  animation: sheet-out 0.24s cubic-bezier(0.4, 0, 1, 1) forwards;
}
dialog.sheet.closing::backdrop {
  opacity: 0;
  transition: opacity 0.2s;
}
@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
}
@keyframes sheet-out {
  to {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
}
@media (max-width: 640px) {
  dialog.sheet {
    margin: auto 0 0;
    width: 100%;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  @keyframes sheet-in {
    from {
      transform: translateY(100%);
    }
  }
  @keyframes sheet-out {
    to {
      transform: translateY(100%);
    }
  }
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 14px 6px 22px;
}
.sheet-body {
  padding: 8px 22px 22px;
  overflow-y: auto;
}
.sheet-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 22px 22px;
  flex-wrap: wrap;
}
.sheet-foot .btn {
  flex: 1 1 auto;
}
@media (min-width: 641px) {
  .sheet-foot .btn {
    flex: 0 0 auto;
  }
}
.lightbox {
  width: min(1000px, 100%);
}
.lightbox img {
  max-height: 80dvh;
  width: 100%;
  object-fit: contain;
  background: #000;
}

/* ---------- Ilmoitukset ---------- */

.toasts {
  position: fixed;
  z-index: 100;
  /* Yläpalkin alapuolelle, ettei ilmoitus peitä valikkoa. */
  top: calc(env(safe-area-inset-top) + 92px);
  left: 50%;
  translate: -50% 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: calc(100vw - 32px);
  pointer-events: none;
}
.toast {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 8px 18px 8px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  font-size: 0.95rem;
  text-align: left;
  box-shadow: 0 12px 32px -14px rgb(60 30 15 / 0.35), 0 2px 6px rgb(60 30 15 / 0.06);
  cursor: pointer;
  pointer-events: auto;
  animation: toast-in 0.55s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}
.toast-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
}
.toast.err .toast-icon {
  background: var(--danger);
}
.toast.info .toast-icon {
  background: var(--accent);
  color: #3d2c00;
}
.toast-icon svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.6;
}
.toast-msg {
  min-width: 0;
  line-height: 1.3;
}
.toast.out {
  animation: toast-out 0.35s cubic-bezier(0.4, 0, 1, 1) forwards;
}
@media (max-width: 719px) {
  .toasts {
    top: calc(env(safe-area-inset-top) + 78px);
  }
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate3d(0, -24px, 0) scale(0.9);
  }
}
@keyframes toast-out {
  to {
    opacity: 0;
    transform: translate3d(0, -14px, 0) scale(0.95);
  }
}
@media (prefers-reduced-motion: reduce) {
  .toast,
  .toast.out {
    animation-duration: 0.01ms;
  }
}

/* ---------- Skanneri ---------- */

.scanner {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: #120d0b;
  color: #fff;
  display: flex;
  flex-direction: column;
  animation: fade-in 0.25s ease;
}
.scanner.closing {
  opacity: 0;
  transition: opacity 0.2s;
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
}
.scanner video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.scanner-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 12px 12px 18px;
  background: linear-gradient(rgb(0 0 0 / 0.6), transparent);
}
.scanner-top .icon-btn {
  color: #fff;
  background: rgb(255 255 255 / 0.14);
}
.scanner-top .logo {
  color: #fff;
}
.scanner-view {
  position: relative;
  flex: 1;
  display: grid;
  place-items: center;
  z-index: 1;
}
.scan-frame {
  position: relative;
  width: min(68vw, 300px);
  aspect-ratio: 1;
  border-radius: 28px;
  box-shadow: 0 0 0 100vmax rgb(10 6 5 / 0.55);
}
.scan-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 3px solid rgb(255 255 255 / 0.9);
  mask: linear-gradient(#000 0 0) top left / 30% 30% no-repeat, linear-gradient(#000 0 0) top right / 30% 30% no-repeat,
    linear-gradient(#000 0 0) bottom left / 30% 30% no-repeat, linear-gradient(#000 0 0) bottom right / 30% 30% no-repeat;
}
.scan-frame::after {
  content: '';
  position: absolute;
  left: 10%;
  right: 10%;
  height: 3px;
  border-radius: 3px;
  background: var(--coral);
  box-shadow: 0 0 18px var(--coral);
  animation: scanline 2.4s ease-in-out infinite;
}
.scan-frame.found::before {
  border-color: #6fd39d;
  mask: none;
}
.scan-frame.found::after {
  display: none;
}
.scanner-hint {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  text-align: center;
  font-weight: 700;
  padding: 0 24px;
  text-shadow: 0 1px 8px rgb(0 0 0 / 0.6);
}
.scanner-bottom {
  position: relative;
  z-index: 2;
  padding: 16px 16px calc(18px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, rgb(0 0 0 / 0.7) 30%);
}
.scanner-manual {
  display: flex;
  gap: 8px;
  max-width: 420px;
  margin: 0 auto;
}
.scanner-manual .input {
  background: rgb(255 255 255 / 0.14);
  border-color: rgb(255 255 255 / 0.25);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: 0.2em;
  text-align: center;
}
.scanner-manual .input::placeholder {
  color: rgb(255 255 255 / 0.6);
  letter-spacing: 0.05em;
  font-family: var(--font-body);
  font-weight: 700;
}
.scanner-error {
  max-width: 340px;
  text-align: center;
  padding: 24px;
  display: grid;
  gap: 12px;
  justify-items: center;
}
.scanner-error svg {
  width: 48px;
  height: 48px;
  color: var(--lid);
}
.scan-result {
  position: relative;
  z-index: 3;
  margin: 0 auto;
  width: min(480px, 100%);
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--r-xl);
  padding: 20px;
  box-shadow: var(--shadow-lg);
  animation: sheet-in 0.35s var(--ease);
  max-height: 64dvh;
  overflow-y: auto;
}

/* Koko näytön keskitetty sivu (huoltotila) */
.center-screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 18px;
  padding: 32px 24px calc(32px + env(safe-area-inset-bottom));
  background: radial-gradient(circle at 50% 20%, var(--brand-soft), var(--bg) 60%);
}
.center-screen h1 {
  font-size: 2.4rem;
}
.scan-count {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 6px 14px;
  border-radius: var(--pill);
  background: rgb(255 255 255 / 0.14);
  font-weight: 800;
  font-size: 0.85rem;
}

/* ---------- Tekstisivut ---------- */

.prose {
  max-width: 70ch;
}
.prose h2 {
  font-size: 1.3rem;
  margin: 32px 0 10px;
}
.prose p,
.prose li {
  color: var(--ink);
  margin: 0 0 12px;
}
.prose ul {
  padding-left: 22px;
  margin: 0 0 12px;
}
.prose .updated {
  color: var(--ink-2);
  font-weight: 700;
  margin-top: 8px;
}
.storage-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 18px;
  font-size: 0.92rem;
}
.storage-table th,
.storage-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.storage-table code {
  font-weight: 800;
  white-space: nowrap;
}

/* ---------- Tarrojen tulostus ---------- */

.print-list {
  display: grid;
  gap: 8px;
}
.print-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
}
.print-item:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.print-item input {
  width: 20px;
  height: 20px;
  accent-color: var(--coral-deep);
  flex: none;
}
.print-preview {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}
.print-sheet {
  display: none;
}

/* Tarrat tulosteessa */
.p-label {
  break-inside: avoid;
  page-break-inside: avoid;
  color: #000;
  background: #fff;
  font-family: var(--font-body);
  display: grid;
  overflow: hidden;
}
.p-label .qr {
  image-rendering: pixelated;
}
.p-label .p-code {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
.p-label .p-brand {
  font-family: var(--font-head);
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 1.2mm;
  line-height: 1;
}
.p-label .p-loc {
  font-weight: 800;
  line-height: 1.15;
  overflow: hidden;
}
.p-label .p-items {
  color: #333;
  line-height: 1.25;
  overflow: hidden;
}
.p-label .p-foot {
  color: #444;
  font-weight: 700;
}
.sheet-a4 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6mm;
}
.sheet-a4 .p-label {
  border: 0.5mm dashed #999;
  border-radius: 3mm;
  padding: 5mm;
  grid-template-columns: 34mm 1fr;
  gap: 4mm;
  align-items: center;
  height: 58mm;
}
.sheet-a4 .qr {
  width: 34mm;
  height: 34mm;
}
.sheet-a4 .p-code {
  font-size: 9mm;
  margin: 2mm 0 1.5mm;
}
.sheet-a4 .p-brand {
  font-size: 3mm;
}
.sheet-a4 .p-loc {
  font-size: 4mm;
  max-height: 9.5mm;
}
.sheet-a4 .p-items {
  font-size: 2.8mm;
  max-height: 10.5mm;
  margin-top: 1mm;
}
.sheet-a4 .p-foot {
  grid-column: 1 / -1;
  font-size: 2.5mm;
  border-top: 0.3mm dashed #aaa;
  padding-top: 1.5mm;
}
.sheet-dymoAddress .p-label {
  width: 89mm;
  height: 36mm;
  padding: 2.5mm 3mm;
  grid-template-columns: 31mm 1fr;
  gap: 3mm;
  align-items: center;
  page-break-after: always;
  break-after: page;
}
.sheet-dymoAddress .qr {
  width: 31mm;
  height: 31mm;
}
.sheet-dymoAddress .p-code {
  font-size: 8.5mm;
  margin: 1.2mm 0 1mm;
}
.sheet-dymoAddress .p-brand {
  font-size: 2.6mm;
}
.sheet-dymoAddress .p-loc {
  font-size: 3.4mm;
  max-height: 8mm;
}
.sheet-dymoAddress .p-items,
.sheet-dymoAddress .p-foot {
  display: none;
}
.sheet-roll .p-label {
  width: 62mm;
  height: 100mm;
  padding: 5mm;
  grid-template-rows: auto auto auto 1fr auto;
  justify-items: center;
  text-align: center;
  page-break-after: always;
  break-after: page;
}
.sheet-roll .qr {
  width: 46mm;
  height: 46mm;
  margin-top: 3mm;
}
.sheet-roll .p-code {
  font-size: 10mm;
  margin: 3mm 0 2mm;
}
.sheet-roll .p-brand {
  font-size: 3.2mm;
}
.sheet-roll .p-loc {
  font-size: 4.2mm;
  max-height: 10mm;
}
.sheet-roll .p-items {
  font-size: 3mm;
  max-height: 12mm;
  margin-top: 1.5mm;
}
.sheet-roll .p-foot {
  font-size: 2.6mm;
}
.sheet-square .p-label {
  width: 50mm;
  height: 50mm;
  padding: 3mm;
  justify-items: center;
  align-content: center;
  text-align: center;
  page-break-after: always;
  break-after: page;
}
.sheet-square .qr {
  width: 34mm;
  height: 34mm;
}
.sheet-square .p-code {
  font-size: 7mm;
  margin-top: 1.5mm;
}
.sheet-square .p-brand,
.sheet-square .p-loc,
.sheet-square .p-items,
.sheet-square .p-foot {
  display: none;
}

@media print {
  body {
    background: #fff;
  }
  body.printing > *:not(.print-sheet) {
    display: none !important;
  }
  body.printing .print-sheet {
    display: block;
  }
  body.printing .print-sheet .sheet-a4 {
    display: grid;
  }
  .p-label {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* =====================================================================
   Sujuvat sisääntulot: elementit nousevat näkyviin porrastetusti
   ===================================================================== */

.rise {
  animation: rise 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(min(var(--i, 0), 10) * 45ms);
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translate3d(0, 14px, 0);
  }
}
.btn,
.icon-btn,
.box-card,
.box-row,
.stat-card,
.loc-card-home,
.ob-card,
.m-action,
.m-stat,
.m-loc {
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

/* =====================================================================
   Koti, tietokone
   ===================================================================== */

.home-banner {
  display: grid;
  gap: 24px;
  align-items: stretch;
  border-radius: var(--r-xl);
  background: linear-gradient(135deg, var(--brand-soft), var(--accent-soft));
  border: 1px solid var(--line);
  overflow: hidden;
}
@media (min-width: 1100px) {
  .home-banner {
    grid-template-columns: 1.25fr 1fr;
  }
}
.home-banner-text {
  padding: clamp(24px, 3vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.home-banner-text .lp-kicker {
  margin: 0;
}
.home-banner-text h1 {
  font-size: clamp(2rem, 1.4rem + 2vw, 3rem);
}
.home-banner-text .lp-kicker::first-letter {
  text-transform: uppercase;
}
.home-banner-progress {
  display: flex;
  align-items: center;
  gap: 22px;
}
.home-banner-progress .ring {
  width: 120px;
  height: 120px;
  margin: 0;
  flex: none;
}
.home-banner-progress .ring-label b {
  font-size: 1.7rem;
}
.home-banner-progress p {
  font-size: 1.12rem;
  font-weight: 700;
  max-width: 30ch;
}
.home-banner-photo {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  display: none;
}
@media (min-width: 1100px) {
  .home-banner-photo {
    display: block;
  }
}
.stat-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
}
.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: transform 0.35s, box-shadow 0.35s, border-color 0.35s;
}
.stat-card.stat-link:hover {
  transform: translate3d(0, -3px, 0);
  box-shadow: var(--shadow);
  border-color: var(--line-strong);
}
.stat-card .stat-n {
  font-size: 1.9rem;
}
.loc-cards {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}
.loc-card-home {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: transform 0.35s, box-shadow 0.35s;
}
.loc-card-home:hover {
  transform: translate3d(0, -3px, 0);
  box-shadow: var(--shadow);
}
.loc-card-home img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.loc-card-home:hover img {
  transform: scale(1.04);
}
.loc-card-body {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
}
.loc-card-body h3 {
  font-size: 1.1rem;
}
.loc-card-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: none;
}
.mini-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
}
.mini-ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.mini-ring .track {
  stroke: color-mix(in srgb, var(--ink) 10%, transparent);
}
.mini-ring .value {
  stroke: var(--success);
  transition: stroke-dashoffset 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.mini-ring b {
  font-size: 0.72rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.family-teaser {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 20px 22px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}
.family-teaser .grow {
  min-width: 200px;
}
.avatars {
  display: flex;
}
.avatars span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-left: -10px;
  border-radius: 50%;
  border: 3px solid var(--surface);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.8rem;
  line-height: 1;
  color: #2b1a14;
}
.avatars span:first-child {
  margin-left: 0;
}
.ob-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}
.ob-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: transform 0.35s, box-shadow 0.35s;
}
.ob-card:hover {
  transform: translate3d(0, -3px, 0);
  box-shadow: var(--shadow);
}
.ob-card.done {
  opacity: 0.7;
}

/* =====================================================================
   Puhelin: omat asettelut
   ===================================================================== */

/* Koti */
.m-page {
  display: grid;
  gap: 22px;
}
.m-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.m-head h1 {
  font-size: 1.9rem;
}
.m-date {
  color: var(--ink-2);
  font-weight: 700;
  font-size: 0.88rem;
}
.m-date::first-letter {
  text-transform: uppercase;
}
.m-avatar {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  font-size: 0.95rem;
}
.m-progress {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  min-height: 190px;
  display: flex;
  align-items: flex-end;
  color: #fff8f0;
  isolation: isolate;
}
.m-progress img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.m-progress::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgb(43 26 20 / 0.15), rgb(43 26 20 / 0.85));
}
.m-progress-body {
  padding: 20px;
  width: 100%;
}
.m-progress-n {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 2.6rem;
  line-height: 1;
}
.m-progress p {
  font-weight: 700;
  margin: 6px 0 12px;
}
.m-bar {
  height: 8px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.25);
  overflow: hidden;
}
.m-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--coral), var(--lid));
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.m-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.m-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-weight: 800;
  font-size: 0.8rem;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.m-action-ic {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  color: var(--brand-ink);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.m-action:active .m-action-ic {
  transform: scale(0.92);
}
.m-action-ic svg {
  width: 26px;
  height: 26px;
}
.m-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.m-stat {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}
.m-stat .feat-icon {
  grid-row: span 2;
  width: 44px;
  height: 44px;
  border-radius: 14px;
}
.m-stat .feat-icon svg {
  width: 22px;
  height: 22px;
}
.m-stat b {
  font-family: var(--font-head);
  font-size: 1.5rem;
  line-height: 1;
}
.m-stat span:last-child {
  color: var(--ink-2);
  font-size: 0.82rem;
  font-weight: 700;
}
.m-section {
  display: grid;
  gap: 12px;
}
.m-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.m-section-head h2 {
  font-size: 1.25rem;
}
.m-section-head a {
  font-weight: 800;
  font-size: 0.88rem;
  text-decoration: none;
}
.m-locs {
  display: grid;
  gap: 10px;
}
.m-loc {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}
.m-loc img {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  object-fit: cover;
  flex: none;
}
.m-loc .grow {
  display: grid;
}

/* Laatikkorivit (puhelimen lista) */
.box-rows {
  display: grid;
  gap: 8px;
}
.box-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 10px 10px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: background 0.3s, border-color 0.3s;
}
.box-row:active {
  background: var(--surface-2);
}
.box-row .stretched:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.box-row.is-moved {
  background: color-mix(in srgb, var(--success-soft) 45%, var(--surface));
}
.row-thumb {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  object-fit: cover;
  flex: none;
  background: var(--surface-2);
}
.row-thumb-empty {
  display: grid;
  place-items: center;
  color: var(--ink-3);
}
.row-thumb-empty svg {
  width: 28px;
  height: 28px;
}
.row-main {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}
.row-top {
  display: flex;
  align-items: center;
  gap: 6px;
}
.row-code {
  font-size: 1.15rem;
}
.row-family {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--brand-soft);
  color: var(--brand-ink);
}
.row-family svg {
  width: 13px;
  height: 13px;
}
.row-loc {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-2);
  font-weight: 700;
  font-size: 0.82rem;
  min-width: 0;
}
.row-loc svg {
  width: 13px;
  height: 13px;
  flex: none;
}
.row-loc span,
.row-items {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row-items {
  font-size: 0.82rem;
  color: var(--ink-2);
}
.row-tick {
  position: relative;
  z-index: 1;
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: var(--surface);
  color: transparent;
  transition: background 0.3s, border-color 0.3s, color 0.3s, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-tap-highlight-color: transparent;
}
.row-tick:active {
  transform: scale(0.9);
}
.row-tick svg {
  width: 22px;
  height: 22px;
}
.row-tick[aria-pressed='true'] {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

/* Laatikkolistan suodattimet: puhelimella vaakasuunnassa vieritettävä rivi */
@media (max-width: 719px) {
  .toolbar-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 calc(-1 * var(--gutter)) 14px;
    padding: 0 var(--gutter) 2px;
  }
  .toolbar-filters::-webkit-scrollbar {
    display: none;
  }
  .toolbar-filters > * {
    flex: none;
  }
  .page-head h1 {
    font-size: 1.9rem;
  }
  .page-head .btn {
    min-height: 40px;
    padding: 0 14px;
  }
  .app-main {
    padding-top: 12px;
  }
  .detail-code {
    font-size: 2.3rem;
  }
  .gallery {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin: 0 -18px;
    padding: 0 18px;
    scrollbar-width: none;
  }
  .gallery button {
    flex: 0 0 72%;
    scroll-snap-align: start;
    aspect-ratio: 4 / 3;
  }
}

/* Etusivu, puhelin */
.m-landing {
  padding-bottom: 8px;
}
.m-hero {
  position: relative;
  margin: -6px 0 0;
  height: min(62dvh, 520px);
  min-height: 380px;
  overflow: hidden;
  border-radius: 0 0 var(--r-xl) var(--r-xl);
  display: flex;
  align-items: flex-end;
  isolation: isolate;
}
.m-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% center;
  z-index: -2;
}
.m-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgb(43 26 20 / 0) 35%, rgb(43 26 20 / 0.88) 100%);
}
.m-hero-text {
  padding: 0 var(--gutter) 26px;
  color: #fff8f0;
}
.m-hero h1 {
  font-size: clamp(2.3rem, 9vw, 3rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-top: 12px;
}
.m-hero h1 .hl {
  color: var(--coral);
}
.m-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 6px;
  border-radius: 999px;
  background: rgb(255 248 240 / 0.18);
  border: 1px solid rgb(255 248 240 / 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff8f0;
  font-weight: 800;
  font-size: 0.82rem;
  text-decoration: none;
}
.m-chip .dot {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #2b1a14;
  font-size: 0.72rem;
}
.m-chip svg {
  width: 14px;
  height: 14px;
}
.m-pad {
  padding: 0 var(--gutter);
}
.m-lede {
  color: var(--ink-2);
  font-size: 1.05rem;
  margin: 22px 0 0;
}
.m-cta {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}
.m-code {
  margin-top: 28px;
  padding: 22px 18px;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
  scroll-margin: 90px 0;
}
.m-code-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.m-code-head h2 {
  font-size: 1.45rem;
  line-height: 1.15;
}
.m-code-input {
  min-height: 68px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: 0.2em;
  text-align: center;
  border-radius: 18px;
  border-style: dashed;
  background: var(--surface-2);
}
.m-code-input::placeholder {
  color: var(--ink-3);
  opacity: 0.55;
}
.m-code .btn-lg {
  min-height: 58px;
  border-radius: 18px;
}
.m-scan {
  --btn-bg: var(--ink);
  --btn-ink: var(--bg);
  --btn-line: transparent;
}
.m-ticks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.m-ticks span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  font-weight: 800;
  font-size: 0.8rem;
}
.m-ticks svg {
  width: 14px;
  height: 14px;
}
.m-block {
  margin-top: 48px;
  scroll-margin-top: 90px;
}
.m-block > h2 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}
.m-steps {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 0;
}
.m-steps li {
  position: relative;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  padding-bottom: 28px;
}
.m-steps li:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 44px;
  bottom: 4px;
  width: 2px;
  border-radius: 2px;
  background: var(--line-strong);
}
.m-step-n {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 800;
  line-height: 1;
}
.m-step-body h3 {
  font-size: 1.25rem;
  margin-top: 8px;
}
.m-step-body p {
  color: var(--ink-2);
  margin-top: 6px;
}
.m-step-media {
  margin-top: 14px;
}
.m-step-media img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: var(--r-lg);
}
.m-step-label {
  display: grid;
  place-items: center;
  padding: 26px 14px;
  border-radius: var(--r-lg);
  background: var(--accent-soft);
}
.m-step-label .mock-label {
  grid-template-columns: 76px 1fr;
}
.m-step-label .mock-label img {
  width: 76px;
  height: 76px;
}
.m-feats {
  list-style: none;
  margin: 16px calc(-1 * var(--gutter)) 0;
  padding: 0 var(--gutter) 6px;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
  scrollbar-width: none;
}
.m-feats::-webkit-scrollbar {
  display: none;
}
.m-feat {
  flex: 0 0 78%;
  scroll-snap-align: start;
  padding: 22px;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--line);
}
.m-feat h3 {
  margin-top: 16px;
  font-size: 1.15rem;
}
.m-feat p {
  color: var(--ink-2);
  margin-top: 6px;
}
.m-landing .transfer-band .btn {
  width: 100%;
}
.m-landing .lp-final {
  margin-top: 48px;
}

/* Kirjautuminen: isompi lomake */
.auth-main-center {
  max-width: 520px;
}
.auth-card h1 {
  font-size: clamp(1.9rem, 1.5rem + 1.4vw, 2.7rem);
}
.auth-card .muted {
  font-size: 1.05rem;
}
.auth-card .input {
  min-height: 56px;
  font-size: 1.05rem;
  border-radius: 14px;
}
.auth-card .label {
  font-size: 0.95rem;
}
.auth-card .btn-lg {
  min-height: 58px;
  font-size: 1.08rem;
}
.auth-tabs a {
  padding: 12px;
  font-size: 1rem;
}
@media (max-width: 959px) {
  .auth-visual {
    min-height: 240px;
    border-radius: 0 0 var(--r-xl) var(--r-xl);
  }
  .auth-main-center {
    padding-top: 22px;
  }
}


/* Sivun pääruudukko ei saa koskaan levitä näyttöä leveämmäksi (sisältö rivittyy). */
.detail {
  grid-template-columns: minmax(0, 1fr);
}
.detail > * {
  min-width: 0;
}
@media (min-width: 900px) {
  .detail {
    grid-template-columns: minmax(0, 1fr) 340px;
  }
}

/* Tarrojen tulostus, puhelin */
.chip-btn {
  flex: none;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--pill);
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
  font-size: 0.88rem;
}
.chip-btn:active {
  background: var(--surface-2);
}
.toolbar-filters .select {
  width: auto;
  min-height: 40px;
  border-radius: var(--pill);
  flex: none;
}
.print-row {
  cursor: pointer;
  padding-right: 4px;
  -webkit-tap-highlight-color: transparent;
}
.print-row.is-selected {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand-soft) 55%, var(--surface));
}
.print-check {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  border: 2px solid var(--line-strong);
  background: var(--surface);
  color: transparent;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.print-check svg {
  width: 18px;
  height: 18px;
}
.print-row.is-selected .print-check {
  background: var(--coral-deep);
  border-color: var(--coral-deep);
  color: #fff;
}
.row-items-2 {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.print-open {
  position: relative;
  z-index: 1;
  color: var(--ink-3);
}
.m-print-preview {
  margin-top: 18px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 4px 14px;
}
.m-print-preview summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  font-weight: 800;
  cursor: pointer;
}
.m-print-preview summary svg {
  width: 18px;
  height: 18px;
}
.m-print-preview[open] {
  padding-bottom: 14px;
}
.m-print-preview .print-preview {
  grid-template-columns: 1fr;
}
.m-print-bar {
  position: sticky;
  bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 10px);
  z-index: 5;
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 16px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}
.m-print-bar .grow {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.m-print-bar b {
  font-size: 0.95rem;
}
.m-print-bar .select {
  min-height: 34px;
  padding: 4px 32px 4px 0;
  border: 0;
  background-color: transparent;
  background-position: right 4px center;
  font-size: 0.82rem;
  color: var(--ink-2);
  box-shadow: none;
}
.m-print-bar .btn {
  flex: none;
}

/* Puhelimella kiinteät palkit ilman taustan sumennusta: vieritys pysyy sulavana. */
@media (max-width: 959px) {
  .topbar,
  .tabbar,
  .hd,
  .sticky-actions {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .topbar {
    background: var(--bg);
  }
  .tabbar {
    background: var(--surface);
  }
  .sticky-actions {
    background: var(--surface);
  }
}

/* ---------- Liikkeen vähentäminen ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Ylläpito: kävijätilastot ---------- */
.stats-head { align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.stats-head .segmented { flex-wrap: wrap; }
.stats-h { font-size: 1.05rem; }
.stats-tile { position: relative; }
.stats-ic {
  position: absolute; top: 14px; right: 14px;
  width: 30px; height: 30px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-ink);
}
.stats-ic svg { width: 16px; height: 16px; }
.stats-chart {
  display: flex; align-items: flex-end; gap: 3px;
  height: 180px; padding-top: 8px;
  border-bottom: 1px solid var(--line);
}
.stats-col { position: relative; flex: 1 1 0; min-width: 0; max-width: 56px; height: 100%; display: flex; align-items: flex-end; }
.stats-col-v, .stats-col-u { position: absolute; bottom: 0; left: 0; right: 0; border-radius: 4px 4px 0 0; }
.stats-col-v { background: var(--brand-soft); }
.stats-col-u { background: var(--brand); left: 25%; right: 25%; }
.stats-col:hover .stats-col-v { background: var(--lid); }
.stats-legend { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--ink-2); font-weight: 700; }
.stats-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-left: 8px; }
.stats-legend .lv { background: var(--brand-soft); }
.stats-legend .lu { background: var(--brand); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.stats-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.stats-list li {
  position: relative; display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 10px; border-radius: 10px; overflow: hidden; font-size: 0.92rem;
}
.stats-bar { position: absolute; inset: 0 auto 0 0; background: var(--surface-2); z-index: 0; border-radius: 10px; }
.stats-list li > :not(.stats-bar) { position: relative; z-index: 1; }
.stats-key { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.stats-funnel { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.stats-funnel li { display: grid; grid-template-columns: 28px minmax(0, 12rem) minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.stats-funnel-n {
  width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-ink); font-weight: 800; font-size: 0.85rem;
}
.stats-funnel-bar { height: 12px; border-radius: var(--pill); background: var(--surface-3); overflow: hidden; }
.stats-funnel-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--coral), var(--lid)); border-radius: inherit; }
.stats-groups { display: grid; gap: 8px; }
.stats-group { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.stats-group summary {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 12px 14px; cursor: pointer; font-weight: 800; list-style: none;
}
.stats-group summary::-webkit-details-marker { display: none; }
.stats-group ul { list-style: none; margin: 0; padding: 0 14px 12px; display: grid; gap: 4px; }
.stats-group li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; font-size: 0.9rem; padding: 6px 0; border-top: 1px solid var(--line); }
.stats-group code { color: var(--ink-3); font-size: 0.78rem; }
@media (max-width: 719px) {
  .stats-funnel li { grid-template-columns: 28px minmax(0, 1fr) auto; }
  .stats-funnel-bar { grid-column: 2 / -1; }
  .stats-group code { display: none; }
  .stats-group li { grid-template-columns: minmax(0, 1fr) auto; }
}

/* Puhelin: tulostussivun sijaintisuodatin ja sijaintikortin tyhjä kuva */
.m-print-loc {
  margin: -4px 0 14px;
}
.m-print-loc .select {
  width: 100%;
}
@media (max-width: 719px) {
  .loc-photo-empty {
    aspect-ratio: auto;
    height: 72px;
  }
  .loc-photo-empty svg {
    width: 28px;
    height: 28px;
  }
}




/* ---------- Ilmestyminen vieritettäessä ----------
 * Osiot liukuvat pehmeästi esiin, kun ne tulevat näkyviin. Ilman JavaScriptiä
 * tai liikettä vähentävällä asetuksella kaikki näkyy heti.
 */
.sr {
  opacity: 0;
  translate: 0 28px;
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), translate 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--sr-delay, 0ms);
}
.sr.sr-in {
  opacity: 1;
  translate: none;
}
.lp-strip-item.sr.sr-in:nth-child(even) {
  transform: translateY(28px);
}
.m-strip .lp-strip-item.sr.sr-in:nth-child(even) {
  transform: translateY(18px);
}
@media (prefers-reduced-motion: reduce) {
  .sr {
    opacity: 1;
    translate: none;
    transition: none;
  }
}

/* ---------- Yhteydenottolomake ---------- */
.ct {
  display: grid;
  gap: 32px;
  padding: clamp(28px, 4vw, 56px);
  border-radius: var(--r-xl);
  background: var(--surface-2);
}
@media (min-width: 900px) {
  .ct {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 64px;
  }
}
.ct-intro h2 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
}
.ct-intro p {
  margin: 0 0 20px;
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--ink-2);
}
.ct-mail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--lid);
  overflow-wrap: anywhere;
}
.ct-mail svg {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--brand-ink);
}
.ct-row {
  display: grid;
  gap: 16px;
}
@media (min-width: 640px) {
  .ct-row {
    grid-template-columns: 1fr 1fr;
  }
}
.ct-form textarea {
  min-height: 160px;
  resize: vertical;
  line-height: 1.55;
}
.ct-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.ct-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}
.ct-foot .hint {
  flex: 1;
  min-width: 220px;
  margin: 0;
}
.ct-done {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 28px;
  border-radius: 20px;
  background: var(--surface);
  animation: rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.ct-done h3 {
  margin: 8px 0 0;
  font-size: 1.5rem;
}
.ct-done p {
  margin: 0;
  color: var(--ink-2);
}
.ct-done-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--success-soft);
  color: var(--success);
}
.ct-done-icon svg {
  width: 26px;
  height: 26px;
}

/* ---------- Koristeet ja käyttöliittymä eivät ole valittavaa tekstiä ----------
 * Painikkeet, tarrat, polaroidit, numerot ja palkit eivät maalaudu valittaessa
 * eikä niitä voi raahata. Varsinainen leipäteksti on edelleen valittavissa.
 */
.btn,
.icon-btn,
.tab,
.nav-link,
.hd,
.ft-bottom,
.lang-switch,
.auth-tabs,
.lx-tabs,
.bx-sticker,
.bx-badge,
.bx-polaroid,
.bx-marquee,
.bx-num,
.bx-step-n,
.bx-tile-ic,
.bx-chips,
.bx-price,
.bx-ticks li > span,
.toast,
summary,
label,
[aria-hidden='true'] {
  -webkit-user-select: none;
  user-select: none;
}
img,
svg {
  -webkit-user-drag: none;
}

/* =====================================================================
   Selkeä ja tyylikäs ulkoasu (julkiset sivut)
   Valkoinen pohja ja kermanväriset välit, ohuet viivat, väljä rytmi,
   rauhalliset kuvat. Koralli vain pääpainikkeissa ja pienissä korostuksissa.
   ===================================================================== */
.cl {
  overflow-x: clip;
}
.cl-section {
  padding: clamp(72px, 10vw, 152px) var(--page-pad);
}
.cl-white {
  background: #fff;
}
.cl-cream {
  background: var(--bg);
}
.cl-wrap {
  max-width: 1240px;
  margin: 0 auto;
}
.cl-hero-section {
  padding-top: clamp(40px, 7vw, 104px);
}

/* Typografia */
.cl-h1 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(2.6rem, 1.6rem + 3.6vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.cl-h2 {
  margin: 0;
  font-weight: 700;
  font-size: clamp(2rem, 1.4rem + 2vw, 3.2rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
}
.cl-h3 {
  margin: 0;
  font-weight: 700;
  font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.3rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.cl-accent {
  color: var(--brand-ink);
}
.cl-head {
  max-width: 720px;
  margin-bottom: clamp(36px, 5vw, 64px);
}
.cl-center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.cl-center .cl-lede {
  margin-left: auto;
  margin-right: auto;
}
.cl-lede {
  margin: 20px 0 0;
  max-width: 36em;
  font-size: clamp(1.08rem, 1rem + 0.3vw, 1.22rem);
  line-height: 1.65;
  color: var(--ink-2);
}
.cl-body {
  margin: 16px 0 0;
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--ink-2);
}
.cl-muted {
  color: var(--ink-3);
}
.cl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.cl-actions-center {
  justify-content: center;
}
.cl-btn-quiet {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink);
}
.cl-btn-quiet:hover {
  border-color: var(--ink);
  background: transparent;
}
.cl-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.cl-more svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.cl-more:hover svg {
  transform: translateX(4px);
}
.cl-more-sm {
  margin-top: 22px;
  font-size: 0.95rem;
  color: var(--ink-2);
}

/* Kuvat */
.cl-frame {
  overflow: hidden;
  border-radius: 20px;
  background: var(--surface-2);
}
.cl-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.6s;
}
.cl-frame:hover img {
  transform: scale(1.02);
}
.cl-wide {
  margin-top: clamp(48px, 6vw, 80px);
}

/* Yläosa */
.cl-hero {
  display: grid;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
@media (min-width: 960px) {
  .cl-hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  }
}
.cl-note {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.cl-note:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.cl-note svg {
  width: 15px;
  height: 15px;
}
.cl-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
}
.cl-hero-photo {
  max-height: 78vh;
}

/* Koodihaku */
.cl-lookup {
  display: grid;
  gap: 32px;
  align-items: center;
}
@media (min-width: 960px) {
  .cl-lookup {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 96px;
  }
}
.cl-lookup .cl-head {
  margin-bottom: 0;
}
.cl-lookup-form {
  display: grid;
  gap: 12px;
}
.cl-code-row {
  display: flex;
  gap: 10px;
}
.cl-code {
  flex: 1;
  min-width: 0;
  height: 60px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: 0.14em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  background: #fff;
}
.cl-code-row .btn {
  height: 60px;
  flex: none;
}
@media (max-width: 560px) {
  .cl-code-row {
    flex-direction: column;
  }
}
.cl-ticks-inline {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: 0.9rem;
  color: var(--ink-2);
}
.cl-ticks-inline li {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cl-ticks-inline svg {
  width: 16px;
  height: 16px;
  color: var(--success);
}

/* Vaiheet */
.cl-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 40px;
}
@media (min-width: 860px) {
  .cl-steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
  }
}
.cl-steps li {
  padding-top: 24px;
  border-top: 1px solid var(--line-strong);
}
.cl-step-n {
  display: block;
  margin-bottom: 18px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--brand-ink);
  font-variant-numeric: tabular-nums;
}
.cl-steps h3,
.cl-grid h3 {
  margin: 0 0 8px;
  font-size: 1.3rem;
  font-weight: 700;
}
.cl-steps p,
.cl-grid p {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.65;
}

/* Kuva ja teksti rinnakkain */
.cl-split {
  display: grid;
  gap: clamp(32px, 5vw, 96px);
  align-items: center;
}
@media (min-width: 900px) {
  .cl-split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .cl-split.cl-flip > .cl-frame {
    order: 2;
  }
}
.cl-split-text .cl-head {
  margin-bottom: 0;
}
.cl-list {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
}
.cl-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-weight: 700;
}
.cl-list li:last-child {
  border-bottom: 1px solid var(--line);
}
.cl-list svg {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--brand-ink);
}
.cl-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(72px, 10vw, 136px);
}
.cl-rows > * {
  scroll-margin-top: 96px;
}
.cl-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--brand-ink);
  font-weight: 800;
  font-size: 0.95rem;
}
.cl-tag svg {
  width: 20px;
  height: 20px;
}
.cl-story p {
  margin: 0 0 20px;
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--ink);
}

/* Ruudukko ohuin viivoin */
.cl-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0 48px;
}
@media (min-width: 700px) {
  .cl-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1040px) {
  .cl-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .cl-grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}
.cl-grid li {
  padding: 28px 0 36px;
  border-top: 1px solid var(--line-strong);
}
.cl-ic {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--ink);
}
.cl-ic svg {
  width: 20px;
  height: 20px;
}

/* Sisällysluettelo (näin se toimii) */
.cl-index {
  list-style: none;
  margin: 48px auto 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 900px;
}
.cl-index a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  transition: border-color 0.2s;
}
.cl-index a:hover {
  border-color: var(--ink);
}
.cl-index span {
  color: var(--brand-ink);
  font-variant-numeric: tabular-nums;
}

/* Usein kysytyt */
.cl-faq-wrap {
  display: grid;
  gap: 24px;
}
@media (min-width: 960px) {
  .cl-faq-wrap {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 96px;
    align-items: start;
  }
}
.cl-faq details {
  border-top: 1px solid var(--line-strong);
}
.cl-faq details:last-child {
  border-bottom: 1px solid var(--line-strong);
}
.cl-faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 0;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: 1.12rem;
}
.cl-faq summary::-webkit-details-marker {
  display: none;
}
.cl-faq summary svg {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--ink-2);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.cl-faq details[open] summary svg {
  transform: rotate(45deg);
}
.cl-faq details p {
  margin: 0;
  padding: 0 0 24px;
  max-width: 60ch;
  color: var(--ink-2);
  line-height: 1.7;
}

/* Hinta ja ilmoitus */
.cl-price {
  margin: 0 0 8px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(3.5rem, 2.5rem + 4vw, 6rem);
  line-height: 1;
  color: var(--brand-ink);
}
.cl-banner {
  display: grid;
  gap: 24px;
  align-items: center;
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--line-strong);
  border-radius: 24px;
}
@media (min-width: 860px) {
  .cl-banner {
    grid-template-columns: 1fr auto;
    gap: 48px;
  }
}
.cl-banner p {
  margin: 12px 0 0;
  max-width: 60ch;
  color: var(--ink-2);
  line-height: 1.65;
}
.cl-cta {
  text-align: center;
}
.cl-cta .cl-head {
  margin-bottom: 0;
}

/* Meistä */
.cl-photos {
  display: grid;
  gap: 16px;
}
@media (min-width: 760px) {
  .cl-photos {
    grid-template-columns: repeat(3, 1fr);
  }
  .cl-photos > :nth-child(2) {
    margin-top: 64px;
  }
}
.cl-contact {
  display: grid;
  gap: 40px;
  align-items: start;
}
@media (min-width: 960px) {
  .cl-contact {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 96px;
  }
}
.cl-contact .cl-head {
  margin-bottom: 20px;
}
.cl-mail {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}
.cl-mail svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.cl-card {
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
}

/* Ehdot ja tietosuoja */
.cl.lg {
  max-width: none;
  padding: 0;
}
.cl-legal-hero {
  padding-bottom: 0;
}
.cl-legal-hero .cl-head {
  margin-bottom: 16px;
}
.lg-updated-clean {
  margin: 0;
  font-size: 0.92rem;
}
.cl.lg .lg-body {
  display: grid;
  gap: 40px;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(40px, 5vw, 72px) var(--page-pad) clamp(72px, 9vw, 128px);
}
@media (min-width: 1000px) {
  .cl.lg .lg-body {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 80px;
    align-items: start;
  }
  .cl-toc {
    position: sticky;
    top: 96px;
  }
}
.cl-toc p {
  margin: 0 0 12px;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--ink);
}
.cl-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  border-top: 1px solid var(--line);
}
.cl-toc li a {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s;
}
.cl-toc li a:hover {
  color: var(--ink);
}
.cl-toc li span {
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 999px) {
  .cl-toc ol {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
    column-gap: 24px;
  }
}
.cl.lg .lg-text {
  max-width: 760px;
}
.cl.lg .lg-section {
  scroll-margin-top: 96px;
  padding: 0 0 12px;
}
.cl.lg .lg-section + .lg-section {
  margin-top: 40px;
}
.cl.lg .lg-section h2 {
  margin: 0 0 14px;
  font-size: clamp(1.35rem, 1.1rem + 0.8vw, 1.7rem);
  font-weight: 700;
}
.cl.lg .lg-n {
  color: var(--ink-3);
}
.cl.lg .lg-section p,
.cl.lg .lg-section li {
  font-size: 1.02rem;
  line-height: 1.75;
}
.cl.lg .lg-section p {
  margin: 0 0 14px;
}
.cl.lg .lg-section ul {
  margin: 0 0 16px;
  padding-left: 22px;
  display: grid;
  gap: 8px;
}
.cl.lg .lg-section li::marker {
  color: var(--brand);
}
.cl.lg .lg-consent {
  margin: 4px 0 16px;
}
.cl.lg .table-wrap {
  overflow-x: auto;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.cl.lg .storage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.cl.lg .storage-table th,
.cl.lg .storage-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.cl.lg .storage-table tr:last-child td {
  border-bottom: 0;
}
.cl.lg .storage-table th {
  background: var(--surface-2);
  font-weight: 800;
}
@media (max-width: 640px) {
  .cl.lg .table-wrap {
    border: 0;
    overflow: visible;
  }
  .cl.lg .storage-table,
  .cl.lg .storage-table tbody,
  .cl.lg .storage-table tr,
  .cl.lg .storage-table td {
    display: block;
  }
  .cl.lg .storage-table thead {
    display: none;
  }
  .cl.lg .storage-table tr {
    padding: 14px 0;
    border-top: 1px solid var(--line);
  }
  .cl.lg .storage-table td {
    padding: 0;
    border: 0;
  }
  .cl.lg .storage-table td:first-child {
    font-weight: 800;
  }
  .cl.lg .storage-table td:nth-child(2) {
    margin: 2px 0 6px;
    font-size: 0.85rem;
    color: var(--ink-3);
  }
}

/* Kirjautumissivujen kuvapuoli selkeänä */
.auth-visual {
  background: var(--bg);
  color: var(--ink);
  gap: 32px;
  justify-content: flex-start;
}
.auth-visual::before {
  content: none;
}
.auth-visual .logo {
  color: var(--ink);
}
.auth-visual .logo .logo-dot {
  color: var(--coral);
}
.auth-visual h2 {
  color: var(--ink);
  text-shadow: none;
  font-weight: 700;
  font-size: clamp(1.8rem, 1.2rem + 1.8vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 16ch;
}
.auth-brand-list .ic,
.auth-brand-steps .n {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  backdrop-filter: none;
}
.auth-brand-steps + .auth-brand-list {
  border-top-color: var(--line);
}
.auth-photo {
  margin-top: auto;
}
@media (max-width: 959px) {
  .auth-visual .auth-photo {
    display: none;
  }
  .auth-visual {
    min-height: 0;
    border-bottom: 1px solid var(--line);
  }
}
/* Kirjautumissivun kuva kehyksessään (ei koko paneelin taustana). */
.auth-visual .cl-frame {
  position: relative;
}
.auth-visual .cl-frame img {
  position: static;
  inset: auto;
  z-index: auto;
}

/* Lisää kuvia ja yksityiskohtia */
.cl-proof {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  color: var(--ink-2);
  font-size: 0.95rem;
  font-weight: 700;
}
.cl-proof li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cl-proof svg {
  width: 18px;
  height: 18px;
  color: var(--brand-ink);
}
@media (min-width: 960px) {
  .cl-lookup {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  }
}
.cl-lookup > div:first-child .cl-head {
  margin-bottom: 28px;
}
.cl-gap {
  height: clamp(48px, 6vw, 80px);
}
.cl-cta-section .cl-photos {
  margin-bottom: clamp(56px, 7vw, 96px);
}
.cl-faq-photo {
  margin-top: 8px;
  max-width: 420px;
}
@media (max-width: 959px) {
  .cl-faq-photo {
    display: none;
  }
}

/* ---------- Kirjautumissivun kuvapaneeli ----------
 * Kuva täyttää koko paneelin pyöristettynä; logo ja teksti ovat sen päällä
 * valkoisissa korteissa (ei tummaa peittoa). Kapealla näytöllä vain logo.
 */
@media (min-width: 960px) {
  .auth-visual {
    padding: 16px;
    justify-content: space-between;
    background: var(--bg);
  }
  .auth-visual .auth-photo {
    position: absolute;
    inset: 16px;
    margin: 0;
    border-radius: 28px;
    z-index: 0;
  }
  .auth-visual .auth-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: auto;
  }
  .auth-visual-top {
    position: relative;
    z-index: 1;
    align-self: flex-start;
    margin: 20px 0 0 20px;
    padding: 10px 18px;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  .auth-visual-text {
    position: relative;
    z-index: 1;
    margin: auto 20px 20px;
    padding: 28px 30px;
    max-width: 460px;
    border-radius: 24px;
    background: rgb(255 255 255 / 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 24px 56px -28px rgb(43 26 20 / 0.5);
    animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  .auth-visual-text h2 {
    font-size: clamp(1.6rem, 1.1rem + 1.2vw, 2.3rem);
  }
  .auth-visual-text .auth-brand-list {
    margin-top: 20px;
  }
}
@media (max-width: 959px) {
  .auth-visual .auth-photo,
  .auth-visual-text {
    display: none;
  }
  .auth-visual {
    min-height: 0;
    padding: calc(16px + env(safe-area-inset-top)) var(--page-pad) 0;
    border-bottom: 0;
    background: var(--bg);
  }
}

/* Ylläpidon yhteydenotot */
.am-count {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-weight: 800;
  font-size: 0.85rem;
}
.am-list {
  display: grid;
  gap: 12px;
}
.am-item {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}
.am-item.is-handled {
  background: var(--surface-2);
  opacity: 0.8;
}
.am-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 16px;
}
.am-head .badge {
  margin-left: 8px;
}
.am-text {
  margin: 12px 0 14px;
  white-space: pre-wrap;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.am-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.am-actions .icon-btn {
  margin-left: auto;
}
@media (max-width: 959px) {
  /* Logorivi vain tarvitsemansa korkuinen; lomake saa loput tilasta. */
  .auth-split {
    grid-template-rows: auto 1fr;
  }
}

/* Kirjautumissivun logopilleri: logo keskellä */
@media (min-width: 960px) {
  .auth-visual-top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
  }
  .auth-visual-top .logo {
    margin: 0;
    line-height: 1;
  }
}

/* =====================================================================
   Käyttöehdot ja tietosuoja: oma, tavallisen tekstiasiakirjan näköinen
   näkymä. Harmaa tausta, valkoinen paperiarkki ja tavallinen asiakirjafontti.
   ===================================================================== */
.doc {
  min-height: 100dvh;
  background: #eef0f2;
  color: var(--ink);
}
.doc-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: calc(10px + env(safe-area-inset-top)) var(--page-pad) 10px;
  background: #fff;
  border-bottom: 1px solid #dadce0;
  font-size: 0.92rem;
}
.doc-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #3c4043;
  font-weight: 700;
  text-decoration: none;
}
.doc-back svg,
.doc-file svg {
  width: 18px;
  height: 18px;
}
.doc-file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto;
  color: #3c4043;
  font-weight: 700;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.doc-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}
@media (max-width: 640px) {
  .doc-file {
    display: none;
  }
  .doc-tools {
    margin-left: auto;
  }
}
.doc-sheet {
  max-width: 816px;
  margin: 32px auto 64px;
  padding: clamp(28px, 7vw, 88px) clamp(22px, 8vw, 96px);
  background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.12), 0 1px 2px rgb(0 0 0 / 0.08);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.7;
}
@media (max-width: 640px) {
  .doc-sheet {
    margin: 0;
    box-shadow: none;
  }
}
.doc-sheet h1,
.doc-sheet h2 {
  font-family: var(--font-head);
  color: var(--ink);
  letter-spacing: -0.01em;
}
.doc-sheet h1 {
  margin: 0 0 6px;
  font-size: 2.3rem;
  font-weight: 700;
  line-height: 1.2;
}
.doc-sheet h2 {
  margin: 32px 0 10px;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
}
.doc-meta {
  margin: 0 0 24px;
  color: #5f6368;
  font-size: 0.92rem;
}
.doc-intro {
  margin: 0 0 8px;
}
.doc-sheet p {
  margin: 0 0 12px;
}
.doc-sheet ul,
.doc-sheet ol {
  margin: 0 0 14px;
  padding-left: 24px;
}
.doc-sheet li {
  margin-bottom: 6px;
}
.doc-sheet a {
  color: var(--brand-ink);
}
.doc-toc {
  margin: 24px 0 8px;
  padding: 16px 20px;
  background: #f8f9fa;
  border: 1px solid #e8eaed;
}
.doc-toc h2 {
  margin: 0 0 8px;
  font-size: 1rem;
}
.doc-toc ol {
  margin: 0;
  columns: 2;
  column-gap: 32px;
  font-size: 0.95rem;
}
@media (max-width: 640px) {
  .doc-toc ol {
    columns: 1;
  }
}
.doc-section {
  scroll-margin-top: 72px;
}
.doc-sheet .lg-consent {
  font-family: var(--font-body);
}
.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.doc-table th,
.doc-table td {
  padding: 8px 10px;
  border: 1px solid #dadce0;
  text-align: left;
  vertical-align: top;
}
.doc-table th {
  background: #f8f9fa;
}
.doc-table code {
  font-size: 0.88rem;
}
@media (max-width: 640px) {
  .doc-table,
  .doc-table tbody,
  .doc-table tr,
  .doc-table td {
    display: block;
  }
  .doc-table thead {
    display: none;
  }
  .doc-table tr {
    margin-bottom: 10px;
    border: 1px solid #dadce0;
  }
  .doc-table td {
    border: 0;
  }
}
.doc-end {
  margin-top: 40px !important;
  padding-top: 16px;
  border-top: 1px solid #e8eaed;
}
@media print {
  .doc {
    background: #fff;
  }
  .doc-bar {
    display: none;
  }
  .doc-sheet {
    margin: 0;
    box-shadow: none;
    padding: 0;
  }
}
.doc-lang {
  display: flex;
  gap: 18px;
  margin-left: auto;
}
.doc-lang button {
  padding: 4px 0;
  border: 0;
  background: none;
  color: #5f6368;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.doc-lang button:hover {
  color: #1f1f1f;
}
.doc-lang button[aria-pressed='true'] {
  color: #1f1f1f;
  text-decoration: underline;
  text-underline-offset: 4px;
}
