:root {
  --green: #88d914;
  --green-bright: #b8ff37;
  --green-dark: #5aaa0a;
  --pink: #f279a6;
  --pink-strong: #ef4e91;
  --ink: #30343b;
  --muted: #69717a;
  --line: #e2edd8;
  --soft: #f6ffe9;
  --danger: #b00020;
  --screen: #fbfff7;
  --face: #101511;
  --poster-font: "Arial Black", Impact, ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { overflow-x: hidden; overflow-y: auto; touch-action: pan-y; }
body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(184,255,55,0.34), transparent 32%),
    radial-gradient(circle at 95% 10%, rgba(239,78,145,0.15), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, var(--screen) 100%);
  color: var(--ink);
  overflow-x: hidden;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  overflow-y: auto;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: 0;
  pointer-events: none;
}

body::before {
  right: -62px;
  top: 74px;
  width: 220px;
  height: 130px;
  background:
    linear-gradient(165deg, transparent 0 18%, rgba(136, 217, 20, 0.78) 19% 30%, transparent 31% 38%, rgba(136, 217, 20, 0.62) 39% 51%, transparent 52% 60%, rgba(136, 217, 20, 0.5) 61% 70%, transparent 71%),
    radial-gradient(circle at 16% 28%, rgba(136, 217, 20, 0.95) 0 4px, transparent 5px),
    radial-gradient(circle at 72% 76%, rgba(136, 217, 20, 0.8) 0 3px, transparent 4px);
  transform: rotate(-13deg);
}

body::after {
  left: -70px;
  bottom: 84px;
  width: 190px;
  height: 120px;
  background:
    linear-gradient(12deg, transparent 0 25%, rgba(239, 78, 145, 0.74) 26% 42%, transparent 43% 54%, rgba(239, 78, 145, 0.58) 55% 65%, transparent 66%),
    radial-gradient(circle at 88% 18%, rgba(239, 78, 145, 0.92) 0 5px, transparent 6px),
    radial-gradient(circle at 54% 82%, rgba(239, 78, 145, 0.7) 0 3px, transparent 4px);
  transform: rotate(-8deg);
}

button, input, select, textarea {
  font: inherit;
}

button, a, label, section, .panel, .item, .cards, .home-simple, .more-section {
  touch-action: pan-y;
}

body { -webkit-user-select: none; user-select: none; }
input, select, textarea { -webkit-user-select: text; user-select: text; }

#app {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 0 auto;
  min-height: 100vh;
  padding: env(safe-area-inset-top) 16px calc(24px + env(safe-area-inset-bottom));
  touch-action: pan-y;
}

.app-switch-to-gelato {
  position: fixed;
  z-index: 20;
  left: max(10px, env(safe-area-inset-left));
  bottom: max(10px, env(safe-area-inset-bottom));
  width: 66px;
  height: 66px;
  border: 3px solid #ffffff;
  border-radius: 20px;
  background: #50352e;
  color: #ffffff;
  box-shadow: 0 7px 20px rgba(48, 52, 59, .28);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1px;
  text-decoration: none;
  font-family: var(--poster-font);
}

.app-switch-to-gelato span { font-size: 18px; line-height: 1; }
.app-switch-to-gelato small { color: #c9e32c; font-size: 10px; line-height: 1; }
.app-switch-to-gelato:active { transform: scale(.96); }

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 18px 0 12px;
}

.topbar #homeBtn { justify-self: start; }
.topbar .brand { justify-self: center; }
.topbar-spacer { width: 1px; justify-self: end; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--poster-font);
  font-weight: 900;
  font-size: 28px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.poster-brand {
  font-size: clamp(42px, 15vw, 76px);
  line-height: 0.9;
  color: var(--green);
  text-shadow: 0 2px 0 rgba(90, 170, 10, 0.18);
}

.brand-subline {
  position: relative;
  display: inline-block;
  margin: 2px 0 12px;
  color: var(--pink-strong);
  font-family: var(--poster-font);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.brand-subline::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -10px;
  bottom: -5px;
  height: 8px;
  z-index: -1;
  border-radius: 999px 40px 999px 50px;
  background: rgba(136, 217, 20, 0.28);
  transform: rotate(-1.4deg);
}

.pip-logo-mark {
  position: relative;
  flex: 0 0 auto;
  width: 48px;
  height: 44px;
  border-radius: 44% 44% 38% 38%;
  background: linear-gradient(145deg, var(--green-bright), var(--green-dark));
  box-shadow: inset -6px -8px 12px rgba(39, 118, 10, 0.18), 0 8px 16px rgba(90, 170, 10, 0.18);
}

.pip-logo-ear {
  position: absolute;
  top: -5px;
  width: 14px;
  height: 16px;
  border-radius: 65% 65% 55% 55%;
  background: linear-gradient(145deg, var(--green-bright), var(--green-dark));
  box-shadow: inset -3px -4px 6px rgba(39, 118, 10, 0.18);
}

.pip-logo-ear::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 3px;
  width: 5px;
  height: 10px;
  border-radius: 50%;
  border-left: 1px solid rgba(255, 255, 255, 0.45);
  transform: rotate(22deg);
}

.pip-logo-ear.left { left: 9px; transform: rotate(-22deg); }
.pip-logo-ear.right { right: 9px; transform: rotate(22deg); }

.pip-logo-face {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 11px;
  height: 23px;
  border-radius: 13px;
  background: var(--face);
  border: 3px solid white;
  box-shadow: inset 0 0 8px rgba(184,255,55,0.12);
}

.pip-logo-eye {
  position: absolute;
  top: 7px;
  width: 5px;
  height: 8px;
  border-radius: 2px;
  background: var(--green-bright);
  box-shadow: 0 0 6px rgba(184,255,55,0.8);
}

.pip-logo-eye.left { left: 9px; }
.pip-logo-eye.right { right: 9px; }

.status {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid rgba(136, 217, 20, 0.3);
  padding: 6px 12px;
  color: var(--green-dark);
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(48, 52, 59, 0.05);
}

.home-simple {
  display: grid;
  gap: 16px;
  padding-top: 6px;
}

.home-dashboard {
  display: grid;
  gap: 12px;
  min-height: calc(100vh - 92px);
  padding: 6px 0 76px;
}

.home-main-grid,
.home-support-grid {
  display: grid;
  gap: 12px;
}

.home-main-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.home-main-grid .action-cameraMove { grid-column: 1 / -1; }
.home-main-grid .action-cameraMove {
  background:
    linear-gradient(160deg, rgba(255,255,255,0.22), transparent 32%),
    linear-gradient(135deg, #4e9ed8, #2774af);
  box-shadow: 0 12px 22px rgba(39, 116, 175, 0.24);
}
.home-support-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.home-main-grid .big-button,
.home-support-grid .big-button {
  grid-template-columns: 1fr;
  justify-items: center;
  align-content: center;
  text-align: center;
  padding: 18px 12px;
}

.home-main-grid .big-button {
  min-height: 132px;
  font-size: clamp(28px, 8vw, 46px);
}

.home-support-grid .big-button {
  min-height: 104px;
  font-size: clamp(18px, 5vw, 28px);
}

.home-main-grid .button-mark { width: 58px; height: 58px; }
.home-support-grid .button-mark { width: 46px; height: 46px; }
.home-main-grid .button-mark svg { width: 36px; height: 36px; }
.home-support-grid .button-mark svg { width: 27px; height: 27px; }

.home-support-grid .action-speak {
  background: linear-gradient(135deg, #81ce13, #559d0a);
}

.home-support-grid .action-view {
  background: linear-gradient(135deg, #4e9ed8, #2774af);
}

.home-support-grid .action-movedToday {
  background: linear-gradient(135deg, var(--pink), var(--pink-strong));
}

.ask-card {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 114px;
  border: 0;
  border-radius: 24px;
  padding: 18px;
  background:
    linear-gradient(150deg, rgba(255,255,255,0.72), rgba(255,255,255,0.22)),
    linear-gradient(135deg, var(--green-bright), var(--green));
  color: var(--ink);
  text-align: left;
  box-shadow: 0 16px 32px rgba(90, 170, 10, 0.22);
}

.ask-card strong {
  display: block;
  font-family: var(--poster-font);
  font-size: clamp(32px, 11vw, 52px);
  line-height: 0.92;
  text-transform: uppercase;
}

.ask-card small {
  display: block;
  margin-top: 6px;
  color: #375018;
  font-size: 15px;
  font-weight: 850;
}

.primary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.primary-actions .action-cameraMove {
  grid-column: 1 / -1;
  min-height: 108px;
  background:
    linear-gradient(160deg, rgba(255,255,255,0.22), transparent 32%),
    linear-gradient(135deg, #4e9ed8, #2774af);
  box-shadow: 0 12px 22px rgba(39, 116, 175, 0.24);
}

.more-section {
  display: grid;
  gap: 10px;
  padding-top: 4px;
}

.more-section h2 {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.more-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.big-button, .primary, .secondary, .danger {
  border: 0;
  border-radius: 20px;
  min-height: 54px;
  padding: 14px 18px;
  font-weight: 900;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.big-button {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 96px;
  text-align: left;
  color: white;
  background:
    linear-gradient(160deg, rgba(255,255,255,0.20), transparent 32%),
    linear-gradient(135deg, var(--green), var(--green-dark));
  font-family: var(--poster-font);
  font-size: clamp(15px, 4vw, 22px);
  line-height: 1;
  letter-spacing: 0.01em;
  overflow: hidden;
  box-shadow: 0 12px 22px rgba(90, 170, 10, 0.24);
  text-transform: uppercase;
}

.primary-actions .big-button {
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 10px;
  min-height: 132px;
  padding: 18px 12px;
  text-align: center;
  font-size: clamp(30px, 12vw, 48px);
}

.primary-actions .button-mark {
  width: 54px;
  height: 54px;
}

.more-grid .big-button {
  grid-template-columns: 38px 1fr;
  min-height: 68px;
  border-radius: 18px;
  padding: 12px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
}

.more-grid .button-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

.big-button::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 10px;
  height: 9px;
  border-radius: 999px 60px 999px 70px;
  background: rgba(255, 255, 255, 0.22);
  transform: rotate(-1.5deg);
}

.big-button:nth-child(even),
.action-remove,
.action-removedReport {
  background:
    linear-gradient(160deg, rgba(255,255,255,0.22), transparent 32%),
    linear-gradient(135deg, var(--pink), var(--pink-strong));
  box-shadow: 0 12px 22px rgba(239, 78, 145, 0.22);
}

.button-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  font-family: var(--poster-font);
  font-size: 0;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.button-mark::before,
.button-mark::after {
  display: none;
}

.button-mark svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: white;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.primary-actions .button-mark svg {
  width: 34px;
  height: 34px;
}

.more-grid .button-mark svg {
  width: 23px;
  height: 23px;
}

.primary {
  background:
    linear-gradient(160deg, rgba(255,255,255,0.22), transparent 34%),
    var(--green);
  color: white;
  box-shadow: 0 8px 18px rgba(90, 170, 10, 0.18);
}
.secondary { background: white; color: var(--ink); border: 1px solid var(--line); }
.danger { background: #fff0f4; color: var(--danger); border: 1px solid #ffc4d5; }

.panel {
  position: relative;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid rgba(226, 237, 216, 0.9);
  border-radius: 22px;
  padding: 16px;
  margin: 12px 0;
  box-shadow: 0 12px 30px rgba(48, 52, 59, 0.06);
}

.screen-title {
  font-family: var(--poster-font);
  font-size: 30px;
  line-height: 1.05;
  margin: 10px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 12px 0;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 750;
  color: var(--ink);
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  min-height: 50px;
  padding: 12px;
  background: white;
  color: var(--ink);
}

.home-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 100px;
  gap: 14px;
  align-items: center;
  margin: 8px 0 16px;
  padding: 8px 0 6px;
}

.home-hero::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: min(270px, 70vw);
  height: 10px;
  border-radius: 999px 40px 999px 40px;
  background: linear-gradient(90deg, var(--green), transparent);
  transform: rotate(-1.5deg);
}

.poster-title {
  margin: 0;
  font-family: var(--poster-font);
  font-size: clamp(32px, 11vw, 58px);
  line-height: 0.9;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.poster-title span {
  display: block;
}

.poster-title span:nth-child(1) { color: var(--ink); }
.poster-title span:nth-child(2) { color: var(--green); }
.poster-title span:nth-child(3) { color: var(--pink-strong); }

.poster-title span::after {
  content: "";
  display: block;
  width: 120px;
  max-width: 54vw;
  height: 8px;
  margin: -3px 0 2px;
  border-radius: 999px 35px 999px 55px;
  background: currentColor;
  opacity: 0.15;
  transform: rotate(-1deg);
}

.assistant-line {
  margin: 6px 0 0;
  color: var(--pink-strong);
  font-size: 20px;
  font-weight: 850;
}

.brush-note {
  display: inline-block;
  position: relative;
  padding: 4px 14px;
  color: white;
  font-family: var(--poster-font);
  font-size: 16px;
  text-transform: uppercase;
}

.brush-note::before {
  content: "";
  position: absolute;
  inset: 1px -4px 0;
  z-index: -1;
  border-radius: 999px 40px 999px 45px;
  background: var(--pink-strong);
  transform: rotate(-2deg);
}

.pip-mascot {
  position: relative;
  width: 86px;
  height: 76px;
  border-radius: 44% 44% 36% 36%;
  background: linear-gradient(145deg, var(--green-bright), var(--green-dark));
  box-shadow:
    inset -10px -14px 20px rgba(39, 118, 10, 0.20),
    inset 8px 8px 16px rgba(255, 255, 255, 0.20),
    0 10px 20px rgba(90, 170, 10, 0.20);
}

.pip-mascot.small {
  width: 58px;
  height: 52px;
}

.pip-mascot.hero {
  width: 92px;
  height: 82px;
}

.pip-mascot.ask {
  width: 78px;
  height: 70px;
  align-self: center;
}

.pip-ear {
  position: absolute;
  top: -13px;
  width: 28px;
  height: 24px;
  border-radius: 65% 65% 55% 55%;
  background: linear-gradient(145deg, var(--green-bright), var(--green-dark));
  box-shadow: inset -5px -5px 10px rgba(39, 118, 10, 0.18);
  z-index: 0;
}

.pip-ear::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 4px;
  width: 9px;
  height: 16px;
  border-radius: 50%;
  border-left: 2px solid rgba(255, 255, 255, 0.42);
  transform: rotate(22deg);
}

.pip-mascot.small .pip-ear {
  width: 20px;
  height: 18px;
  top: -7px;
}

.pip-ear.left {
  left: 14px;
  transform: rotate(-20deg);
}

.pip-ear.right {
  right: 14px;
  transform: rotate(20deg);
}

.pip-side {
  position: absolute;
  top: 32px;
  width: 9px;
  height: 23px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #d7dce0);
  box-shadow: inset 0 0 5px rgba(48, 52, 59, 0.16);
}

.pip-side.left { left: -2px; }
.pip-side.right { right: -2px; }

.pip-screen-rim {
  position: absolute;
  left: 9px;
  right: 9px;
  top: 14px;
  height: 43px;
  border-radius: 23px;
  background: linear-gradient(180deg, #ffffff, #e9ece8);
  box-shadow:
    inset 0 -3px 6px rgba(48, 52, 59, 0.15),
    0 2px 4px rgba(48, 52, 59, 0.12);
}

.pip-face {
  position: absolute;
  inset: 5px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.18), transparent 16%),
    linear-gradient(145deg, #1b201c, var(--face));
  overflow: hidden;
  box-shadow: inset 0 0 10px rgba(184,255,55,0.10);
}

.pip-shine {
  position: absolute;
  left: 12px;
  top: 7px;
  width: 27px;
  height: 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  transform: rotate(-22deg);
  filter: blur(0.2px);
}

.pip-eye {
  position: absolute;
  top: 13px;
  width: 10px;
  height: 15px;
  border-radius: 5px;
  background: var(--green-bright);
  box-shadow: 0 0 8px rgba(184,255,55,0.75);
}

.pip-eye::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: white;
  opacity: 0.9;
}

.pip-eye.left { left: 19px; }
.pip-eye.right { right: 19px; }

.pip-badge {
  position: absolute;
  left: 50%;
  bottom: 6px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--pink-strong);
  background: linear-gradient(180deg, #ffffff, #eef1ed);
  color: var(--green-dark);
  font-size: 20px;
  font-weight: 950;
  line-height: 1;
  transform: translateX(-50%);
  box-shadow: 0 3px 7px rgba(48, 52, 59, 0.18);
}

.pip-mascot.small .pip-eye {
  top: 8px;
  width: 7px;
  height: 11px;
}

.pip-mascot.small .pip-eye.left { left: 12px; }
.pip-mascot.small .pip-eye.right { right: 12px; }

.pip-mascot.small .pip-screen-rim {
  left: 6px;
  right: 6px;
  top: 9px;
  height: 31px;
  border-radius: 17px;
}

.pip-mascot.small .pip-face {
  inset: 4px;
  border-radius: 13px;
}

.pip-mascot.small .pip-side {
  top: 21px;
  width: 7px;
  height: 17px;
}

.pip-mascot.small .pip-badge {
  width: 18px;
  height: 18px;
  bottom: 4px;
  border-width: 2px;
  font-size: 13px;
}

.pip-mascot.small .pip-shine {
  left: 7px;
  top: 5px;
  width: 18px;
  height: 7px;
}

.pip-mouth {
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 18px;
  height: 8px;
  border-bottom: 4px solid var(--green-bright);
  border-radius: 0 0 14px 14px;
  transform: translateX(-50%);
}

.pip-mascot.small .pip-mouth {
  bottom: 6px;
  width: 12px;
  height: 6px;
  border-bottom-width: 3px;
}

textarea { min-height: 110px; resize: vertical; }

.ask-panel textarea {
  min-height: 150px;
  font-size: 20px;
  line-height: 1.35;
}

.ask-panel .actions {
  grid-template-columns: 1fr;
}

.ask-panel .primary,
.ask-panel .secondary {
  min-height: 58px;
}

.roller-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.roller-group {
  display: grid;
  gap: 8px;
}

.roller-label {
  font-weight: 850;
  color: var(--ink);
}

.digit-rollers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.roller {
  display: grid;
  gap: 6px;
  user-select: none;
  touch-action: pan-y;
}

.roller-caption {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.roller-window {
  position: relative;
  height: 200px;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: none;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,255,255,0) 26%, rgba(255,255,255,0) 74%, rgba(255,255,255,0.94)),
    var(--soft);
  box-shadow: inset 0 10px 18px rgba(7, 141, 61, 0.08), inset 0 -10px 18px rgba(7, 141, 61, 0.08);
}

.roller-window.dragging { scroll-snap-type: none; }

.roller-window-shell { position: relative; }

.roller-window::-webkit-scrollbar { display: none; }

.roller-highlight {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 76px;
  height: 46px;
  border: 2px solid var(--green);
  border-radius: 16px;
  background: rgba(19, 201, 91, 0.12);
  pointer-events: none;
  z-index: 1;
}

.inventory-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.inventory-search .secondary { min-width: 104px; }

.roller-track {
  display: grid;
  padding: 76px 0;
}

.roller-item {
  height: 46px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  padding: 0 10px;
  text-align: center;
  scroll-snap-align: center;
  touch-action: none;
}

.roller-item.selected {
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
}

.quantity-digit .roller-item.selected {
  font-size: 30px;
}

.product-roller-group .roller-item {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.camera-workflow {
  display: grid;
  gap: 18px;
}

.camera-side,
.movement-controls {
  display: grid;
  gap: 12px;
  align-content: start;
}

.camera-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 20px;
  background: #182019;
  color: white;
}

.camera-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.camera-frame video {
  position: absolute;
  left: 50%;
  top: 50%;
  max-width: none;
  max-height: none;
  transform-origin: center;
}

.camera-frame [hidden] { display: none; }

.camera-message {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  font-weight: 850;
}

.camera-privacy {
  margin: -4px 2px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.analysis-status {
  margin: -4px 0 0;
  border-radius: 14px;
  padding: 10px 12px;
  background: #f2f4f1;
  color: var(--muted);
  font-weight: 800;
}

.analysis-status.working { color: #255d86; background: #e8f5ff; }
.analysis-status.found { color: #397508; background: #ecffd0; }
.analysis-status.review { color: #9b5a00; background: #fff4d9; }

.camera-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.camera-actions > :first-child:last-child,
.camera-actions > .primary:first-child {
  grid-column: 1 / -1;
}

.direction-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.direction-choice legend {
  grid-column: 1 / -1;
  margin-bottom: 7px;
  font-weight: 850;
}

.direction-button {
  min-height: 64px;
  border: 3px solid transparent;
  border-radius: 18px;
  font-size: 18px;
  font-weight: 950;
  color: var(--ink);
  background: #eef2ed;
}

.direction-button.add.selected {
  border-color: var(--green-dark);
  background: var(--green);
  color: white;
}

.direction-button.remove {
  border-color: #f5a3c3;
  background: #ffe6f0;
  color: #a21851;
}

.direction-button.remove.selected {
  border-color: var(--pink-strong);
  background: var(--pink-strong);
  color: white;
}

.record-movement { min-height: 68px; font-size: 20px; }
button:disabled { opacity: .55; cursor: default; }

.movement-day-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.movement-totals {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.movement-totals strong {
  border-radius: 18px;
  padding: 14px;
  text-align: center;
  font-size: 22px;
}

.in-total { color: #397508; background: #ecffd0; }
.out-total { color: #a21851; background: #fff0f6; }

.movement-cards {
  display: grid;
  gap: 12px;
}

.movement-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  overflow: hidden;
  min-height: 132px;
  border: 2px solid var(--line);
  border-left: 8px solid var(--green);
  border-radius: 22px;
  background: white;
  box-shadow: 0 10px 24px rgba(48, 52, 59, 0.07);
}

.movement-card.outgoing { border-left-color: var(--pink-strong); }
.movement-card-copy { min-width: 0; padding: 14px; }
.movement-card-head { display: flex; justify-content: space-between; gap: 10px; }
.movement-card-head strong { min-width: 0; overflow-wrap: anywhere; font-size: 20px; }
.movement-card-head span { flex: 0 0 auto; color: var(--muted); font-weight: 750; }
.movement-amount { margin-top: 6px; font-size: 34px; line-height: 1; font-weight: 950; }
.movement-amount small { font-size: 15px; }
.movement-card p { margin: 8px 0 0; color: var(--muted); }

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th, .table td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 10px 6px;
  vertical-align: top;
}

.cards {
  display: grid;
  gap: 10px;
}

.item {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px;
  background: white;
  box-shadow: 0 10px 24px rgba(48, 52, 59, 0.05);
}

.item strong { display: block; font-size: 18px; }
.muted { color: var(--muted); }
.error { color: var(--danger); font-weight: 750; }
.pill {
  display: inline-block;
  border-radius: 999px;
  background: var(--soft);
  color: var(--green-dark);
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 800;
}

.inventory-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.inline-edit {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}

.inline-edit .primary {
  min-width: 84px;
}

.confirm-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 10px;
  border: 1px dashed var(--line);
  border-radius: 22px;
  padding: 20px;
  background: white;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.login {
  min-height: 100vh;
  display: grid;
  align-content: center;
}

.confirm-list {
  display: grid;
  gap: 8px;
}

.confirm-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}

.import-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px;
  margin: 8px 0;
}

.print-sheet {
  background: white;
}

.report-table tfoot th {
  border-top: 2px solid var(--ink);
  font-size: 16px;
}

@media (min-width: 700px) {
  #app { padding-left: 24px; padding-right: 24px; }
  .home-simple { max-width: 720px; margin: 0 auto; }
  .ask-card { grid-template-columns: 100px 1fr; min-height: 132px; }
  .pip-mascot.ask { width: 94px; height: 84px; }
  .more-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .row.two { grid-template-columns: 1fr 1fr; }
  .row.three { grid-template-columns: 1fr 1fr 1fr; }
  .roller-layout { grid-template-columns: minmax(260px, 1.25fr) minmax(260px, 1fr); align-items: start; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .ask-panel .actions { grid-template-columns: 1fr 1fr; }
  .camera-workflow { grid-template-columns: minmax(280px, 360px) minmax(320px, 1fr); align-items: start; justify-content: center; }
}

@media (min-width: 700px) and (max-height: 760px) {
  #app { max-width: none; width: 100%; padding: 0 26px 10px; }
  .topbar { padding: 7px 0 5px; }
  .topbar .brand { font-size: 23px; }
  .topbar .pip-logo-mark { width: 40px; height: 36px; }
  .home-simple { gap: 8px; padding-top: 0; }
  .ask-card { min-height: 86px; padding: 10px 16px; grid-template-columns: 72px 1fr; }
  .pip-mascot.ask { width: 66px; height: 60px; }
  .ask-card strong { font-size: 34px; }
  .ask-card small { margin-top: 2px; }
  .primary-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .primary-actions .action-cameraMove { grid-column: auto; }
  .primary-actions .big-button,
  .primary-actions .action-cameraMove { min-height: 94px; padding: 10px; font-size: 27px; }
  .primary-actions .button-mark { width: 42px; height: 42px; }
  .more-section { gap: 6px; padding-top: 0; }
  .more-grid { gap: 7px; }
  .more-grid .big-button { min-height: 58px; padding: 8px 10px; }
}

@media (min-width: 1000px) and (max-height: 760px) {
  .home-dashboard {
    height: calc(100vh - 62px);
    min-height: 0;
    grid-template-rows: minmax(0, 1.15fr) minmax(0, .85fr);
    gap: 14px;
    padding: 8px 0 12px;
  }

  .home-main-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .home-main-grid .action-cameraMove { grid-column: auto; }
  .home-support-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
  .home-main-grid .big-button,
  .home-support-grid .big-button { min-height: 0; height: 100%; border-radius: 26px; }
  .home-main-grid .big-button { font-size: 42px; }
  .home-support-grid .big-button { font-size: 25px; }
  .home-support-grid .big-button:first-child { margin-left: 72px; }
  .cards.inventory-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  .movement-day-toolbar { grid-template-columns: 1fr; }
  .movement-day-toolbar .primary { width: 100%; }
  .inventory-search { grid-template-columns: 1fr; }
}

@media print {
  body::before,
  body::after {
    display: none;
  }

  body {
    background: white;
  }

  #app {
    max-width: none;
    padding: 0;
  }

  .topbar,
  .status,
  .error,
  .no-print {
    display: none !important;
  }

  .print-sheet {
    display: block;
    padding: 0;
  }

  .table th,
  .table td {
    color: #000;
    border-bottom: 1px solid #999;
  }
}
