:root {
  --bg: #f7f7f2;
  --ink: #243a31;
  --teal: #285744;
  --muted: #52685d;
  --line: #e1e9df;
  --soft: #e8f2e8;
  --white: #fffefa;
  --rose: #9c5846;
  --shadow: 0 12px 34px #193d2910;
}
body { background: radial-gradient(ellipse at 75% 0, #edf3e8 0, transparent 490px), var(--bg); }
.shell { width: min(1190px, calc(100% - 48px)); }
.topbar {
  height: 64px;
  padding-inline: max(24px, calc((100% - 1190px) / 2));
  background: #fbfcf8;
  color: #244636;
  border-bottom: 1px solid #e4ebe0;
}
.brand { letter-spacing: -.075em; font-size: 27px; }
.brand-mark { width: 34px; height: 34px; border-radius: 12px; background: #305e4a; color: #eff6e9; }
.brand-dot { color: #9c5846; }
.top-divider { background: #dbe4d8; }
.top-title { color: #56695e; }
.top-tag { background: #eef3e9; color: #335d48; border-color: #e0e9dc; }
.status-dot { background: #4c8161; }
.hero-showcase {
  display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); align-items: stretch;
  margin: 23px 0 16px; padding: 8px; border-radius: 24px;
  background: linear-gradient(115deg, #fcf9ee, #e8f0e4 88%);
  border: 1px solid #e1e9d9; box-shadow: var(--shadow);
}
.hero-copy { align-self: center; padding: 24px clamp(22px, 3.7vw, 46px); }
.hero-copy .eyebrow { color: #4c7055; margin: 0 0 11px; letter-spacing: .16em; }
.hero-copy h1 {
  font-size: clamp(34px, 4.3vw, 55px); font-weight: 800; line-height: 1.16;
  margin: 0 0 11px; letter-spacing: -.072em; word-break: keep-all;
}
.hero-copy h1 span { color: var(--rose); }
.hero-copy > p:not(.eyebrow) {
  color: #526a5c; margin: 0; line-height: 1.68; font-size: 14px; word-break: keep-all;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.hero-actions button { border-radius: 999px; padding: 9px 14px; min-height: 43px; }
.hero-photo { min-height: 278px; position: relative; overflow: hidden; border-radius: 17px; background: #e5dac5; }
.hero-photo img { width: 100%; height: 100%; position: absolute; object-fit: cover; object-position: center 46%; }
.photo-caption {
  position: absolute; bottom: 10px; right: 10px; background: #fffdf4ef; padding: 7px 12px;
  color: #315b49; border-radius: 99px; font-size: 11px; font-weight: 800; box-shadow: 0 3px 10px #273f211f;
}
.photo-caption span { color: #6c9874; }

.app-navigation {
  position: sticky; z-index: 4; top: 0; display: grid; gap: 0;
  border: 0; border-radius: 13px; margin: 0 0 13px; background: #f7f7f2;
  padding-block: 4px; scroll-margin-top: 0;
}
.main-nav {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px;
  border-radius: 13px; padding: 4px; background: #fffefa; border: 1px solid var(--line);
  box-shadow: 0 4px 18px #193d290b;
}
.app-navigation .group-tab {
  display: flex; justify-content: center; align-items: center; gap: 8px;
  min-width: 0; min-height: 45px; padding: 6px 7px; border: 1px solid transparent;
  border-radius: 9px; background: transparent; color: #4c6557; font-size: 14px; font-weight: 760;
  white-space: nowrap;
}
.group-tab svg, .metric-heading svg {
  width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.app-navigation .group-tab:hover { background: #f2f6ee; }
.app-navigation .group-tab.current { background: #e6f0e3; color: #244b3b; border-color: #dce9d8; }
.app-navigation .tab span { margin: 0; }
.subnav {
  display: flex; align-items: center; gap: 4px 10px; padding: 5px 2px 0; flex-wrap: wrap;
}
.app-navigation .subnav .tab {
  min-height: 38px; padding: 5px 12px; border: 1px solid transparent; border-radius: 999px;
  color: #496357; font-size: 13px; white-space: nowrap;
}
.app-navigation .subnav .tab.current { color: #234e3e; background: #e7efe4; border-color: #dde9dc; }
.app-navigation .subnav .tab:hover { background: #edf2e9; }
.workspace { grid-template-columns: 210px minmax(0, 1fr); gap: 15px; scroll-margin-top: 112px; }
.workspace.single-panel { grid-template-columns: minmax(0, 1fr); }
.board, .sidebar { box-shadow: var(--shadow); border-color: #e1e9de; border-radius: 16px; }
.board { padding: 20px; }
.board h2 { font-size: 23px; }
.sidebar { padding: 15px 12px; }
.sidebar h2 { margin: 0 0 10px 2px; }
.pet { min-height: 57px; border-radius: 11px; padding: 7px; }
.pet .avatar, .pet:nth-child(2) .avatar {
  width: 40px; height: 40px; flex-basis: 40px; font-size: 0; background-image: url('/luvo-hero.png');
  background-size: 310% auto; background-position: 27% 28%; border-radius: 9px;
}
.pet:nth-child(2) .avatar { background-position: 73% 27%; }
.pet[aria-pressed="true"] { border-color: #96b4a1; background: #eff6ee; }
.pet-selected { margin-left: auto; padding: 3px 5px; color: #355f49; background: #e1eddf; font-size: 9px; font-weight: 800; white-space: nowrap; border-radius: 5px; }
.side-note { background: #f4f7ef; margin-top: 11px; }
.scope-label { background: #eaf3e8; color: #365d47; }
.primary { background: #2d5947; border-color: #2d5947; }
.primary:hover { background: #234737; }
.secondary {
  border: 1px solid #c5d6c7; border-radius: 9px; color: #2d5543; background: #f9fbf6;
  min-height: 36px; padding: 7px 11px; font-size: 12px; font-weight: 750; white-space: nowrap;
}
.secondary:hover { background: #edf5ea; }
.today-heading { margin-top: 15px; }
.today-heading .primary { min-height: 37px; }
.insight { background: #f5f9f4; border-color: #dce9de; border-left-color: #66967e; }
.insight.watch { background: #fff8ec; border-color: #efdfc5; border-left-color: #bb8d4d; }
.insight.urgent { background: #fff5ef; border-color: #f0d8ce; border-left-color: #a9503c; }
.quick-log { margin: 9px 0 2px; }
.snapshot-section { margin-top: 18px; }
.snapshot-section > h3 { margin: 0; font-size: 15px; letter-spacing: -.03em; }
.snapshot-section > .muted { margin-top: 3px; }
.snapshot-section > .metric-grid { margin: 9px 0 0; }
.metric.health-metric { background: #f6f8f2; border-color: #e7ece1; }
.metric-heading { display: flex; gap: 5px; align-items: center; color: #42705a; }
.metric-heading h3 { color: var(--ink); }
.metric-heading svg { width: 16px; height: 16px; }
.metric-value { color: #2d5b47; }

.periods { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.periods [aria-pressed="true"] { background: #e1eee0; border-color: #afcab0; }
.report-summary { border: 1px solid var(--line); background: #f4f8ef; border-radius: 12px; padding: 14px; }
.report-summary h3 { margin: 0; font-size: 17px; }
.report-summary h4 { margin: 10px 0 6px; }
.summary-item { font-size: 12px; line-height: 1.65; margin: 5px 0; }
.platform-card { margin: 12px 0; border: 1px solid var(--line); border-radius: 12px; padding: 13px; }
.platform-card h3 { margin: 0 0 8px; font-size: 15px; }
.platform-card .flow-row + .flow-row { margin-top: 5px; }
.platform-row { display: flex; flex-wrap: wrap; align-items: end; gap: 6px 9px; margin: 8px 0; }
.field-label, .village-form label { display: grid; gap: 4px; font-size: 12px; font-weight: 700; min-width: 0; }
.platform-input, .village-form input, .village-form select {
  background: #fbfdf9; border: 1px solid #c9d7cc; color: var(--ink);
  border-radius: 8px; padding: 7px 8px; font-size: 13px; min-width: 0; max-width: 100%; min-height: 36px;
}
.platform-row input[type=number] { width: 85px; }
.platform-row input[type=text] { width: 150px; }
.shop-cover {
  display: grid; grid-template-columns: minmax(215px, .78fr) minmax(0, 1.65fr); align-items: stretch;
  min-height: 174px; overflow: hidden; border-radius: 13px; background: #f8eee0;
}
.shop-cover img { width: 100%; height: 174px; object-fit: cover; object-position: center 66%; grid-column: 2; }
.shop-cover > div { grid-column: 1; grid-row: 1; padding: 19px; align-self: center; }
.shop-cover > div p:last-child { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.shop-summary {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px;
  padding: 7px 9px 7px 12px; border-radius: 12px; background: #eaf3e7;
}
.point-box { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 8px; font-size: 13px; }
.point-box strong { font-size: 21px; color: var(--teal); }
.point-box .muted { margin: 0; font-size: 12px; }
#shop-status:empty, #admin-status:empty { display: none; }
#shop-status { margin: 10px 0; }
#shop-body { margin-top: 10px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(172px, 1fr)); gap: 10px; margin: 11px 0; }
.product-card { display: grid; align-content: start; gap: 5px; background: #fbfcf8; border: 1px solid var(--line); border-radius: 12px; padding: 11px; }
.product-card h3 { font-size: 15px; margin: 0; }
.product-card p, .product-card .section-kicker { margin: 0; }
.product-card .field-label { margin-top: 3px; }
.product-card > .primary { min-height: 38px; }
.product-photo {
  display: block; width: 100%; height: clamp(124px, 17vw, 200px); object-fit: cover;
  object-position: center; background: #eee4d6; border-radius: 9px; margin-bottom: 5px;
}
.product-price { color: var(--teal); }
#shop-checkout { scroll-margin-top: 75px; }
.checkout-amount {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 3px 10px; background: #eaf2e8;
  border-radius: 9px; padding: 10px 12px; color: #335b47; font-size: 13px;
}
.checkout-amount strong { font-size: 20px; }
.checkout-amount .source-meta { grid-column: 1 / -1; margin: 0; }
.checkout-actions { margin-bottom: 0; }
.point-history { margin: 8px 0; font-size: 12px; }
.point-history summary { cursor: pointer; font-weight: 700; }
.order-card { margin: 6px 0; }
.order-card .flow-row { margin-top: 7px; }
.village-form {
  display: flex; align-items: end; flex-wrap: wrap; gap: 7px;
  margin: 12px 0; padding: 9px; background: #f4f7ef; border: 1px solid #e6ede2; border-radius: 11px;
}
.village-form input { width: 115px; }
.village-stage {
  width: 100%; height: clamp(305px, 46vw, 475px); background: #e3e9df;
  border-radius: 14px; border: 1px solid #dce7da; overflow: hidden; display: grid; place-items: center;
}
.village-stage canvas { display: block; max-width: 100%; touch-action: manipulation; }
.village-no-render { padding: 12px; }
.village-controls { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 9px 0; }
.village-controls .muted { margin: 0; }
.admin-grid { grid-template-columns: repeat(auto-fit, minmax(115px, 1fr)); }
.admin-grid .metric-value { font-size: 19px; }
.quick-inputs { gap: 5px; }
.quick-inputs .file-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.quick-inputs input[type=file] { padding: 4px; max-width: 170px; }
.attachment-preview { display: block; margin-top: 10px; max-width: 100%; max-height: 190px; object-fit: contain; border-radius: 9px; }
@media (max-width: 700px) {
  .shell { width: calc(100% - 22px); }
  .topbar { height: 53px; padding-inline: 11px; }
  .brand { font-size: 23px; }
  .brand-mark { width: 30px; height: 30px; border-radius: 10px; }
  .hero-showcase { margin: 11px 0 8px; padding: 5px; grid-template-columns: 1fr; border-radius: 16px; }
  .hero-copy { padding: 14px 14px 12px; }
  .hero-copy .eyebrow { margin-bottom: 6px; font-size: 10px; }
  .hero-copy h1 { font-size: clamp(27px, 7.6vw, 34px); margin-bottom: 6px; }
  .hero-copy > p:not(.eyebrow) { font-size: 12px; }
  .hero-photo { min-height: 132px; border-radius: 12px; }
  .hero-photo img { object-position: center 42%; }
  .hero-actions { margin-top: 9px; gap: 5px; }
  .hero-actions button { min-height: 39px; font-size: 11px; padding: 6px 10px; }
  .photo-caption { bottom: 7px; right: 7px; padding: 5px 7px; }
  .app-navigation { margin-bottom: 8px; }
  .main-nav { gap: 2px; padding: 3px; }
  .app-navigation .group-tab { min-height: 44px; gap: 4px; font-size: 11px; padding: 5px 2px; }
  .group-tab svg { width: 15px; height: 15px; }
  .subnav { gap: 3px 4px; padding-top: 3px; }
  .app-navigation .subnav .tab { min-height: 37px; padding: 5px 6px; font-size: 11px; }
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 8px; scroll-margin-top: 137px; }
  .board, .sidebar { padding: 12px; border-radius: 13px; }
  .board h2 { font-size: 20px; }
  .sidebar h2 { margin-bottom: 7px; }
  .pet { min-height: 49px; padding: 5px; gap: 5px; }
  .pet .avatar, .pet:nth-child(2) .avatar { width: 34px; height: 34px; flex-basis: 34px; }
  .pet-selected { font-size: 8px; padding: 3px 4px; }
  .today-heading { margin-top: 12px; }
  .today-heading .primary, .quick-log .secondary { min-height: 40px; }
  .metric-heading { gap: 3px; }
  .metric-heading svg { width: 13px; height: 13px; }
  .shop-cover { grid-template-columns: 1fr; }
  .shop-cover img { grid-column: 1; grid-row: 2; height: 123px; object-position: center 66%; }
  .shop-cover > div { padding: 11px 12px; }
  .product-grid { grid-template-columns: repeat(auto-fit, minmax(127px, 1fr)); gap: 6px; }
  .product-card { padding: 8px; }
  .product-photo { height: clamp(97px, 29vw, 155px); }
  .platform-input, .village-form input, .village-form select, .product-card > .primary { min-height: 40px; }
  .village-controls { align-items: start; }
  .village-stage { height: 315px; }
  #shop-checkout { scroll-margin-top: 62px; }
}
@media (max-width: 350px) {
  .app-navigation .group-tab { font-size: 10px; }
  .group-tab svg { width: 12px; height: 12px; }
  .pet-subtitle { font-size: 10px; }
  .pet-selected { padding: 2px 3px; }
}
@media print {
  @page { margin: 16mm; }
  body { background: white; color: #182822; }
  .topbar, .hero, .tabs, .sidebar, footer, .print-hide { display: none !important; }
  .shell { width: 100%; margin: 0; }
  .workspace { display: block; }
  #report { box-shadow: none; padding: 0; border: 0; }
  #report .flow-row { break-inside: avoid; }
}
.shop-summary { position: sticky; top: 62px; z-index: 2; }
@media (max-width: 700px) {
  .shop-summary { top: 56px; }
}
