@font-face {
  font-family: DM Sans;
  src: url(./assets/dm-sans.woff) format("woff");
  font-weight: 100 1000;
  font-display: swap;
}
@font-face {
  font-family: Bricolage;
  src: url(./assets/bricolage.woff) format("woff");
  font-weight: 200 800;
  font-display: swap;
}
:root {
  --paper: #f7f7f3;
  --white: #fff;
  --ink: #242623;
  --muted: #61665e;
  --line: #dddfd6;
  --coral: #fc795c;
  --coral-dark: #a33621;
  --mint: #c0e5d7;
  --radius: 19px;
  font-family: "DM Sans", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
button:disabled {
  cursor: default;
  opacity: 0.52;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #247966;
  outline-offset: 3px;
}
button:hover:not(:disabled),
a:hover {
  transition:
    background 0.16s,
    color 0.16s,
    border-color 0.16s,
    transform 0.16s;
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
[hidden] {
  display: none !important;
}
.shell {
  width: min(1216px, calc(100% - 80px));
  margin-inline: auto;
}
.ico {
  display: inline-block;
  width: 1.2em;
  height: 1.2em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
  flex: none;
  pointer-events: none;
}
.skip {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 10;
  background: white;
  padding: 0.7rem 1rem;
}
.skip:focus {
  top: 6px;
}
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.head-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 77px;
  gap: 20px;
}
.brand,
.footer > div {
  display: flex;
  align-items: center;
  gap: 0.63rem;
}
.brand {
  width: fit-content;
  white-space: nowrap;
  font:
    800 1.48rem/1 Bricolage,
    sans-serif;
  letter-spacing: -0.075em;
}
.brand img {
  width: 37px;
  height: 37px;
}
.nav {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #f2f3ef;
  border: 1px solid #e5e7df;
  border-radius: 13px;
}
.nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 0.9rem;
  font-weight: 650;
  color: #62675f;
  white-space: nowrap;
}
.nav a[aria-current="page"] {
  color: #262924;
  background: white;
  border-color: #dfe2d8;
  box-shadow: 0 1px 3px #18200b0d;
}
.nav a:hover {
  color: var(--ink);
  background: #fff9;
}
.local-link {
  justify-self: end;
  background: transparent;
  border: 0;
  color: #5e655c;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 580;
  padding: 8px 0 8px 8px;
}
.local-link .ico {
  width: 17px;
  height: 17px;
}
main:focus {
  outline: none;
}
.page-head {
  display: flex;
  gap: 22px;
  align-items: center;
  justify-content: space-between;
  margin: 43px 0 25px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3,
.quantity-value {
  font-family: Bricolage, "DM Sans", Arial, sans-serif;
}
h1 {
  font-size: clamp(2.9rem, 4.65vw, 4.15rem);
  line-height: 1.01;
  letter-spacing: -0.064em;
  word-spacing: 0.03em;
  font-weight: 760;
}
.accent {
  color: #ee775b;
}
.page-head p,
.section-line p {
  color: var(--muted);
  line-height: 1.5;
}
.page-head p {
  margin-top: 0.67rem;
  font-size: 1rem;
}
.header-btn {
  flex: none;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.54rem;
  font-weight: 680;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 0.7rem 1.03rem;
  min-height: 44px;
  font-size: 0.92rem;
  line-height: 1.22;
  white-space: normal;
  text-align: center;
}
.button.primary {
  background: var(--coral);
  color: #271e19;
  border-color: #ef765c;
}
.button.primary:hover:not(:disabled) {
  background: #ff8a70;
  border-color: #e96b50;
}
.button.secondary {
  background: white;
  border-color: #d4d7ce;
}
.button.secondary:hover:not(:disabled) {
  border-color: #969d91;
  background: #f7f8f4;
}
.button.dark {
  background: #29322d;
  color: white;
}
.button.quiet {
  background: #f3f4ef;
  border-color: transparent;
}
.button.quiet:hover {
  background: #e8ebe3;
}
.button.icon-only {
  padding: 8px;
  width: 42px;
  min-height: 42px;
  flex: none;
}
.button.compact {
  min-height: 36px;
  padding: 0.4rem 0.72rem;
  font-size: 0.87rem;
}
.plain {
  border: 0;
  background: none;
  padding: 4px 0;
  font-weight: 650;
}
.plain:hover,
.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.small {
  font-size: 0.82rem;
}
.text-link {
  display: inline-block;
  width: fit-content;
  font-size: 0.88rem;
  font-weight: 720;
  color: #3e4740;
}
.text-link:after {
  content: "";
  display: block;
  border-bottom: 1px solid #8b978c;
  margin-top: 1px;
}
.text-link:hover:after {
  border-color: transparent;
}
.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.92fr) minmax(270px, 1fr);
  gap: 20px;
  align-items: stretch;
}
.scanner-panel,
.paper,
.sample,
.deck-panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.scanner-panel {
  overflow: hidden;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.stage {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 1;
  min-height: 315px;
  background: radial-gradient(
    ellipse at 48% 50%,
    #384743 0%,
    #263b38 24%,
    #1e3030 48%,
    #192628 77%,
    #1b2526 100%
  );
  color: #e8f1e9;
}
.radar-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.51;
  background-image: radial-gradient(circle, #78948a 1px, transparent 1.3px);
  background-size: 14px 14px;
  mask-image: radial-gradient(ellipse at center, black 22%, #0008 80%);
}
.radar-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid #b2d6c711;
  aspect-ratio: 1;
  pointer-events: none;
  z-index: -1;
}
.ring-a {
  width: 77%;
}
.ring-b {
  width: 99%;
}
.stage:after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: linear-gradient(120deg, #d4dfb509, transparent 43%, #031b1b40);
}
.stage-top {
  position: absolute;
  top: 16px;
  left: 19px;
  right: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  z-index: 4;
  pointer-events: none;
}
.view-label {
  display: flex;
  align-items: center;
  gap: 0.47rem;
  font-size: 0.81rem;
  font-weight: 630;
  letter-spacing: 0.014em;
}
.view-label .ico {
  color: #c4d6cc;
  font-size: 15px;
}
.cam-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #d8e1da;
  background: #1a2626bd;
  border: 1px solid #67767183;
  border-radius: 20px;
  padding: 4px 9px;
  font-size: 0.76rem;
}
.cam-state i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9ba9a2;
}
.stage.live .cam-state i {
  background: #99e9bd;
}
.example-label {
  position: absolute;
  bottom: 14px;
  left: 20px;
  color: #bccbc3;
  font-size: 0.75rem;
  letter-spacing: 0.01em;
}
.view-frame {
  position: relative;
  height: clamp(218px, 18.7vw, 266px);
  aspect-ratio: 0.79;
  display: grid;
  place-items: center;
  z-index: 2;
}
.view-frame > i {
  position: absolute;
  width: 24px;
  height: 24px;
  border: solid #a8e2ce;
  border-width: 0;
  z-index: 3;
}
.view-frame > i:nth-of-type(1) {
  top: 0;
  left: 0;
  border-top-width: 2px;
  border-left-width: 2px;
  border-radius: 7px 0 0 0;
}
.view-frame > i:nth-of-type(2) {
  top: 0;
  right: 0;
  border-top-width: 2px;
  border-right-width: 2px;
  border-radius: 0 7px 0 0;
}
.view-frame > i:nth-of-type(3) {
  bottom: 0;
  left: 0;
  border-bottom-width: 2px;
  border-left-width: 2px;
  border-radius: 0 0 0 7px;
}
.view-frame > i:nth-of-type(4) {
  bottom: 0;
  right: 0;
  border-bottom-width: 2px;
  border-right-width: 2px;
  border-radius: 0 0 7px 0;
}
.card-prop {
  position: absolute;
  inset: 5.5% 11%;
  transform: rotate(-8deg);
  filter: drop-shadow(8px 10px 9px #07121090);
}
.card-prop img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
}
.beam {
  z-index: 2;
  position: absolute;
  top: 55%;
  left: -3%;
  right: -3%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    #a6f5ce 6%,
    #d2ffe0 47%,
    #b2f1d1 94%,
    transparent
  );
  box-shadow: 0 -1px 10px #b4ffd667;
}
.beam:before {
  content: "";
  position: absolute;
  bottom: 1px;
  left: 3%;
  right: 3%;
  height: 15px;
  background: linear-gradient(to top, #89ffc235, transparent);
}
.stage.live {
  min-height: 350px;
  background: #131a19;
}
.stage.live .view-frame {
  height: clamp(225px, 19vw, 285px);
  aspect-ratio: 63/88;
}
.stage.live .card-prop,
.stage.live .radar-ring,
.stage.live .radar-grid,
.stage.live .beam {
  display: none;
}
#video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.scan-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 15px 19px;
  background: white;
}
.camera-actions,
.actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.scan-controls p {
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.35;
  flex: 1;
  min-width: 112px;
  max-width: 164px;
  text-align: right;
}
.scan-controls p.error {
  color: #9b382b;
}
.side {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
}
.paper {
  padding: 19px 22px;
}
.panel-title {
  display: flex;
  gap: 10px;
  align-items: center;
}
.panel-title h2 {
  font-size: 1.3rem;
  letter-spacing: -0.048em;
  font-weight: 750;
  line-height: 1.15;
}
.icon-tile {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  border-radius: 9px;
}
.icon-tile .ico {
  width: 18px;
  height: 18px;
}
.coral {
  color: #94402b;
  background: #ffdfd4;
}
.mint {
  color: #39695b;
  background: #ddeee5;
}
.metrics {
  display: grid;
  grid-template-columns: 1fr 1.15fr 0.74fr;
  margin: 17px 0 13px;
}
.metrics > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.metrics > div + div {
  border-left: 1px solid var(--line);
  padding-left: 20px;
}
.metrics strong {
  font:
    730 1.78rem/1.05 Bricolage,
    sans-serif;
  letter-spacing: -0.055em;
}
.metrics span {
  font-size: 0.79rem;
  color: var(--muted);
  white-space: nowrap;
}
.guide .panel-title {
  margin-bottom: 13px;
}
.tip {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}
.tip + .tip {
  margin-top: 13px;
}
.tip > .ico {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  color: #647267;
}
.tip strong {
  font-size: 0.9rem;
  font-weight: 720;
}
.tip p {
  margin-top: 2px;
  line-height: 1.39;
  color: var(--muted);
  font-size: 0.86rem;
}
.sample-section {
  margin-top: 29px;
}
.section-line {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
  margin-bottom: 14px;
}
.section-line h2,
.content-title {
  font:
    740 1.7rem/1.1 Bricolage,
    sans-serif;
  letter-spacing: -0.058em;
}
.section-line p {
  font-size: 0.91rem;
  margin-top: 5px;
}
.samples {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}
.sample {
  display: block;
  text-align: left;
  padding: 0;
  border: 1px solid #00000012;
  min-height: 125px;
  overflow: hidden;
  position: relative;
  isolation: isolate;
  border-radius: 14px;
}
.sample.fire {
  background: linear-gradient(108deg, #fae7d8, #f4ceb5);
}
.sample.water {
  background: linear-gradient(108deg, #dfedf7, #bfd9e8);
}
.sample.psychic {
  background: linear-gradient(108deg, #f1e6f2, #e4cde4);
}
.sample:after {
  content: "";
  position: absolute;
  right: -4%;
  inset-block: 0;
  width: 49%;
  z-index: -1;
  opacity: 0.35;
  background: radial-gradient(#72695b 0.75px, transparent 1px) 0 0 / 7px 7px;
  mask-image: linear-gradient(90deg, transparent, #0009);
}
.sample-text {
  display: flex;
  position: relative;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 3px;
  padding: 16px 42% 16px 18px;
  min-height: 126px;
}
.sample-type {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.71rem;
  font-weight: 730;
  letter-spacing: 0.025em;
  color: #70402b;
}
.water .sample-type {
  color: #335d70;
}
.psychic .sample-type {
  color: #754876;
}
.sample-type .ico {
  width: 14px;
  height: 14px;
}
.sample strong {
  font:
    760 1.45rem/1.15 Bricolage,
    sans-serif;
  letter-spacing: -0.055em;
}
.sample-caption {
  font-size: 0.8rem;
  line-height: 1.32;
  color: #575c55;
}
.sample img {
  position: absolute;
  z-index: -1;
  width: clamp(77px, 7.5vw, 106px);
  right: 7%;
  top: 29%;
  transform: rotate(12deg);
  border-radius: 6px;
  box-shadow: 3px 5px 9px #10191742;
  transition: transform 0.25s;
}
.sample:hover img {
  transform: translate(-1px, -5px) rotate(8deg);
}
.sample:hover {
  border-color: #9e9d93;
}
.footer {
  border-top: 1px solid var(--line);
  margin-top: 39px;
  padding: 17px 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #666c64;
  font-size: 0.8rem;
}
.footer > div {
  font-weight: 680;
  gap: 7px;
}
.footer img {
  filter: grayscale(1);
  opacity: 0.62;
}
.footer button {
  color: #62695f;
}
.section-panel {
  margin-top: 22px;
}
.panel-head,
.row-between,
.filter-bar,
.deck-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.filter-bar,
.deck-bar {
  margin: 18px 0;
}
.filter-bar > .field-grow {
  flex: 1;
  min-width: min(100%, 230px);
}
.field,
.select,
.searchbox input,
.num-input,
textarea,
input[type="text"] {
  width: 100%;
  border: 1px solid #cdd3c9;
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  font-size: 1rem;
  min-height: 44px;
  padding: 0.59rem 0.74rem;
}
.select {
  appearance: none;
  background: white
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23555f55' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
    right 0.7rem center/16px no-repeat;
  padding-right: 2rem;
}
.filter-bar > .select {
  width: auto;
  max-width: 100%;
}
.searchbox {
  position: relative;
}
.searchbox .ico {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  color: #788075;
}
.searchbox input {
  padding-inline-start: 39px;
}
.field-label {
  display: block;
  margin: 12px 0 5px;
  font-size: 0.86rem;
  font-weight: 700;
}
.helper,
.muted {
  color: var(--muted);
  line-height: 1.5;
}
.helper {
  font-size: 0.87rem;
}
.empty {
  display: grid;
  justify-items: center;
  text-align: center;
  padding: 38px 18px;
  gap: 10px;
  border: 1px dashed #cfd5c9;
  border-radius: 14px;
  background: #fafbf7;
}
.empty > .icon-tile {
  width: 47px;
  height: 47px;
  border-radius: 13px;
}
.empty h3 {
  font-size: 1.27rem;
  letter-spacing: -0.03em;
}
.empty p {
  max-width: 440px;
  font-size: 0.93rem;
  color: var(--muted);
  line-height: 1.5;
}
.empty .button {
  margin-top: 4px;
}
.inventory-list,
.deck-list,
.result-list {
  display: grid;
  gap: 7px;
}
.record {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 8px 11px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  text-align: left;
  width: 100%;
}
.record.choose:hover {
  background: #f7f9f4;
  border-color: #adb9a8;
}
.record .main {
  flex: 1;
  min-width: 0;
}
.record strong {
  display: block;
  font-weight: 710;
  line-height: 1.22;
  overflow-wrap: anywhere;
}
.record .sub {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}
.thumb {
  width: 35px;
  height: 48px;
  border-radius: 4px;
  flex: none;
  position: relative;
  display: grid;
  place-items: center;
  background: #edf0e8;
  color: #758273;
  isolation: isolate;
  overflow: hidden;
}
.thumb img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: contain;
}
.thumb .ico {
  width: 21px;
  height: 21px;
  z-index: -1;
}
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  line-height: 1.35;
  padding: 3px 7px;
  border-radius: 5px;
  background: #eef2e9;
  color: #465044;
}
.badge.yellow {
  background: #faedce;
  color: #72551c;
}
.record .tiny-count {
  white-space: nowrap;
  font-size: 0.86rem;
  font-weight: 700;
}
.deck-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(270px, 1fr);
  gap: 20px;
}
.deck-panel {
  padding: 22px;
}
.deck-panel h3 {
  font-size: 1.22rem;
  letter-spacing: -0.04em;
  margin: 18px 0 8px;
}
.deck-bar .select {
  width: auto;
  min-width: min(100%, 210px);
  max-width: 100%;
}
.deck-meter {
  height: 7px;
  background: #e8ebe2;
  border-radius: 7px;
  overflow: hidden;
  margin: 10px 0 15px;
}
.deck-meter i {
  display: block;
  height: 100%;
  background: var(--coral);
  border-radius: inherit;
}
.deck-checks,
.info-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 13px 0;
  list-style: none;
}
.deck-checks li,
.info-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 0.9rem;
  color: #5d655b;
  line-height: 1.45;
}
.deck-checks .ico {
  margin-top: 2px;
}
.deck-summary {
  align-self: start;
}
.deck-summary .button {
  width: 100%;
  margin-top: 9px;
}
.group-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
  font-size: 0.92rem;
}
.group-line b {
  font-weight: 720;
}
.neutral-note,
.warning-note {
  margin: 12px 0;
  padding: 11px 13px;
  border-radius: 9px;
  line-height: 1.45;
  font-size: 0.87rem;
  background: #f0f4ed;
  color: #4b594a;
}
.warning-note {
  background: #fcf0da;
  color: #755222;
}
.stepper {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  flex: none;
}
.stepper button {
  width: 33px;
  height: 34px;
  border: 1px solid #d8ddd2;
  border-radius: 7px;
  background: #f8faf5;
  display: grid;
  place-items: center;
}
.stepper button:hover {
  background: #e9ede3;
}
.stepper .ico {
  width: 15px;
  height: 15px;
}
.stepper strong {
  min-width: 24px;
  text-align: center;
}
.split-label {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
dialog {
  color: var(--ink);
  background: white;
  padding: 0;
  border: 1px solid #d6dcd2;
  border-radius: 20px;
  max-width: calc(100% - 24px);
  width: 540px;
  max-height: 87vh;
  max-height: 87dvh;
  overflow: auto;
  box-shadow: 0 30px 90px #18242342;
}
dialog::backdrop {
  background: #17221fd0;
  backdrop-filter: blur(3px);
}
.dialog-shell {
  padding: 23px;
}
.dialog-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 11px;
}
.dialog-top h2 {
  font:
    750 1.65rem/1.12 Bricolage,
    sans-serif;
  letter-spacing: -0.055em;
}
.dialog-top .button {
  width: 34px;
  min-height: 34px;
}
.dialog-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 17px;
}
.dialog-actions > .primary {
  flex: 1;
}
.catalog-filters {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 8px;
  margin: 12px 0;
}
.catalog-filters select {
  min-width: 0;
}
.results-label {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 8px 0;
}
.match-badge {
  font-size: 0.74rem;
  font-weight: 650;
  color: #396b57;
}
.result-list {
  max-height: 48vh;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 2px;
}
.result-list .record {
  min-height: 60px;
}
.sample-image {
  height: 81px;
  max-width: 80px;
  object-fit: contain;
  border-radius: 4px;
}
.confirm-card,
.scan-progress {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 15px;
  background: #f2f5ee;
  border-radius: 12px;
  margin: 12px 0;
}
.confirm-card .thumb {
  width: 58px;
  height: 79px;
}
.confirm-card h3 {
  font:
    740 1.45rem/1.1 Bricolage,
    sans-serif;
  letter-spacing: -0.045em;
}
.confirm-card p {
  font-size: 0.88rem;
  color: #596357;
  line-height: 1.45;
  margin-top: 4px;
}
.progress-bar {
  height: 6px;
  border-radius: 5px;
  background: #d8dfd5;
  overflow: hidden;
  margin: 9px 0;
}
.progress-bar i {
  height: 100%;
  display: block;
  background: #5c967a;
  transition: width 0.16s;
}
.scan-progress > div {
  flex: 1;
}
.export-text {
  min-height: 190px;
  resize: vertical;
  margin-top: 10px;
  font:
    0.87rem/1.5 ui-monospace,
    SFMono-Regular,
    monospace;
  white-space: pre;
}
.dialog-group {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.dialog-group h3 {
  font-size: 1.15rem;
  margin-bottom: 5px;
}
.dialog-group .actions {
  margin-top: 10px;
}
.toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: max(18px, env(safe-area-inset-bottom));
  padding: 11px 17px;
  background: #26372e;
  color: white;
  border-radius: 11px;
  font-size: 0.89rem;
  box-shadow: 0 5px 22px #192a2140;
  z-index: 8;
  max-width: calc(100% - 28px);
  text-align: center;
}
.credits a {
  color: #265e4b;
  text-decoration: underline;
}
.credits p + p {
  margin-top: 10px;
}
.scan-mode-tabs {
  display: flex;
  gap: 5px;
  margin: 12px 0;
}
.scan-mode-tabs button[aria-pressed="true"] {
  background: #e1efe4;
  border-color: #91ad92;
}
.note-list {
  margin: 0.7rem 0;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.55;
}
main {
  min-height: 66vh;
}
.storage-warning {
  border: 1px solid #ebbe8d;
  background: #fff2db;
  padding: 10px 15px;
  text-align: center;
  font-size: 0.9rem;
}
.variant-row {
  margin-top: 8px;
}
.nowrap {
  white-space: nowrap;
}
.stack-space {
  margin-top: 12px;
}
.full {
  width: 100%;
}
@media (min-width: 1400px) {
  .shell {
    width: min(1250px, calc(100% - 112px));
  }
  .page-head {
    margin-top: 51px;
  }
  .stage {
    min-height: 343px;
  }
  .card-prop {
    inset: 5.5% 9%;
  }
  .sample {
    min-height: 139px;
  }
  .sample-text {
    min-height: 139px;
  }
}
@media (max-width: 950px) {
  .shell {
    width: calc(100% - 44px);
  }
  .workspace-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(255px, 1fr);
    gap: 14px;
  }
  .head-inner {
    grid-template-columns: auto 1fr auto;
    gap: 10px;
  }
  .nav {
    justify-self: center;
  }
  .nav a {
    padding: 0 9px;
  }
  .local-link span {
    display: none;
  }
  .paper {
    padding: 16px;
  }
  .scan-controls p {
    max-width: 100%;
    width: 100%;
    flex: auto;
    text-align: left;
  }
  .metrics > div + div {
    padding-left: 12px;
  }
  .sample-text {
    padding-left: 13px;
  }
  .sample img {
    right: 4%;
  }
  .sample-caption {
    max-width: 110px;
  }
}
@media (max-width: 700px) {
  .shell {
    width: calc(100% - 32px);
  }
  .head-inner {
    grid-template-columns: 1fr auto;
    padding: 12px 0 9px;
    row-gap: 10px;
  }
  .brand {
    font-size: 1.36rem;
  }
  .brand img {
    width: 33px;
    height: 33px;
  }
  .local-link {
    grid-column: 2;
    grid-row: 1;
    font-size: 0.78rem;
  }
  .local-link span {
    display: inline;
  }
  .nav {
    grid-row: 2;
    grid-column: 1/-1;
    justify-self: stretch;
    display: grid;
    grid-template-columns: 1fr 1.15fr 1.25fr;
    padding: 3px;
  }
  .nav a {
    min-height: 36px;
    gap: 6px;
    font-size: 0.85rem;
    padding: 0 7px;
  }
  .page-head {
    margin: 23px 0 17px;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 11px;
  }
  h1 {
    font-size: 2.86rem;
  }
  .page-head p {
    font-size: 0.93rem;
    margin-top: 5px;
  }
  .header-btn {
    min-height: 37px;
    font-size: 0.84rem;
    padding: 7px 11px;
  }
  .workspace-grid,
  .deck-grid {
    grid-template-columns: 1fr;
  }
  .stage {
    min-height: 302px;
  }
  .view-frame {
    height: 222px;
  }
  .stage.live {
    min-height: 340px;
  }
  .scan-controls {
    padding: 13px 14px;
    justify-content: center;
    gap: 8px;
  }
  .camera-actions {
    width: 100%;
    justify-content: center;
  }
  .camera-actions > .button:not(.icon-only) {
    flex: 1;
  }
  .scan-controls p {
    text-align: center;
    font-size: 0.78rem;
  }
  .side {
    grid-template-rows: none;
    grid-template-columns: 1fr;
  }
  .overview {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 7px 12px;
  }
  .overview .panel-title {
    grid-column: 1;
  }
  .overview .metrics {
    grid-column: 1/-1;
    grid-row: 2;
    margin: 5px 0 0;
  }
  .overview .text-link {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }
  .guide {
    display: none;
  }
  .metrics {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .metrics strong {
    font-size: 1.6rem;
  }
  .sample-section {
    margin-top: 22px;
  }
  .section-line h2,
  .content-title {
    font-size: 1.53rem;
  }
  .samples {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  .sample,
  .sample-text {
    min-height: 81px;
  }
  .sample-text {
    padding: 9px 40% 9px 16px;
    gap: 1px;
  }
  .sample strong {
    font-size: 1.19rem;
  }
  .sample-caption {
    max-width: 100%;
  }
  .sample img {
    top: 13%;
    right: 10%;
    width: 71px;
  }
  .footer {
    margin-top: 25px;
    padding: 15px 0 19px;
  }
  .deck-panel {
    padding: 16px;
  }
  .filter-bar {
    align-items: stretch;
  }
  .dialog-shell {
    padding: 17px;
  }
  .catalog-filters {
    grid-template-columns: 1fr;
  }
  .result-list {
    max-height: 42dvh;
  }
  .deck-bar {
    gap: 8px;
  }
  .deck-bar .select {
    flex: 1;
    min-width: 140px;
  }
  .stepper button {
    width: 34px;
    height: 38px;
  }
  .inventory-list .record {
    flex-wrap: wrap;
  }
  .inventory-list .record .main {
    min-width: 105px;
  }
  .dialog-top h2 {
    font-size: 1.45rem;
  }
  .footer .small {
    min-height: 36px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    transition: none !important;
    animation: none !important;
  }
}
.crop-outer {
  padding: 20px 17px;
  margin: 12px 0;
  background: #eaf0e8;
  border-radius: 13px;
}
.crop-frame {
  position: relative;
  margin: auto;
  max-width: 100%;
  touch-action: none;
}
.crop-frame canvas {
  width: 100%;
  height: auto;
  display: block;
}
.crop-frame svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.crop-frame polygon {
  stroke: #84ffd2;
  stroke-width: 2px;
  fill: #183c2f18;
  vector-effect: non-scaling-stroke;
}
.crop-handle {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  touch-action: none;
  cursor: grab;
  padding: 0;
}
.crop-handle:after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #b7f6ce;
  border: 2px solid #1f463e;
  box-shadow: 0 0 0 1px white;
}
.crop-handle:active:not(:disabled) {
  transform: translate(-50%, -50%);
  cursor: grabbing;
}
