:root {
  --paper: #f3efe4;
  --ink: #1c2416;
  --muted: #5e6756;
  --green: #1b5c38;
  --green-dark: #123c26;
  --card: #fffdf8;
  --line: #e0d8c8;
  --clay: #8d4e2b;
  --teal: #1d4e63;
  --leaf: #e7f2e4;
  --danger: #8d2f2f;
  --shadow: 0 1px 0 rgba(28, 36, 22, 0.04);
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans CJK KR", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.45;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--green-dark); }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 1.45rem; margin-bottom: 12px; }
h2 { font-size: 1.12rem; margin-bottom: 8px; }
h3 { font-size: 1rem; margin: 16px 0 8px; }
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.top {
  background: var(--green-dark);
  color: #f7f3ea;
  padding: 14px 16px 12px;
}
.brand {
  color: inherit;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.2rem;
}
.brand-sub { margin: 2px 0 0; color: #d5e4d4; font-size: 0.85rem; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.who { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; font-size: 0.85rem; }
.who a { color: #f7f3ea; font-weight: 700; text-decoration: none; padding: 6px 8px; border-radius: 8px; }
.who a:hover { background: rgba(255,255,255,0.1); }
.who small { color: #cfe3cd; font-weight: 600; }
.who form { margin: 0; }
.who button {
  min-height: 32px;
  padding: 4px 10px;
  font-size: 0.82rem;
  background: transparent;
  color: #f7f3ea;
  border-color: rgba(255,255,255,0.35);
}

.card.auth { width: min(420px, 100%); margin: 24px auto 0; }
.auth h1 { margin: 0 0 6px; font-size: 1.3rem; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.check input { width: auto; min-height: 0; }
.users { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.users > li { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: white; }
.users > li.off { opacity: 0.6; }
.users .head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.users .head b { font-size: 1.05rem; }
.users details { margin-top: 8px; }
.users details > summary { font-size: 0.9rem; margin: 0; }
.users .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin-top: 8px; }
.users .row select, .users .row input { width: auto; flex: 1 1 140px; }
.role-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; background: #e7efe6; color: var(--green-dark); }
.role-tag.admin { background: #f3e3d6; color: var(--clay); }
.role-tag.off { background: #eee; color: var(--muted); }
.entry .by { margin-left: auto; color: var(--muted); font-size: 0.82rem; }
[data-when-fert][hidden], [data-when-free][hidden], [data-when-not-fert][hidden] { display: none; }
.fert-pick { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(62px, 1fr)); gap: 6px; }
.fert-pick legend { font-weight: 700; font-size: 0.92rem; margin-bottom: 6px; }
.fert-opt {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 6px;
  border: 1px solid #cfc6b4;
  border-radius: 10px;
  background: white;
  cursor: pointer;
  text-align: center;
}
.fert-opt input { position: absolute; opacity: 0; pointer-events: none; }
.fert-opt b { font-size: 1.05rem; }
.fert-opt span { font-size: 0.82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.fert-opt:has(input:checked), .fert-opt.on { border-color: var(--green); background: #e7f2ea; box-shadow: inset 0 0 0 2px var(--green); }
.fert-opt:has(input:checked) span { color: var(--green-dark); }
.fert-opt:has(input:focus-visible) { outline: 2px solid var(--green); outline-offset: 2px; }
.conc-row { display: flex; gap: 8px; }
.conc-row input { flex: 1; }
.conc-row select { width: auto; flex: none; }
.dose-row { display: flex; align-items: center; gap: 6px; }
.dose-row input { flex: 1; min-width: 0; text-align: right; }
.dose-row select { width: auto; flex: none; }
.dose-row span { font-weight: 700; white-space: nowrap; }
.dose-row b { font-size: 1.2rem; padding: 0 2px; }
.hint { margin: 0; font-size: 0.85rem; }
.fert-table input { min-height: 40px; }
.fert-row { display: grid; grid-template-columns: 1fr 1.2fr 70px auto; gap: 6px; align-items: center; margin-bottom: 8px; }
.fert-row.off input[type=text] { color: var(--muted); }
@media (max-width: 520px) { .fert-row { grid-template-columns: 1fr 1fr; } }
.role-help { margin: 0 0 12px; padding-left: 20px; }
.role-help li { margin: 2px 0; }

.badge {
  display: inline-block;
  min-width: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--clay);
  color: white;
  font-size: 0.72rem;
  line-height: 18px;
}
.req-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  margin: 0 0 10px;
  border-left: 4px solid var(--clay);
  border-radius: 8px;
  background: #fbf1e8;
}
.req-item p { margin: 0; }
.photo-ask { margin: 12px 0; }
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.photo-grid figure { margin: 0; }
.photo-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  background: #eee;
}
.photo-grid figcaption { font-size: 0.78rem; color: var(--muted); margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.photo-grid form { margin: 0; }
button.linkish {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--danger);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: underline;
}

main {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 16px 16px 108px;
}
main.wide { width: 100%; }
main, .farm, .plan-scroll { min-width: 0; max-width: 100%; }

.tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  background: #fffdf8;
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 20;
}
.tabs a {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.86rem;
  padding: 12px 0;
}
.tabs a[aria-current="page"] { color: var(--green-dark); box-shadow: inset 0 -3px 0 var(--green); }

.card, details.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin: 0 0 12px;
  box-shadow: var(--shadow);
}
.stack { display: flex; flex-direction: column; gap: 8px; }
.lede, .muted { color: var(--muted); }

label, .label { font-weight: 700; font-size: 0.92rem; }
input, select, textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #cfc6b4;
  border-radius: 10px;
  background: white;
  color: inherit;
  font: inherit;
}
textarea { min-height: 80px; }
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid #cfc6b4;
  background: white;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn.primary, button.primary { background: var(--green); border-color: var(--green); color: white; }
.btn.danger { color: var(--danger); border-color: #e4c2c2; background: #fff7f7; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

.date-field { position: relative; display: flex; gap: 8px; }
.date-field [data-date-text] { flex: 1; font-variant-numeric: tabular-nums; }
.date-native {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 1px;
  min-height: 0;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.search-row { display: flex; gap: 8px; }
.search-row input { flex: 1; }
.search { margin-bottom: 14px; }

.flash { padding: 10px 12px; border-radius: 10px; margin: 0 0 10px; }
.flash-ok { background: var(--leaf); }
.flash-error { background: #fde8e4; color: var(--danger); }

.no { font-size: 1.55rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 2px; font-variant-numeric: tabular-nums; }
.name { margin-bottom: 6px; }
.where-xl { font-size: 1.35rem; font-weight: 800; color: var(--green-dark); margin: 6px 0; }
.where-none { color: var(--clay); }
.meta { color: var(--muted); font-size: 0.92rem; }
.ship-due { display: inline-block; padding: 4px 10px; border-radius: 10px; background: #e3eef2; color: var(--teal); }
.tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  background: #efe8da;
  font-size: 0.78rem;
  font-weight: 700;
}
.tag-fert { background: #e5f0d8; color: #245214; }
.tag-pest { background: #f8e4c8; color: #6a3b12; }
.tag-etc { background: #e7e4f2; color: #353056; }

/* 농장 화면 */
.farm {
  --lw: 132px;
  --rw: 240px;
  --h-old: 660px;
  --h-new: 280px;
}

.farm-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  background: var(--paper);
}
.farm-search { flex: 1; }
.search-summary { margin: 0 0 6px; font-weight: 700; color: var(--green-dark); }
.search-summary:empty { display: none; }
.hits {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 220px;
  overflow-y: auto;
  margin: 0 0 12px;
}
.hit {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  min-height: 40px;
  justify-content: stretch;
  text-align: left;
  font-weight: 500;
}
.hit b { font-variant-numeric: tabular-nums; }
.hit span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hit em { font-style: normal; color: var(--green-dark); font-weight: 800; }

.tray-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  margin: 0 0 10px;
}
.tray-wrap > summary { margin: 0; }
.tray-wrap[open] > summary { margin-bottom: 8px; }
.tray { border-radius: 10px; padding: 4px; min-height: 52px; }
.tray .chips {
  flex-direction: row;
  flex-wrap: wrap;
  max-height: 210px;
  overflow-y: auto;
}
.tray .chip { width: 184px; border-left-color: #9a917f; }
.tray-empty { display: none; margin: 8px; color: var(--muted); font-size: 0.85rem; }
.tray.empty .tray-empty { display: block; }

.plan-hint { color: var(--muted); font-size: 0.85rem; margin: 0 0 6px; }
.plan-scroll {
  overflow-x: auto;
  padding: 8px 4px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.plan {
  display: grid;
  grid-template-columns: repeat(5, max-content) max-content;
  grid-template-rows: auto 26px auto;
  width: max-content;
  padding: 0 8px;
}
.plan-top { grid-row: 1; align-self: end; }
.plan-bottom { grid-row: 3; align-self: start; }
.plan-rooms {
  grid-column: 6;
  grid-row: 1;
  align-self: stretch;
  width: var(--rw);
  margin-left: 18px;
  display: flex;
  flex-direction: column;
}

.pbox {
  display: flex;
  flex-direction: column;
  border: 1.5px solid #5d574c;
  margin-left: -1.5px;
  background: white;
}
.pbox-bottom { flex-direction: column-reverse; }
.pname {
  margin: 0;
  text-align: center;
  font-weight: 800;
  padding: 4px 0;
  color: var(--green-dark);
  background: #eef4ea;
  border-bottom: 1px solid #c9d8c1;
}
.pname small { color: var(--muted); font-weight: 600; }
.pbox-bottom .pname { border-bottom: 0; border-top: 1px solid #c3d6dd; color: var(--teal); background: #eaf2f5; }
.strips { display: flex; }
.strip {
  flex: 0 0 var(--lw);
  width: var(--lw);
  display: flex;
  flex-direction: column;
  border-left: 1px dashed #d6cfc1;
  height: var(--h-old);
}
.pbox-bottom .strip { height: var(--h-new); }
.strip:first-child { border-left: 0; }
.shead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0;
  padding: 3px 5px 1px;
  font-size: 0.75rem;
}
.sn { font-weight: 800; color: var(--muted); }
.cnt { font-weight: 800; color: var(--green-dark); font-variant-numeric: tabular-nums; }
.strip.filled { background: #f1f8ee; }
.pbox-bottom .strip.filled { background: #edf5f8; }
.strip.filled .sn { color: var(--ink); }

.room {
  border: 1.5px solid #5d574c;
  margin-top: -1.5px;
  background: white;
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.room .shead { padding: 5px 8px; border-bottom: 1px solid #ead9c8; background: #faf1e8; font-size: 0.85rem; }
.room.filled { background: #fdf7f1; }

.chips {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 3px;
  overflow-y: auto;
  min-height: 0;
}
.chip {
  display: flex;
  flex-direction: column;
  padding: 3px 5px;
  background: white;
  border: 1px solid #d9d2c3;
  border-left: 4px solid #2f8a55;
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
  font-size: 0.82rem;
  line-height: 1.25;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}
.pbox-bottom .chip { border-left-color: #2d7f99; }
.room .chip { border-left-color: #c47a45; }
.chip b { font-variant-numeric: tabular-nums; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip span { color: var(--muted); word-break: keep-all; overflow-wrap: anywhere; }
.chip .qty { font-weight: 700; color: var(--green-dark); font-variant-numeric: tabular-nums; }
.qty.cut { color: var(--clay); }
.pick .qty { font-weight: 700; color: var(--green-dark); }
.pick .qty.cut { color: var(--clay); }
.stock-now { font-size: 1.05rem; margin-bottom: 8px; }
.stock-now b { font-size: 1.5rem; color: var(--green-dark); }
.stock-cut { margin-bottom: 10px; }
.unit { align-self: center; font-weight: 700; }
.cut-item { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.cut-item form { flex: none; }
.cut-item button { white-space: nowrap; }
.chip:hover { border-color: #a99f8b; }

.strip.hl, .room.hl { outline: 3px solid var(--clay); outline-offset: -3px; }
.drag-on [data-drop] { transition: background 0.12s; }
.drag-on, .drag-on * { cursor: grabbing !important; }
[data-drop].over { background: #dcefd3 !important; outline: 2px dashed var(--green); outline-offset: -2px; }
.chip.dragging { opacity: 0.3; }
.drop-mark {
  flex: none;
  height: 4px;
  margin: -1px 2px;
  border-radius: 2px;
  background: var(--clay);
  pointer-events: none;
}
.tray .drop-mark { width: 4px; height: auto; margin: 2px -1px; align-self: stretch; }
.chip.ghost {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(20, 30, 15, 0.28);
  background: #fffdf3;
}

.select-toggle { min-height: 46px; white-space: nowrap; }
.select-toggle[aria-pressed="true"] { background: var(--clay); border-color: var(--clay); color: white; }
.search-row-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.search-row-info .btn { min-height: 36px; padding: 4px 12px; margin-bottom: 6px; }
.search-row-info .btn[hidden] { display: none; }
.pick-hint { display: none; color: var(--clay); font-weight: 700; }
.selecting .pick-hint { display: block; }
.selecting [data-hint-normal] { display: none; }
.selecting .chip { cursor: pointer; }
.selecting .shead { cursor: pointer; text-decoration: underline dotted; }
.chip.picked {
  background: #fde9d9;
  border-color: var(--clay);
  box-shadow: inset 0 0 0 1.5px var(--clay);
}
.chip { position: relative; padding-right: 30px; }
.pick-box, .line-box {
  flex: none;
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #9a917f;
  border-radius: 5px;
  background: white;
  cursor: pointer;
}
.pick-box { position: absolute; top: 4px; right: 4px; }
.chip.req::before {
  content: "";
  position: absolute;
  right: 9px;
  bottom: 5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--clay);
  box-shadow: 0 0 0 2px white;
}
.readonly .chip { cursor: pointer; padding-right: 20px; }
.readonly .pick-box, .readonly .line-box, .readonly [data-select-toggle], .readonly [data-all-houses], .readonly [data-pick-found], .readonly .tray-empty { display: none !important; }
.pname .line-box { vertical-align: -4px; }
.selecting .pname { cursor: pointer; }
.all-houses { display: inline-flex; align-items: center; white-space: nowrap; min-height: 46px; }
.farm-search { min-width: 0; }
@media (max-width: 599px) {
  .farm-bar { flex-wrap: wrap; }
  .farm-search { flex: 1 1 100%; }
  .farm-bar .btn { flex: 1; min-height: 42px; justify-content: center; }
}
.all-houses .line-box.none { visibility: visible; opacity: 0.4; }
[data-move-step][hidden], [data-move-lines][hidden] { display: none; }
.move-group { margin: 4px 0 0; font-size: 0.85rem; font-weight: 700; color: var(--muted); }
.move-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.move-grid .btn { min-height: 48px; padding: 6px; font-weight: 800; flex-direction: column; }
.move-grid small { display: block; font-weight: 500; color: var(--muted); font-size: 0.75rem; min-height: 1em; }
.pick-box::after, .line-box::after {
  content: "";
  position: absolute;
  inset: -10px;
}
.line-box { position: relative; margin-right: 6px; vertical-align: -5px; }
.line-box.none { visibility: hidden; }
.pick-box[aria-checked="true"], .line-box[aria-checked="true"], .line-box[aria-checked="mixed"] {
  background: var(--clay);
  border-color: var(--clay);
}
.pick-box[aria-checked="true"]::before, .line-box[aria-checked="true"]::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.line-box[aria-checked="mixed"]::before {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  top: 7px;
  height: 2.5px;
  background: white;
}
.shead { display: flex; align-items: center; }
.shead .sn, .shead b { flex: 1; }
.tray-head { margin: 0 0 4px; padding: 2px 4px; font-size: 0.85rem; font-weight: 700; color: var(--muted); }
.tray.empty .tray-head { display: none; }
.ghost .pick-box { display: none; }
.ghost-count {
  position: absolute;
  top: -10px;
  right: -10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--clay);
  color: white;
  font-style: normal;
  font-weight: 800;
  font-size: 0.8rem;
}
.pick-bar {
  position: fixed;
  left: 50%;
  bottom: calc(52px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  width: max-content;
  max-width: calc(100% - 16px);
  padding: 8px 10px;
  background: #fffdf8;
  border: 2px solid var(--clay);
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}
.pick-bar[hidden] { display: none; }
.pick-bar .btn { min-height: 40px; padding: 6px 12px; }
.pick-count { font-weight: 700; margin-right: 4px; }
.pick-count b { color: var(--clay); font-size: 1.15rem; }
.has-picks .toast { bottom: calc(170px + env(safe-area-inset-bottom)); }
main:has(.has-picks) { padding-bottom: 220px; }
.close-dialog {
  width: min(420px, calc(100% - 24px));
  border: 0;
  border-radius: 16px;
  padding: 18px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}
.close-dialog::backdrop { background: rgba(18, 28, 14, 0.45); }
.close-dialog h2 { margin-bottom: 4px; }
.close-dialog .muted { font-size: 0.88rem; margin-bottom: 4px; }
.where-closed { color: var(--muted); }
.closed-card { border-color: var(--clay); background: #fbf3ec; }
.closed-card p { margin-bottom: 8px; }
.pick.is-closed { background: #f6f2ea; }
.pick.is-closed .place { color: var(--clay); }

.searching .chip.dim { opacity: 0.22; }
.chip.match { background: #fff0bf; border-color: #d6a520; }
.searching [data-drop].has-match { box-shadow: inset 0 0 0 2px #d6a520; }
.pulse { animation: pulse 1.6s ease-out; }
@keyframes pulse {
  0%, 40% { box-shadow: 0 0 0 4px rgba(214, 165, 32, 0.85); }
  100% { box-shadow: 0 0 0 4px rgba(214, 165, 32, 0); }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(64px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  gap: 12px;
  align-items: center;
  max-width: calc(100% - 24px);
  padding: 8px 8px 8px 14px;
  background: var(--green-dark);
  color: white;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  font-size: 0.9rem;
}
.toast[hidden] { display: none; }
.toast.error { background: var(--danger); }
.toast button { min-height: 36px; padding: 4px 12px; background: transparent; color: white; border-color: rgba(255, 255, 255, 0.5); }
.toast button[hidden] { display: none; }

/* 목록 화면 */
.pick {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  margin: 0 0 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
}
.pick .no { font-size: 1.15rem; }
.place { color: var(--green-dark); font-weight: 700; }
.line-item { margin: 0 0 10px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters a {
  text-decoration: none;
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 700;
}
.filters a[aria-current="page"] { background: var(--green-dark); color: white; }
.crop-focus p { margin-bottom: 4px; }
.crop-focus .no { text-decoration: none; }
.bulk-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.bulk-head h2 { margin: 0; }
.bulk-list { display: flex; flex-direction: column; gap: 4px; max-height: 340px; overflow-y: auto; margin-top: 8px; }
.bulk-item { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.bulk-item input { width: 22px; min-height: 22px; margin: 2px 0 0; flex: none; }
.bulk-item small { display: block; }
.period { margin-top: 10px; }
.period-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.period .muted { margin: 0; font-size: 0.85rem; }
.entry header { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.entry-title, .entry-body { margin-bottom: 4px; }
.seg { border: 0; padding: 0; margin: 0; display: flex; gap: 6px; }
.seg legend { font-weight: 700; font-size: 0.92rem; margin-bottom: 6px; width: 100%; }
.seg label {
  flex: 1;
  text-align: center;
  border: 1px solid #cfc6b4;
  border-radius: 10px;
  padding: 10px 4px;
  background: white;
}
.seg input { width: auto; min-height: 0; margin-right: 4px; }
details > summary { font-weight: 800; cursor: pointer; margin-bottom: 8px; }
.back { margin-bottom: 4px; }

:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

/* 출하 주차별 라벨 색 (color_rules.txt). 칩 왼쪽 띠와 범례에 쓴다. */
.lc-white { --lc: #ffffff; }
.lc-orange { --lc: #f08a24; }
.lc-blue { --lc: #3b7dd8; }
.lc-yellow { --lc: #f2c500; }
.lc-red { --lc: #d94040; }
.lc-green { --lc: #3f9e4d; }
.lc-pink { --lc: #ec7fb0; }
.lc-purple { --lc: #8e5bd0; }
.chip[class*="lc-"] { border-left: 5px solid var(--lc); }
.chip.lc-white { box-shadow: -1px 0 0 #8f8879, inset 1px 0 0 #8f8879; }
.chip.lc-white.picked { box-shadow: -1px 0 0 #8f8879, inset 0 0 0 1.5px var(--clay); }
.week-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 8px; }
.week-legend-title { font-size: 0.85rem; font-weight: 700; color: var(--muted); }
@media (max-width: 899px) {
  .week-legend { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
  .week-legend > * { flex: none; }
  .week-legend-title { white-space: nowrap; }
}
.wl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}
.wl small { color: var(--muted); font-weight: 500; }
.wl .sw { width: 16px; height: 16px; border-radius: 4px; background: var(--lc, #ddd); border: 1px solid #8f8879; }
.ship-due .sw { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; background: var(--lc, #ddd); border: 1px solid #8f8879; }

@media (min-width: 900px) {
  body { display: grid; grid-template-rows: auto auto 1fr; min-height: 100vh; }
  .tabs {
    position: static;
    grid-row: 2;
    width: min(980px, calc(100% - 32px));
    margin: 12px auto 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
  }
  main { grid-row: 3; padding-bottom: 32px; }
  .toast { bottom: 24px; }
  .pick-bar { bottom: 20px; }
  .has-picks .toast { bottom: 96px; }
}
