/* Decodies' look: a desk, paper cards, chunky rounded buttons, Andika (a font made for early readers). */

@font-face { font-family: Andika; src: url(/fonts/andika-regular.ttf) format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: Andika; src: url(/fonts/andika-bold.ttf) format('truetype'); font-weight: 700; font-display: swap; }

:root {
  --desk: #e6ece7; --paper: #fffdf6; --ink: #1f2b2a; --soft: #5b6b68; --accent: #e0672c; --line: #d5dcd8;
  --heart: #d6336c; --photo: #eff2ee; --m: 24px;
  color-scheme: light;
}
.compact { --m: 16px; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--desk); color: var(--ink); font: 18px/1.35 Andika, system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
#app { min-height: 100%; }
h1, h2, h3, p { margin: 0; }
img { -webkit-user-drag: none; -webkit-touch-callout: none; }
[hidden] { display: none !important; }
.soft { color: var(--soft); }
.big { font-size: 22px; }

/* ---------- buttons, chips, fields ---------- */

.btn {
  font: 700 18px/1.2 Andika, sans-serif; color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--line); border-radius: 18px; padding: 10px 22px; min-width: 64px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer;
  text-decoration: none; white-space: nowrap; user-select: none; -webkit-user-select: none;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.off { color: var(--soft); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn:focus-visible, .chip:focus-visible, .tile:focus-visible, .person:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.compact .btn { font-size: 16px; padding: 8px 16px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font: 700 18px/1.2 Andika, sans-serif; color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--line); border-radius: 22px; padding: 8px 18px; cursor: pointer;
}
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }

.field {
  font: 20px/1.35 Andika, sans-serif; color: var(--ink); background: var(--paper); width: 100%;
  border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 16px; outline: none;
}
.field:focus { border-color: var(--accent); }
.field::placeholder { color: #9aa6a3; }
textarea.field { resize: vertical; min-height: 6.5em; }
.field.age { width: 120px; }
.field.code { font-size: 26px; letter-spacing: 0.12em; text-transform: uppercase; }
.field.code::placeholder { text-transform: none; letter-spacing: 0.04em; }

.heading { font-size: 13px; font-weight: 700; color: var(--soft); text-transform: uppercase; letter-spacing: 0.08em; margin: 22px 0 8px; }

/* three dots bobbing in turn: something is being written or drawn */
.busy { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 9px; }
.busy i { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); animation: bob 1.2s infinite ease-in-out; }
.busy i:nth-child(2) { animation-delay: 0.18s; }
.busy i:nth-child(3) { animation-delay: 0.36s; }
@keyframes bob { 0%, 50%, 100% { transform: none; opacity: 0.55; } 25% { transform: translateY(-14px); opacity: 1; } }

/* ---------- screens ---------- */

.screen { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 10px; padding: var(--m) var(--m) 8px; }
.top .title, .shelfname { flex: 1; min-width: 0; font-size: 30px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shelfname { font-size: 34px; }
.compact .top .title { font-size: 22px; }
.compact .shelfname { font-size: 26px; }
.top .back { font-size: 18px; }
.status { color: var(--soft); font-size: 15px; padding: 0 var(--m); min-height: 4px; }
.status:empty { display: none; }
.page { padding: 8px var(--m) var(--m); width: 100%; max-width: 1400px; margin: 0 auto; }
.screen.shelf .status { padding-bottom: 4px; }
.compact .screen.shelf .top { flex-wrap: wrap; }
.compact .screen.shelf .shelfname { flex-basis: calc(100% - 54px); order: -2; }
.compact .screen.shelf .you { order: -1; }   /* settings top right, beside the shelf's name */


/* ---------- the shelf ---------- */

.grid { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (orientation: landscape) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1300px) { .grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); } }
.compact .grid { gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (orientation: landscape) { .compact .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.grid.people-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (orientation: landscape) { .grid.people-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.compact .grid.people-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (orientation: landscape) { .compact .grid.people-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.tile {
  display: flex; flex-direction: column; background: var(--paper); border-radius: 18px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(31, 43, 42, 0.12), 0 3px 8px rgba(31, 43, 42, 0.08); color: inherit; text-decoration: none;
  border: 0; padding: 0; font: inherit; text-align: center; cursor: pointer;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.tile.job { cursor: default; padding-bottom: 12px; }
.square { position: relative; aspect-ratio: 1; background: var(--photo); overflow: hidden; }
.square img, .square .portrait { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tiletitle { font-size: 20px; font-weight: 700; padding: 10px 10px 0; }
.tilesub { font-size: 14px; color: var(--soft); padding: 2px 10px 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tilesub.two { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; padding-bottom: 0; margin-bottom: 12px; }
.tilesub.failed { color: var(--heart); }
.tilesub.drawing { color: var(--accent); }
.compact .tiletitle { font-size: 17px; }
.tileshared { font-size: 13px; font-weight: 700; color: var(--accent); padding: 0 10px 12px; margin-top: -8px; }
.tiletitle + .tileshared { margin-top: 4px; }
.step { font-size: 15px; font-weight: 700; color: var(--accent); padding: 0 12px 6px; }
.step.failed { color: var(--heart); }
.oops { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 64px; font-weight: 700; color: var(--heart); }
.bar { height: 8px; margin: 0 12px; border-radius: 4px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; transition: width 0.4s; }
.bar i.going { width: 35%; animation: going 1.4s infinite ease-in-out; }
@keyframes going { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
.tilebuttons { display: flex; justify-content: center; gap: 8px; padding: 0 8px; flex-wrap: wrap; }
.tilebuttons .btn { font-size: 16px; padding: 8px 14px; }

/* ---------- the reader ---------- */

.reader {   /* the body already keeps clear of the notch and gesture bar: take those off the height */
  height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom)); display: flex; flex-direction: column; padding: 8px 16px;
  user-select: none; -webkit-user-select: none; overflow: hidden;
}
.rbar { display: flex; align-items: center; gap: 10px; }
.rtitle { flex: 1; min-width: 0; text-align: center; font-weight: 700; color: var(--soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact .rtitle { visibility: hidden; }
.card {
  flex: 1; min-height: 0; margin: 8px 0; display: flex; flex-direction: column; background: var(--paper);
  border-radius: 22px; overflow: hidden; box-shadow: 0 2px 4px rgba(31, 43, 42, 0.12), 0 6px 16px rgba(31, 43, 42, 0.1);
}
.card.wide { flex-direction: row; }
.picture { position: relative; flex: none; background: var(--photo); touch-action: none; }
.picture img { display: block; width: 100%; height: 100%; object-fit: cover; }
.body { flex: 1; min-width: 0; min-height: 0; position: relative; }
.col { position: absolute; inset: 0; display: flex; flex-direction: column; }
.pagetext { flex: 1; min-height: 0; width: 100%; display: block; touch-action: none; }
.subtitle { text-align: center; color: var(--soft); font-size: 16px; padding: 0 16px 20px; }
.againrow { display: flex; justify-content: center; padding-bottom: 20px; }
.practice { text-align: center; color: var(--soft); font-size: 20px; font-weight: 700; padding-top: 20px; }
.notes { position: absolute; inset: 0; overflow: auto; padding: 28px; user-select: text; -webkit-user-select: text; }
.notes h2 { font-size: 26px; margin-top: 24px; }
.notes p, .notes ol { font-size: 18px; }
.notes ol { margin: 0; padding-left: 1.4em; }
.wordchips { display: flex; flex-wrap: wrap; gap: 8px; }
.wordchip { font-size: 24px; padding: 2px 14px; border: 1.5px solid var(--line); border-radius: 10px; }
.wordchip.heart { color: var(--heart); border-color: var(--heart); }
.reportrow { margin-top: 28px; }
.reportrow .btn { font-size: 16px; }
.rbottom { display: flex; align-items: center; }
.chev { width: 120px; height: 64px; flex: none; border-radius: 18px; border: 1.5px solid var(--line); background: var(--paper); cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center; }
.chev.primary { background: var(--accent); border-color: var(--accent); }
.chev.dim { opacity: 0.3; }
.chev svg { width: 40px; height: 40px; fill: none; stroke: var(--ink); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.chev.primary svg { stroke: #fff; }
.compact .chev { width: 72px; height: 52px; }
.compact .chev svg { width: 34px; height: 34px; }
.pips { flex: 1; display: flex; align-items: center; justify-content: center; align-self: stretch; touch-action: none; cursor: pointer; }
.pips i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); margin: 0 4px; flex: none; }
.pips i.on { width: 12px; height: 12px; background: var(--accent); }
.compact .pips i { width: 6px; height: 6px; margin: 0 2px; }
.compact .pips i.on { width: 9px; height: 9px; }

/* ---------- new book, characters ---------- */

.people { display: grid; gap: 12px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (orientation: landscape) { .people { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
.compact .people { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (orientation: landscape) { .compact .people { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.person {
  position: relative; display: flex; flex-direction: column; padding: 0; overflow: hidden; cursor: pointer;
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 16px; font: inherit; color: var(--soft);
}
.person.on { border: 4px solid var(--accent); color: var(--ink); }
.person .portrait { opacity: 0.55; }
.person.on .portrait { opacity: 1; }
.person .name { font-size: 16px; font-weight: 700; padding: 4px 0 8px; }
.tick { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 14px; background: var(--accent); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.portrait { display: block; position: relative; aspect-ratio: 1; background: #f4f1e8; }
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.portrait .busy i { width: 8px; height: 8px; }

.note { display: flex; align-items: center; gap: 16px; padding-bottom: 12px; }
.note p { flex: 1; font-size: 15px; }
.compact .note { flex-direction: column; align-items: flex-start; gap: 8px; }

.photos { display: flex; flex-wrap: wrap; gap: 12px; }
.photo { position: relative; width: 140px; height: 140px; border-radius: 12px; overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo .x { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border-radius: 16px; border: 0; background: rgba(31, 43, 42, 0.67); color: #fff; font: 700 22px/1 Andika, sans-serif; cursor: pointer; }
.photobuttons { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 12px; }

/* ---------- joining ---------- */

.joinpage { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.joincard { width: 100%; max-width: 640px; background: var(--paper); border-radius: 22px; padding: 36px; box-shadow: 0 2px 4px rgba(31, 43, 42, 0.12), 0 6px 16px rgba(31, 43, 42, 0.1); }
.compact .joincard { padding: 24px; }
.joincard h1 { font-size: 32px; }
.joincard .soft { padding: 10px 0 22px; }
.joincard .hint { font-size: 16px; background: #fff3dc; border-radius: 12px; padding: 12px 14px; margin-bottom: 18px; }
.joinrow { display: flex; align-items: center; gap: 16px; padding-top: 20px; }
.joinstatus { color: var(--soft); font-size: 16px; }
.welcomehead { font-size: 20px; margin-top: 26px; }
.fine, .fine a { font-size: 14px; color: var(--soft); margin-top: 18px; }
.joincard .soft.small { font-size: 15px; padding: 2px 0 8px; }
.makeown { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
a.btn { text-decoration: none; display: inline-flex; align-items: center; }

/* ---------- dialogs ---------- */

.shade { position: fixed; inset: 0; z-index: 10; background: rgba(31, 43, 42, 0.45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.dialog { width: 100%; max-width: 520px; max-height: 90vh; max-height: 90dvh; overflow: auto; background: var(--paper); border-radius: 22px; padding: 24px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25); }
.dialog h2 { font-size: 24px; margin-bottom: 8px; }
.dialog .message { color: var(--soft); white-space: pre-line; margin-bottom: 12px; }
.dialog .buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.form { display: flex; flex-direction: column; gap: 6px; }
.form .field { margin-top: 10px; }
.field.link { font-size: 15px; }
.linkrow { display: flex; gap: 10px; margin-top: 8px; }
.radio { display: flex; align-items: center; gap: 12px; padding: 6px 0; cursor: pointer; }
.radio input { width: 22px; height: 22px; accent-color: var(--accent); margin: 0; }
.choices { display: flex; flex-direction: column; }
.choice { font: 20px Andika, sans-serif; color: var(--ink); text-align: left; background: none; border: 0; border-bottom: 1.5px solid var(--line); padding: 14px 4px; cursor: pointer; display: flex; align-items: center; gap: 14px; }
.choice:last-child { border-bottom: 0; }
.small { font-size: 15px; }

/* ---------- the front page ---------- */

.landing { position: relative; min-height: 100vh; overflow-x: hidden; padding: 0 16px 48px; }
.wall { position: fixed; inset: -10% -5%; display: flex; gap: 14px; opacity: 0.32; filter: saturate(0.9);
  pointer-events: none; z-index: 0; transform: rotate(-4deg); }
.wall::after { content: ''; position: fixed; inset: 0;
  background: radial-gradient(ellipse at 50% 30%, var(--desk) 25%, transparent 75%); }
.wallcol { flex: 1; display: flex; flex-direction: column; gap: 14px; animation: drift linear infinite; }
.wallcol:nth-child(even) { animation-direction: reverse; }
.wallcol img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; background: var(--photo); }
@keyframes drift { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@media (prefers-reduced-motion: reduce) { .wallcol { animation: none; } }
.compact .wall { gap: 10px; } .compact .wallcol:nth-child(n+4) { display: none; }

.landing > :not(.wall) { position: relative; z-index: 1; max-width: 980px; margin-left: auto; margin-right: auto; }
.lhead { display: flex; align-items: center; gap: 10px; padding: 18px 0; font-weight: 700; font-size: 22px; }
.lhead img { width: 40px; height: 40px; border-radius: 10px; }
.lhead span { flex: 1; }
.hero { text-align: center; padding: 8vh 0 7vh; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.hero h1 { font-size: clamp(32px, 6vw, 56px); line-height: 1.08; max-width: 15em; text-wrap: balance; }
.lede { font-size: clamp(18px, 2.4vw, 22px); color: var(--soft); max-width: 34em; text-wrap: pretty; }
.herobtns { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn.big { font-size: 20px; padding: 14px 26px; }
.hero .fine { margin-top: 0; }
.hero .hint { font-size: 16px; background: #fff3dc; border-radius: 12px; padding: 10px 14px; }

.lsection { background: var(--paper); border-radius: 26px; padding: clamp(20px, 4vw, 40px); margin-top: 26px;
  box-shadow: 0 2px 4px rgba(31, 43, 42, 0.08), 0 10px 30px rgba(31, 43, 42, 0.08); }
.lsection h2 { font-size: 28px; margin-bottom: 18px; }
.samplecard { display: flex; gap: 28px; align-items: center; min-height: 220px; }
.samplepic { width: min(42%, 380px); aspect-ratio: 1; flex: none; position: relative; }
.samplepic img { width: 100%; height: 100%; object-fit: cover; border-radius: 18px; display: block; }
.pagearrow { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%;
  border: none; background: rgba(255, 255, 255, 0.9); color: #1f2b2a; font-size: 30px; line-height: 1;
  padding: 0 0 4px; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18); }
.pagearrow.prev { left: 10px; }
.pagearrow.next { right: 10px; }
.pagearrow[hidden] { display: none; }
.pagedots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 7px;
  padding: 6px 9px; border-radius: 99px; background: rgba(31, 43, 42, 0.45); }
.pagedots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.5); }
.pagedots span.on { background: #fff; }
.sampletext { flex: 1; display: flex; flex-direction: column; gap: 14px; }
.samplewords { height: 160px; display: flex; }
.compact .samplecard { flex-direction: column; align-items: stretch; }
.compact .samplepic { width: 100%; }
.compact .samplewords { height: 120px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.compact .steps { grid-template-columns: 1fr; }
.step1 { display: flex; flex-direction: column; gap: 8px; }
.step1 h3 { font-size: 21px; }
.step1 p:not(.idea):not(.dots) { color: var(--soft); font-size: 17px; }
.faces { display: flex; height: 92px; }
.faces img { height: 92px; width: 70px; object-fit: cover; object-position: 50% 12%; border-radius: 14px;
  margin-right: -10px; border: 3px solid var(--paper); background: var(--photo); }
.idea { height: 92px; display: flex; align-items: center; font-size: 18px; font-style: italic; background: var(--desk);
  border-radius: 16px 16px 16px 4px; padding: 10px 14px; }
.dots { height: 92px; display: flex; align-items: center; font-size: 34px; color: var(--accent); letter-spacing: 6px; }
.cta { text-align: center; }
.lfoot { display: flex; gap: 22px; justify-content: center; padding: 30px 0 0; font-size: 15px; }
.lfoot a { color: var(--soft); }
.sampletext a, .landing .fine a { color: var(--accent); }
.btn.you { width: 44px; min-width: 0; height: 44px; padding: 0; border-radius: 50%; justify-content: center; font-weight: 700; flex: none; }
.tilemore { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border-radius: 50%; border: none;
  background: rgba(255, 253, 246, 0.92); color: var(--ink); font: 700 20px/1 Andika, system-ui, sans-serif;
  box-shadow: 0 1px 4px rgba(31, 43, 42, 0.25); cursor: pointer; }
.icon { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn .icon { width: 19px; height: 19px; }
.choice .icon { color: var(--soft); }
.person.add { color: var(--accent); border-style: dashed; }
.person.add .portrait { display: flex; align-items: center; justify-content: center; background: none; }
.person.add .icon { width: 40%; height: 40%; stroke-width: 1.6; }
.levels { display: flex; flex-direction: column; gap: 8px; }
.levelrow { display: flex; align-items: center; gap: 14px; text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 16px; padding: 10px 14px; }
.levelrow.on { border: 3px solid var(--accent); padding: 8.5px 12.5px; }
.levelnum { width: 34px; height: 34px; border-radius: 50%; background: var(--desk); display: flex; align-items: center;
  justify-content: center; font-weight: 700; flex: none; }
.levelrow.on .levelnum { background: var(--accent); color: #fff; }
.levelwhat { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.levelname { font-weight: 700; }
.levelex { color: var(--soft); font-size: 16px; }
.levelhint { color: var(--soft); font-size: 14px; text-align: right; max-width: 40%; }
.compact .levelrow { flex-wrap: wrap; }
.compact .levelhint { text-align: left; max-width: none; flex-basis: 100%; padding-left: 48px; }
.btn.you .icon { width: 22px; height: 22px; }
.skel .square, .skelline { background: linear-gradient(100deg, var(--photo) 40%, #f8f9f6 50%, var(--photo) 60%) 0 0 / 300% 100%;
  animation: shimmer 1.6s linear infinite; }
.skelline { height: 16px; border-radius: 8px; margin: 12px 10px 0; }
.skelline.short { width: 55%; margin-bottom: 16px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .skel .square, .skelline { animation: none; } }
img.fadein { opacity: 0; transition: opacity 0.35s; }
img.fadein.in { opacity: 1; }
a.tile.job { color: inherit; text-decoration: none; cursor: pointer; }
.picture .drawing { display: none; }
.picture.pending img { visibility: hidden; }
.picture.pending .drawing { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 12px; align-items: center;
  justify-content: center; color: var(--soft); background: var(--photo); }
.picture .drawing .busy { position: static; }
.or { color: var(--soft); font-size: 15px; margin: 22px 0 8px; }
.sharedface { display: block; width: 160px; height: 160px; object-fit: cover; object-position: 50% 15%; border-radius: 22px; margin-bottom: 18px; background: var(--photo); }
.billing { display: flex; flex-direction: column; gap: 16px; max-width: 640px; }
.plancard { background: var(--paper); border: 1.5px solid var(--line); border-radius: 20px; padding: 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.plancard.offer { border: 3px solid var(--accent); }
.plancard h2 { font-size: 22px; }
.billing .hint { font-size: 16px; background: #fff3dc; border-radius: 12px; padding: 10px 14px; }
/* an empty slot on the shelf: a soft dashed outline round the whole tile, no card, a gentle plus */
.newtile { color: var(--accent); text-decoration: none; background: rgba(255, 253, 246, 0.45); box-shadow: none;
  border: 2px dashed #c3ccc6; }
.newtile:hover { border-color: var(--accent); }
.newtile .square { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: none; }
.newtile .square .icon { width: 26%; height: 26%; stroke-width: 1.4; opacity: 0.85; }
.newtile .newhint { color: var(--soft); font-size: 15px; text-align: center; padding: 0 16px; }
.newtile .tiletitle { color: var(--ink); }
.newtile.first .tiletitle { color: var(--accent); }
.shelfhead { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 30px 0 12px; }
.shelfhead h2 { font-size: 26px; }
.compact .shelfhead h2 { font-size: 22px; }
.opts { display: flex; flex-direction: column; gap: 4px; }
.optrow { display: flex; align-items: center; gap: 14px; padding: 12px 2px; border-bottom: 1.5px solid var(--line); cursor: pointer; }
.optrow .icon { color: var(--soft); }
.opttext { flex: 1; display: flex; flex-direction: column; }
.optrow input[type=checkbox] { appearance: none; -webkit-appearance: none; width: 50px; height: 30px; border-radius: 15px; flex: none;
  background: var(--line); position: relative; cursor: pointer; transition: background 0.15s; margin: 0; }
.optrow input[type=checkbox]::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.15s; }
.optrow input[type=checkbox]:checked { background: var(--accent); }
.optrow input[type=checkbox]:checked::after { transform: translateX(20px); }
.optrow.speed { flex-wrap: wrap; cursor: default; }
.optrow.speed .chips { gap: 6px; }
