/* Painted interface: coins, day and neighbourhood affection read as pictures
   first, words second. Art lives in /media/ui (tools/ai-gen/ui_icons.py). */
:root {
  --hud-ink: #6a4632;
  --hud-gold: #c99a52;
  --hud-rose: #c2668a;
  --hud-number: "Noto Serif TC", "Songti TC", Georgia, serif;
}
.ui-art {
  display: block;
  flex-shrink: 0;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* ── Status HUD ─────────────────────────────────────────── */
.status-bar {
  gap: 22px;
  align-items: center;
}
.hud {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px 0 40px;
  margin-left: 14px;
  border: 1.5px solid #d6b47a;
  border-radius: 999px;
  background:
    radial-gradient(120% 140% at 30% 0%, #fffef8 0 40%, transparent 70%),
    linear-gradient(#fff9ec, #f6e3c0);
  box-shadow:
    inset 0 0 0 2.5px #fffaf0,
    inset 0 -3px 0 #e9cf9f88,
    0 3px 8px #7a502a1c;
  color: var(--hud-ink);
  font: inherit;
  white-space: nowrap;
}
.hud .hud-art {
  position: absolute;
  left: -16px;
  top: 50%;
  width: 54px;
  height: 54px;
  transform: translateY(-50%);
  filter: drop-shadow(0 2px 2px #6a3f2133);
}
.hud-value {
  font: 700 19px/1 var(--hud-number);
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: 0.5px;
  color: var(--hud-ink);
  text-shadow: 0 1px 0 #fff;
}
button.hud {
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}
button.hud:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 0 0 2.5px #fffaf0,
    inset 0 -3px 0 #e9cf9f88,
    0 5px 12px #7a502a2a;
}
button.hud:hover .hud-art {
  animation: hud-coin-spin 0.6s ease;
}
@keyframes hud-coin-spin {
  50% {
    transform: translateY(-58%) scaleX(0.75) rotate(-6deg);
  }
}
.hud-coin {
  min-width: 128px;
}

/* Day: the painted calendar carries the day number on its page. */
.hud-date {
  padding-left: 46px;
  gap: 6px;
}
.hud-cal {
  position: absolute;
  left: -16px;
  top: 50%;
  width: 56px;
  height: 56px;
  transform: translateY(-50%);
}
.hud-cal .hud-art {
  position: static;
  width: 100%;
  height: 100%;
  transform: none;
}
.hud-cal b {
  position: absolute;
  left: 15%;
  right: 13%;
  top: 34%;
  text-align: center;
  font: 800 17px/1 var(--hud-number);
  font-variant-numeric: lining-nums;
  color: #a2466c;
}
.hud-season {
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 1px 1px #6a3f2128);
}

/* Affection: a heart and a little meter that fills toward 100. */
.hud-heart {
  gap: 9px;
}
.hud-meter {
  position: relative;
  width: 74px;
  height: 11px;
  border-radius: 999px;
  background: #f0dcc4;
  box-shadow:
    inset 0 1px 2px #8b5a3a40,
    0 1px 0 #fff;
  overflow: hidden;
}
.hud-meter i {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background:
    linear-gradient(#ffffff70, transparent 55%),
    linear-gradient(90deg, #f1a3b9, #cf5f88);
  transition: width 0.5s ease;
}

/* ── Top bar buttons ─────────────────────────────────────── */
.account-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px 4px 8px;
  border-radius: 999px;
}
.btn-art {
  width: 30px;
  height: 30px;
}
.topbar > .icon-button {
  display: grid;
  place-items: center;
  border-radius: 999px;
  width: 44px;
  height: 44px;
  padding: 0;
}
.topbar > .icon-button .btn-art {
  width: 32px;
  height: 32px;
  transition: transform 0.4s ease;
}
.topbar > .icon-button:hover .btn-art {
  transform: rotate(60deg);
}

/* ── Navigation: big painted icons, small labels ─────────── */
.rail .nav-button,
.mobile-nav .nav-button {
  position: relative;
}
.rail .nav-button {
  gap: 10px;
  font-size: 15px;
  letter-spacing: 1px;
}
.nav-art {
  width: 46px;
  height: 46px;
  margin: -8px 0;
  filter: drop-shadow(0 2px 2px #6a3f2128);
  transition: transform 0.2s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.nav-button:hover .nav-art {
  transform: translateY(-3px) rotate(-4deg);
}
.nav-button.active .nav-art {
  transform: scale(1.08) translateY(-2px);
}

/* ── Floors: a picture of each floor, with a small number tag ─ */
.floor-button {
  position: relative;
  display: grid;
  place-items: center;
  padding: 0;
  width: 50px;
  height: 50px;
}
.floor-art {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 1px 1px #6a3f2130);
}
.floor-tag {
  position: absolute;
  right: -5px;
  bottom: -5px;
  min-width: 22px;
  padding: 2px 5px;
  border-radius: 999px;
  background: #fff8ea;
  border: 1px solid #c8a46a;
  font: 700 10px/1.2 var(--hud-number);
  color: #8b633d;
}
.floor-button.selected .floor-tag {
  background: #b9577e;
  border-color: #fff2e5;
  color: #fff;
}

/* ── Scene action and other picture buttons ─────────────── */
.art-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.scene-action .art-pill {
  padding: 8px 20px 8px 10px;
}
.art-pill .btn-art {
  width: 36px;
  height: 36px;
  margin: -6px 0;
  filter: drop-shadow(0 1px 2px #4a1f3044);
}

/* ── Daily cards ─────────────────────────────────────────── */
.card-art {
  width: 34px;
  height: 34px;
  margin: -8px -4px -8px 0;
}
.checklist li {
  gap: 8px;
}
.checklist .check-art {
  width: 26px;
  height: 26px;
}
.checklist li span {
  flex: 1;
}
.checklist li:not(.done) .check-art {
  filter: grayscale(0.7) opacity(0.6);
}
.strip-art {
  width: 26px;
  height: 26px;
}

/* ── Panels ──────────────────────────────────────────────── */
.panel-head {
  gap: 12px;
}
.panel-art {
  width: 50px;
  height: 50px;
  margin: -6px 0;
  filter: drop-shadow(0 2px 2px #6a3f2128);
}
.panel-head > div {
  flex: 1;
}
.panel-cash {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 12px 3px 4px;
  border-radius: 999px;
  border: 1px solid #d6b47a;
  background: linear-gradient(#fff9ec, #f6e3c0);
  font: 700 15px/1 var(--hud-number);
  color: var(--hud-ink);
}
.cash-art {
  width: 28px;
  height: 28px;
}

/* ── Tablet ─────────────────────────────────────────────── */
@media (max-width: 1100px) and (min-width: 721px) {
  .status-bar {
    gap: 16px;
  }
  .hud {
    padding-right: 11px;
  }
  .hud-meter {
    width: 50px;
  }
  .nav-art {
    width: 40px;
    height: 40px;
  }
}

/* ── Phone ──────────────────────────────────────────────── */
@media (max-width: 720px) {
  .status-bar {
    gap: 6px;
    padding-left: 10px;
    display: flex;
  }
  .hud {
    flex: 1 1 0;
    min-width: 0;
    height: 38px;
    margin-left: 6px;
    padding: 0 8px 0 30px;
    gap: 5px;
    justify-content: center;
  }
  .hud .hud-art {
    left: -14px;
    width: 44px;
    height: 44px;
  }
  .hud-coin {
    min-width: 0;
  }
  .hud-value {
    font-size: 15px;
  }
  .hud-date {
    padding-left: 34px;
    gap: 3px;
  }
  .hud-cal {
    left: -14px;
    width: 46px;
    height: 46px;
  }
  .hud-cal b {
    font-size: 14px;
  }
  .hud-season {
    width: 22px;
    height: 22px;
  }
  .hud-meter {
    width: auto;
    flex: 1;
    min-width: 18px;
    height: 8px;
  }
  .hud-heart .hud-value {
    font-size: 13px;
  }
  .account-button {
    padding: 2px 10px 2px 4px;
    font-size: 11px;
  }
  .account-button .btn-art {
    width: 26px;
    height: 26px;
  }
  .topbar > .icon-button {
    width: 36px;
    height: 36px;
    min-width: 36px;
  }
  .topbar > .icon-button .btn-art {
    width: 28px;
    height: 28px;
  }
  .floor-button {
    width: 40px;
    height: 40px;
    min-height: 40px;
  }
  .floor-art {
    width: 31px;
    height: 31px;
  }
  .floor-tag {
    font-size: 8px;
    min-width: 18px;
    padding: 1px 4px;
    right: -4px;
    bottom: -4px;
  }
  .floor-controls {
    gap: 9px;
  }
  .scene-action .art-pill {
    padding: 6px 13px 6px 6px;
  }
  .art-pill .btn-art {
    width: 30px;
    height: 30px;
  }
  .mobile-nav .nav-button {
    gap: 1px;
    font-size: 10px;
    padding-top: 4px;
  }
  .mobile-nav .nav-art {
    width: 38px;
    height: 38px;
    margin: -4px 0 -2px;
  }
  .panel-art {
    width: 40px;
    height: 40px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .nav-art,
  .hud-meter i,
  .topbar > .icon-button .btn-art {
    transition: none;
  }
  button.hud:hover .hud-art {
    animation: none;
  }
}

/* ── Panel sub-tabs: little picture tiles ───────────────── */
.tabs.art-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
}
.tabs.art-tabs button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 0;
  padding: 10px 6px 8px;
  border-radius: 16px;
  border: 1.5px solid #ead8b8;
  background: linear-gradient(#fffdf7, #fbf0dd);
  box-shadow: inset 0 -2px 0 #ecd9b566;
  font-size: 12px;
  line-height: 1.25;
  color: #7c6450;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease;
}
.tabs.art-tabs button:hover {
  transform: translateY(-2px);
  border-color: #d6b47a;
}
.tabs.art-tabs button.selected {
  border-color: #c98aa5;
  background: linear-gradient(#fff6f8, #f6dfe8);
  box-shadow:
    inset 0 0 0 2px #fffaf6,
    0 3px 8px #b9577e26;
  color: var(--rose-dark);
  font-weight: 700;
}
.tab-art {
  width: 42px;
  height: 42px;
  filter: drop-shadow(0 2px 2px #6a3f2124);
  transition: transform 0.2s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.tabs.art-tabs button:not(.selected) .tab-art {
  filter: saturate(0.75) drop-shadow(0 2px 2px #6a3f2118);
}
.tabs.art-tabs button.selected .tab-art {
  transform: scale(1.08) translateY(-1px);
}

/* ── Scene zoom: painted magnifiers and paw heart ───────── */
.scene-zoom .icon-button {
  display: grid;
  place-items: center;
}
.zoom-art {
  width: 30px;
  height: 30px;
  transition: transform 0.15s ease;
}
.scene-zoom .icon-button:hover .zoom-art {
  transform: scale(1.12);
}
@media (max-width: 720px) {
  .tabs.art-tabs {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .tabs.art-tabs button {
    padding: 8px 4px 6px;
    font-size: 11px;
  }
  .tab-art {
    width: 36px;
    height: 36px;
  }
  .zoom-art {
    width: 26px;
    height: 26px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tab-art,
  .zoom-art,
  .tabs.art-tabs button {
    transition: none;
  }
}

/* ── Panel cards: real pictures of what you buy, cook and hire ─ */
.with-thumb {
  gap: 14px;
}
.with-thumb > .grow,
.case-button > .grow {
  flex: 1;
  min-width: 0;
}
.thumb {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 38%, #fffdf8 0 45%, transparent 75%),
    linear-gradient(#fbf1df, #f2e1c4);
  box-shadow:
    inset 0 0 0 1.5px #ead6b2,
    inset 0 -3px 0 #e7cfa466;
}
.thumb .ui-art {
  width: 54px;
  height: 54px;
  filter: drop-shadow(0 2px 2px #6a3f2126);
}
.thumb.furn-thumb {
  width: 84px;
  height: 84px;
}
.thumb.furn-thumb .ui-art {
  width: 76px;
  height: 76px;
}
.thumb.portrait-art .ui-art {
  width: 60px;
  height: 60px;
  border-radius: 12px;
}
.thumb.locked .ui-art {
  filter: grayscale(0.8) opacity(0.55);
}
.coin-inline {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin: -3px 2px -4px 4px;
  vertical-align: middle;
}
button .coin-inline + span {
  font-variant-numeric: tabular-nums;
}
.mini-stat.art-stat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: left;
}
.stat-art {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 2px 2px #6a3f2124);
}
.item-actions .art-pill {
  padding-left: 8px;
}
.item-actions .art-pill .btn-art {
  width: 28px;
  height: 28px;
}
.medal-art {
  width: 46px;
  height: 46px;
  filter: grayscale(1) opacity(0.4);
}
.badge-card.earned .medal-art {
  filter: drop-shadow(0 2px 3px #9b6a2a40);
  animation: medal-shine 3.2s ease-in-out infinite;
}
@keyframes medal-shine {
  50% {
    transform: rotate(-6deg) scale(1.05);
  }
}
.case-button {
  gap: 14px;
}
.case-art {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
}
.case-button:disabled .case-art {
  filter: grayscale(0.9) opacity(0.45);
}
.pet-hero-art {
  width: 120px;
  height: 120px;
  margin: 0 auto 6px;
  filter: drop-shadow(0 4px 4px #6a3f2128);
  animation: pet-bob 2.8s ease-in-out infinite;
}
@keyframes pet-bob {
  50% {
    transform: translateY(-4px);
  }
}
@media (max-width: 720px) {
  .thumb {
    width: 52px;
    height: 52px;
  }
  .thumb .ui-art {
    width: 44px;
    height: 44px;
  }
  .thumb.furn-thumb {
    width: 64px;
    height: 64px;
  }
  .thumb.furn-thumb .ui-art {
    width: 58px;
    height: 58px;
  }
  .with-thumb {
    gap: 10px;
  }
  .mini-stat.art-stat {
    flex-direction: column;
    gap: 2px;
    text-align: center;
  }
  .stat-art {
    width: 32px;
    height: 32px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .badge-card.earned .medal-art,
  .pet-hero-art {
    animation: none;
  }
}

/* ── Build toolbar, settings and journal notes ───────────── */
.build-selection {
  align-items: center;
  gap: 10px;
}
.build-selection > span {
  flex: 1;
}
.build-thumb {
  width: 46px;
  height: 46px;
  margin: -8px 0;
  filter: drop-shadow(0 2px 2px #6a3f2126);
}
.build-tools .art-pill {
  justify-content: center;
}
.build-tools .art-pill .btn-art {
  width: 30px;
  height: 30px;
}
.volume-row {
  display: grid;
  grid-template-columns: 40px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}
.volume-art {
  grid-row: 1 / 3;
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 2px 2px #6a3f2124);
}
.volume-row input[type="range"] {
  margin-top: 4px;
}
.note-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.note-art {
  width: 38px;
  height: 38px;
  margin-top: 2px;
  filter: drop-shadow(0 2px 2px #6a3f2120);
}
.note-card > .grow {
  flex: 1;
  min-width: 0;
}
@media (max-width: 720px) {
  .build-thumb {
    width: 38px;
    height: 38px;
  }
  .build-tools .art-pill {
    gap: 4px;
    padding-left: 4px;
    padding-right: 6px;
  }
  .build-tools .art-pill .btn-art {
    width: 24px;
    height: 24px;
  }
}

/* ── Full-story unlock ─────────────────────────────────── */
.tag.gold {
  background: #f7e6bf;
  color: #8a5d1f;
  border-color: #dcb873;
}
.unlock-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-top: 18px;
  padding: 18px;
  border-radius: 20px;
  border: 1.5px solid #dcb873;
  background:
    radial-gradient(120% 120% at 0% 0%, #fffdf6 0 40%, transparent 70%),
    linear-gradient(#fff7e6, #f8e6c4);
  box-shadow: 0 6px 18px #8a5d1f1f;
}
.unlock-card > .grow {
  flex: 1;
}
.unlock-card h3 {
  margin: 0 0 6px;
}
.unlock-card .art-pill {
  margin-top: 12px;
}
.unlock-art {
  width: 64px;
  height: 64px;
  filter: drop-shadow(0 3px 3px #6a3f2128);
}
@media (max-width: 720px) {
  .unlock-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}
