/* Prism 5 — Direction B, "Atomic Clean" (V2 redesign, Nov 15, 2026).
   The same real brand art as Direction A, hung quietly: cream gallery
   ground, sputnik emblem banner, gem signature, posters as thumbnails.
   Patua One display, Nunito body. No atomic badge anywhere (Nov 15 ruling);
   the Starburst is the seal. No EST. 1955 (invented date, left out). */

:root {
  --cream: #FFF3DC;
  --teal: #0F5257;
  --teal-deep: #0A3A3E;
  --cherry: #D62828;
  --cherry-dark: #B01E1E;
  --butter: #F4C95D;
  --ink: #2E2620;
  --ink-soft: #5C5142;
  --muted: #6B5D4A;
  --muted-2: #7A6A52;
  --card: #FFFDF6;
  --line: #E9DCBC;
  --card-line: #E4D3AC;
  --field-line: #D9C48C;
  --teal-soft: #DDEBE7;
  --meter-track: #EBDCB4;
  --radius: 16px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: "Nunito", -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: "Patua One", Georgia, serif;
  font-weight: 400;
  color: var(--teal);
  margin: 0 0 8px;
  line-height: 1.2;
}

h1 { font-size: 30px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
h4 { font-size: 15px; }

p { margin: 0 0 10px; }
a { color: var(--teal); }

/* ---------- Sticky brand header: gallery style, gem signature ---------- */
.app-top { position: sticky; top: 0; z-index: 40; }
.app-header {
  background: var(--card);
  color: var(--teal);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 18px 4px;
}
.app-header-mark { width: 30px; height: 34px; object-fit: cover; border-radius: 7px; flex: none; }
.app-header-name {
  font-family: "Patua One", Georgia, serif;
  font-size: 1.18rem;
  font-weight: 400;
  color: var(--teal);
  line-height: 1;
}
.app-header-tag {
  margin-left: auto;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #9A8A6C;
  text-align: right;
  white-space: nowrap;
}
.chrome-thin {
  height: 2px;
  background: linear-gradient(90deg, transparent, #C9CDD1 20%, #8E959B 50%, #C9CDD1 80%, transparent);
  margin: 8px 20px 0;
}
@media (max-width: 420px) { .app-header-tag { display: none; } }

.view {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 120px;
}

/* Page titles: plain Patua, ink. Section titles: small caps Nunito. */
.page-title { color: var(--ink); }
.page-lede { color: var(--ink-soft); font-size: 15px; }
.section-title {
  margin: 18px 0 10px;
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}
.fine { color: var(--ink-soft); font-size: 13px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Buttons: light pills, Nunito 800. */
.btn {
  display: inline-block;
  background: #fff;
  color: var(--teal);
  border: 1.5px solid var(--teal);
  border-radius: 999px;
  padding: 10px 18px;
  font-family: "Nunito", sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.btn:hover { background: var(--teal-soft); }
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--teal); color: #fff; border-color: var(--teal); }
.btn.primary:hover { background: var(--teal-deep); }
.btn.cherry { background: var(--cherry); border-color: var(--cherry); color: #fff; }
.btn.cherry:hover { background: var(--cherry-dark); }
.btn.store-outline { background: transparent; color: var(--cherry); border: 1.5px solid var(--cherry); }
.btn.store-outline:hover { background: #FDECEC; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn .logo-mark { display: inline-block; vertical-align: -2px; margin-right: 5px; }

input, textarea {
  font-family: "Nunito", sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--field-line);
  border-radius: 12px;
  padding: 10px 14px;
  flex: 1 1 200px;
  min-width: 0;
}
input:focus, textarea:focus { outline: 2px solid var(--teal); outline-offset: 1px; }
textarea { width: 100%; resize: vertical; }

/* Cards: light paper, hairline border, no shadow. */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 0 0 16px;
}
.card h2, .card h3 {
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--teal);
}
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.card-head img.mark { width: 34px; height: 38px; object-fit: cover; border-radius: 8px; flex: none; }
.card-head h2, .card-head h3 { margin: 0; }

/* ---------- Front page: sputnik banner, medallion portrait ---------- */
.front { text-align: center; }
.sputnik-hero { position: relative; margin: 16px 16px 0; }
.sputnik-hero .sp-img {
  width: 100%;
  height: 172px;
  object-fit: cover;
  object-position: center 22%;
  display: block;
  border-radius: 18px;
}
.round-portrait-wrap {
  position: absolute;
  left: 50%;
  bottom: -38px;
  transform: translateX(-50%);
}
.round-portrait-wrap .portrait {
  border-radius: 50%;
  border: 3px solid var(--cream);
  box-shadow: 0 0 0 2px var(--teal), 0 10px 22px rgba(46, 38, 32, 0.22);
}
.front-body { padding: 48px 24px 0; text-align: center; }
.greeting { font-family: "Patua One", Georgia, serif; font-size: 1.6rem; color: var(--ink); margin: 0 0 2px; }
.greeting-accent { color: var(--ink); }
.tagline { margin: 0; font-size: 0.88rem; font-weight: 700; color: var(--muted-2); }
.front-lede { max-width: 480px; margin: 10px auto 0; color: var(--ink-soft); font-size: 0.95rem; }
.make-yours { text-align: left; margin-top: 16px; }
.make-yours p { font-size: 0.83rem; color: var(--ink-soft); }
.empty-panel { text-align: left; }
.empty-panel p { font-size: 0.83rem; color: var(--ink-soft); }
.empty-panel .store-btn { width: 100%; font-size: 1rem; padding: 13px; margin-top: 4px; }
.empty-panel .redeem-row { display: flex; gap: 8px; margin-top: 10px; }
.meter { font-size: 0.78rem; font-weight: 700; color: var(--muted-2); text-align: center; margin-top: 14px; }
.meter-bar { height: 7px; border-radius: 99px; background: var(--meter-track); overflow: hidden; margin-top: 5px; }
.meter-fill { display: block; height: 100%; background: var(--teal); border-radius: 99px; }
.mission-strip {
  background: var(--teal-deep);
  color: #FFF3DC;
  text-align: center;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.45;
  padding: 10px 16px;
  border-radius: 12px;
  margin-top: 16px;
}

/* Photon grid: simple gallery cards, portraits carry the 1950s. */
.photon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}
.photon-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 10px;
  cursor: pointer;
  text-align: center;
  font-family: inherit;
  transition: transform 0.15s, border-color 0.15s;
}
.photon-card:hover { border-color: var(--teal); transform: translateY(-2px); }
.photon-card:disabled { opacity: 0.55; cursor: default; }
.photon-card .portrait {
  display: block;
  margin: 0 auto 8px;
  border-radius: 16px;
}
.photon-name { display: block; font-family: "Nunito", sans-serif; font-weight: 800; font-size: 0.92rem; color: var(--ink); }
.photon-tag { display: block; font-size: 12px; color: var(--ink-soft); line-height: 1.35; margin-top: 4px; }
.portrait { display: inline-block; border-radius: 24px; overflow: hidden; flex: none; }
.portrait img, .portrait svg { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Chat thread: gallery-quiet, Claude-style replies ---------- */
.thread-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  row-gap: 2px;
  gap: 10px;
  padding: 12px 16px 10px;
  border-bottom: 2px solid;
  border-image: linear-gradient(90deg, transparent, #B9BDC2, #7E858C, #B9BDC2, transparent) 1;
}
.thread-head .portrait {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px var(--teal);
}
.thread-head .back-btn {
  background: none;
  border: none;
  color: var(--teal);
  font-family: "Nunito", sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  padding: 6px;
  flex: none;
}
.thread-head .btn.call { margin-left: auto; }
.thread-title { flex: 1 1 100px; min-width: 0; }
.thread-title h2 {
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--ink);
  margin-bottom: 0;
}
.thread-voice { display: block; font-size: 0.72rem; font-weight: 700; color: var(--muted-2); }

/* Customization wizard: name, voice, look. Same gallery look as the rest. */
.customize { max-width: 720px; margin: 0 auto; }
.custom-steps { display: flex; gap: 8px; margin: 14px 0; }
.custom-step-tab { flex: 1; border: 1.5px solid var(--field-line); background: #fff; border-radius: 10px; padding: 9px 6px; font-family: "Nunito", system-ui, sans-serif; font-weight: 800; font-size: 0.85rem; color: var(--ink-soft); cursor: pointer; }
.custom-step-tab.active { background: var(--teal); border-color: var(--teal); color: #fff; }
.custom-step-tab.done { border-color: var(--teal); color: var(--teal); }
.voice-opt, .look-pick { display: block; width: 100%; text-align: left; background: #fff; border: 1.5px solid var(--field-line); border-radius: 12px; padding: 10px 14px; margin-bottom: 8px; cursor: pointer; font-family: "Nunito", system-ui, sans-serif; }
.voice-opt b, .look-pick b { display: block; color: var(--ink); font-size: 0.95rem; font-weight: 800; }
.voice-opt span, .look-pick span { display: block; font-size: 0.82rem; color: var(--ink-soft); margin-top: 2px; }
.voice-opt.selected, .look-pick.selected { border-color: var(--teal); background: var(--teal-soft); }
.tune-row { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.tune-row p { flex: 1; margin: 0; font-weight: 700; font-size: 0.9rem; }
.tune-yn { border: 1.5px solid var(--field-line); background: #fff; border-radius: 9px; padding: 7px 14px; font-family: "Nunito", system-ui, sans-serif; font-weight: 800; font-size: 0.85rem; color: var(--ink-soft); cursor: pointer; }
.tune-yn.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.portrait-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 12px 0; }
.portrait-pick { background: none; border: 2px solid transparent; border-radius: 14px; padding: 6px 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.portrait-pick span { font-size: 0.72rem; font-weight: 800; color: var(--ink-soft); }
.portrait-pick.selected { border-color: var(--teal); background: var(--teal-soft); }
.custom-skip-all { margin-top: 14px; }
.switchboard-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border-bottom: 1px solid #EFE3C2;
  padding: 7px 12px;
}
.switchboard-strip img { width: 40px; height: 44px; object-fit: cover; object-position: top; border-radius: 7px; flex: none; }
.switchboard-strip p { margin: 0; font-size: 0.7rem; font-weight: 700; color: var(--muted-2); line-height: 1.35; }
.switchboard-strip p b { color: var(--teal); }
.messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 55vh;
  overflow-y: auto;
  padding: 16px 14px 120px;
  margin-bottom: 12px;
}
.msg { max-width: 88%; font-size: 0.9rem; line-height: 1.45; }
.msg p { margin: 0; white-space: pre-wrap; word-break: break-word; }
.msg.user {
  align-self: flex-end;
  background: var(--teal-soft);
  color: var(--ink);
  border-radius: 18px 18px 4px 18px;
  padding: 10px 13px;
}
.msg.bot {
  align-self: flex-start;
  display: flex;
  gap: 9px;
  padding: 2px 2px 2px 0;
}
.msg.bot .portrait {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex: none;
  margin-top: 2px;
}
/* Streaming reply: three dots while the brain thinks, then words as they land. */
.typing { display: inline-flex; gap: 4px; align-items: center; padding: 4px 0; }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.35; animation: typing-bounce 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.35; } 30% { transform: translateY(-4px); opacity: 0.9; } }
@media (prefers-reduced-motion: reduce) {
  .typing span { animation: none; opacity: 0.6; }
}
.composer { display: flex; gap: 8px; align-items: center; }
.composer input { border-radius: 999px; }
.composer .send {
  border: none;
  cursor: pointer;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--teal);
  color: #fff;
}
.composer .send svg { width: 19px; height: 19px; }

/* Pinned composer dock: fixed just above the tab bar, solid cream ground so
   messages scrolling beneath never show through. The meter rides in the
   dock, legible, not fine print. */
.composer-dock {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(70px + env(safe-area-inset-bottom) + var(--kb, 0px));
  width: min(688px, calc(100% - 32px));
  background: var(--cream);
  border-top: 1px solid var(--line);
  padding: 8px 0 10px;
  z-index: 30;
  transition: bottom 0.2s ease-out;
}
.composer-dock .chat-error { margin-bottom: 8px; }
/* The header's overflow menu: everything that is not the chat lives
   behind one small button, so the thread stays clean — messages and
   the composer, nothing else. */
.thread-menu { position: relative; margin-left: auto; flex: none; }
.thread-menu summary {
  list-style: none;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--ink);
  letter-spacing: 1px;
}
.thread-menu summary::-webkit-details-marker { display: none; }
.thread-menu summary:hover { background: rgba(0, 0, 0, 0.06); }
.thread-menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 220px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
  z-index: 60;
}
.thread-menu-list .btn { justify-content: flex-start; text-align: left; }

.chat-error {
  background: #FDECEC;
  border: 1px solid var(--cherry);
  color: var(--cherry);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 14px;
}

/* ---------- Brand in motion: the gallery breathes, slowly ---------- */
@media (prefers-reduced-motion: no-preference) {
  .app-header-mark { animation: gem-bob 5s ease-in-out infinite, gem-glow 5s ease-in-out infinite; }
  .chrome-thin { background-size: 200% 100%; animation: chrome-shimmer 9s linear infinite; }
  .thread-head .portrait { animation: ring-breathe 4s ease-in-out infinite; }
  .round-portrait-wrap .portrait { animation: medallion-float 6s ease-in-out infinite; }
  .switchboard-strip img { animation: poster-glow 5s ease-in-out infinite; }
  .sputnik-hero { overflow: hidden; border-radius: 18px; }
  .sputnik-hero .sp-img { animation: sputnik-drift 24s ease-in-out infinite alternate; }
}
@keyframes gem-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@keyframes gem-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(244, 201, 93, 0); } 50% { box-shadow: 0 0 12px 2px rgba(244, 201, 93, 0.55); } }
@keyframes chrome-shimmer { 0% { background-position: 0% 0; } 100% { background-position: 200% 0; } }
@keyframes ring-breathe { 0%, 100% { box-shadow: 0 0 0 1.5px var(--teal); } 50% { box-shadow: 0 0 0 1.5px var(--teal), 0 0 14px 2px rgba(244, 201, 93, 0.6); } }
@keyframes medallion-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes poster-glow { 0%, 100% { box-shadow: none; } 50% { box-shadow: 0 0 12px rgba(244, 201, 93, 0.5); } }
@keyframes sputnik-drift { from { transform: scale(1); } to { transform: scale(1.06) translateX(-4px); } }

/* ---------- Store: posters as thumbnails, plain buying text ---------- */
.store-head { padding: 16px 18px 2px; display: flex; align-items: center; gap: 10px; }
.store-head img { width: 40px; height: 37px; object-fit: cover; border-radius: 10px; flex: none; }
.store-head h1 { margin: 0; font-size: 1.35rem; color: var(--ink); }
.store-head p { margin: 2px 0 0; font-size: 0.83rem; color: var(--ink-soft); font-weight: 600; }
.poster-row {
  display: flex;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  margin-bottom: 10px;
  align-items: flex-start;
}
.poster-row img { width: 86px; height: 176px; object-fit: cover; object-position: top; border-radius: 10px; flex: none; }
.poster-row .pr-txt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.poster-row b { font-weight: 800; font-size: 0.95rem; }
.poster-row .desc { font-size: 0.76rem; color: var(--ink-soft); margin: 2px 0 6px; line-height: 1.4; }
.poster-row .price { font-weight: 800; font-size: 0.92rem; }
.poster-row .at { font-size: 0.66rem; color: var(--muted-2); font-weight: 700; }
.poster-row .btn { margin-top: auto; align-self: flex-start; }
.poster-row .owned-badge { align-self: flex-start; }
.poster-row .monthly-row { margin-top: 8px; }
.poster-row .monthly-row .btn { margin-top: 0; }
.price { font-family: "Nunito", sans-serif; font-weight: 800; font-size: 17px; color: var(--ink); }
.price .fine { font-family: "Nunito", sans-serif; font-size: 13px; font-weight: 600; }
.kind {
  font-family: "Nunito", sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}
.product-card { transition: transform 0.15s; }
.product-card:hover { transform: translateY(-2px); }
.product-card h3 { margin-bottom: 2px; }
.product-card .portrait {
  display: block;
  margin: 0 auto 8px;
  border-radius: 16px;
}
/* Photon store cards: portrait fills the card top, name plain ink. */
.photon-store { padding: 0 0 12px; overflow: hidden; text-align: center; }
.photon-store .portrait {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1;
  border-radius: 16px 16px 0 0;
  margin: 0 0 8px;
  display: block;
}
.photon-store .portrait img { object-position: top; }
.photon-store h3 { margin-bottom: 2px; }
.photon-store .photon-name { font-family: "Nunito", sans-serif; font-weight: 800; font-size: 0.92rem; color: var(--ink); }
.photon-store p { padding: 0 12px; }
.photon-store .price { padding: 0 12px; }
.owned-badge {
  display: inline-block;
  background: var(--butter);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  font-family: "Nunito", sans-serif;
  font-size: 13px;
  font-weight: 800;
}
.toggle { display: flex; gap: 8px; margin: 0 0 18px; }
.toggle-btn {
  flex: 1;
  background: var(--card);
  border: 1.5px solid var(--teal);
  color: var(--teal);
  border-radius: 999px;
  padding: 10px;
  font-family: "Nunito", sans-serif;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.toggle-btn.active { background: var(--teal); color: #fff; }

/* Store: jump chips and collapsible groups. */
.store-jump { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 18px; }
.store-jump a {
  display: inline-block;
  background: #fff;
  border: 1.5px solid var(--teal);
  color: var(--teal);
  border-radius: 999px;
  padding: 7px 14px;
  font-family: "Nunito", sans-serif;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}
.store-jump a:hover { background: var(--teal-soft); }
.store-group { margin-bottom: 16px; }
.store-group summary {
  cursor: pointer;
  padding: 10px 2px;
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.store-group summary::-webkit-details-marker { display: none; }
.store-group summary .summary-title {
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}
.store-group summary .summary-title::before { content: "▸ "; color: var(--cherry); }
.store-group[open] summary .summary-title::before { content: "▾ "; }
.cat-title {
  font-family: "Nunito", sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 16px 0 8px;
}

/* Personality Builder: featured row, first in Sparks & Plugs. No checkout
   link exists for it yet (Stripe links not created), so it shows price only. */
.addon-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 8px;
}
.addon-row.featured { border: 1.5px solid var(--cherry); background: #FFF8EA; }
.addon-row b { font-size: 0.9rem; display: block; }
.addon-row span { font-size: 0.72rem; color: var(--muted-2); font-weight: 700; }
.addon-row .pb-desc { display: block; margin-top: 3px; line-height: 1.4; }
.addon-row .price { font-weight: 800; white-space: nowrap; }

/* Upkeep card: paper with a butter frame, Starburst seal. */
.upkeep-card { border: 1.5px solid var(--butter); display: flex; gap: 12px; align-items: flex-start; }
.upkeep-card img { width: 56px; height: 51px; object-fit: cover; border-radius: 12px; flex: none; }
.upkeep-card b { font-family: "Nunito", sans-serif; font-weight: 800; font-size: 1.05rem; }
.upkeep-card .price { font-size: 1.2rem; font-weight: 800; }
.upkeep-card p { font-size: 0.82rem; margin: 5px 0 0; }
.store-foot { text-align: center; font-size: 0.72rem; color: var(--muted-2); font-weight: 700; padding: 14px 10px 4px; }

/* Inboxes. */
.inbox-grid { display: grid; gap: 12px; }
@media (min-width: 640px) { .inbox-grid { grid-template-columns: repeat(3, 1fr); } }
.inbox-card h3 { margin-bottom: 4px; }
.inbox-msg { border-top: 1px solid var(--line); padding: 10px 0; }
.inbox-subject { font-weight: 800; margin-bottom: 2px; }
.inbox-meta { font-size: 12px; color: var(--ink-soft); margin-bottom: 4px; }
.inbox-snippet { font-size: 14px; color: var(--ink-soft); }
.draft-form { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.draft-form input, .draft-form textarea { flex: none; width: 100%; }

/* Upkeep. */
.meter-line { font-family: "Nunito", sans-serif; font-weight: 800; color: var(--teal); }
.owned-list, .included-list { margin: 0 0 12px; padding-left: 20px; }
.owned-list li, .included-list li { margin-bottom: 4px; }

/* Bottom nav: gallery tab bar, paper with a hairline top edge. */
.nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 4px;
  background: var(--card);
  border-top: 1px solid #E7D9B8;
  padding: 8px 10px calc(10px + env(safe-area-inset-bottom));
  z-index: 40;
}
.nav-btn {
  flex: 1;
  background: none;
  border: none;
  cursor: pointer;
  font-family: "Nunito", sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 0.68rem;
  font-weight: 800;
  color: #8A7B63;
  padding: 6px 2px;
  border-radius: 12px;
  min-height: 44px;
}
.nav-btn svg { width: 21px; height: 21px; }
.nav-btn.active { color: var(--teal); }

/* Toast. */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(184px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--cream);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  max-width: 90vw;
  text-align: center;
  z-index: 50;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--cherry); }
