:root {
  --bg: #f6f1e7;
  --bg-deep: #efe7d7;
  --surface: #fffdf8;
  --surface-soft: #fbf7ee;
  --ink: #2c3527;
  --ink-soft: #4a5442;
  --muted: #74806a;
  --line: #e2d9c8;
  --line-strong: #d3c8b3;
  --green: #4f7a3e;
  --green-mid: #6f9a58;
  --green-soft: #e9f1df;
  --terra: #b46a45;
  --terra-soft: #f8e8dd;
  --gold: #c39a35;
  --gold-soft: #f9f0d6;
  --blue: #4a7f96;
  --blue-soft: #e4eff3;
  --danger: #b04a3c;
  --shadow: 0 12px 30px rgba(73, 59, 34, 0.08);
  --shadow-lg: 0 30px 80px rgba(40, 32, 16, 0.28);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Pretendard Variable', Pretendard, 'Malgun Gothic', 'Apple SD Gothic Neo', system-ui, -apple-system,
    'Segoe UI', sans-serif;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--bg);
  background-image: radial-gradient(circle at 8% -10%, rgba(157, 186, 130, 0.25), transparent 42%),
    radial-gradient(circle at 95% 0%, rgba(217, 181, 120, 0.2), transparent 38%),
    radial-gradient(circle at 50% 110%, rgba(147, 180, 165, 0.16), transparent 45%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

button {
  font: inherit;
}

button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

::selection {
  background: rgba(111, 154, 88, 0.28);
}

/* ── 상단 바 ─────────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px clamp(14px, 3vw, 30px);
  background: rgba(246, 241, 231, 0.88);
  border-bottom: 1px solid rgba(210, 200, 180, 0.7);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 20px;
  color: #fdfcf6;
  background: linear-gradient(145deg, #7ba565, #46703a);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 6px 14px rgba(70, 112, 58, 0.28);
}

.brand-text h1 {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-text p {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.stats {
  display: flex;
  align-items: stretch;
  gap: 7px;
  flex: 1;
  justify-content: flex-start;
  overflow-x: auto;
  padding: 2px;
  scrollbar-width: none;
}

.stats::-webkit-scrollbar {
  display: none;
}

.stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  min-width: 96px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.72);
  text-align: left;
  flex: 0 0 auto;
}

.stat.wide {
  min-width: 158px;
}

.stat-btn {
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.stat-btn:hover {
  border-color: var(--green-mid);
  background: var(--surface);
  transform: translateY(-1px);
}

.stat-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.stat-value {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.stat-value small {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
}

.stat-sub {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}

.mini-bar {
  display: block;
  height: 3px;
  margin-top: 3px;
  border-radius: 999px;
  background: #e8e1d2;
  overflow: hidden;
}

.mini-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #8cb46e, #4f7a3e);
  transition: width 0.4s ease;
}

.top-actions {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}

/* ── 레이아웃 ───────────────────────────────────────────── */

.layout {
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: 20px clamp(14px, 3vw, 30px) 30px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 348px;
  gap: 18px;
  align-items: start;
}

.main-col,
.side-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.side-col {
  position: relative;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

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

.card-title {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.card-title h2 {
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.card-title p {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 1px;
}

.card-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.stock-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--gold-soft);
  border: 1px solid #ecdfb8;
  color: #7d6118;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

.stock-chip b {
  font-size: 11.5px;
}

.badge {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  border: 1px solid transparent;
}

.badge-field {
  background: var(--green-soft);
  color: #466b36;
  border-color: #d7e5c8;
}

.badge-livestock {
  background: var(--terra-soft);
  color: #955436;
  border-color: #eed6c7;
}

.badge-layer {
  background: #fbf2d9;
  color: #8a6a1c;
  border-color: #ecdfb8;
}

.badge-pond {
  background: var(--blue-soft);
  color: #3a6b80;
  border-color: #cfe1e8;
}

.badge-microbe {
  background: #eef2dd;
  color: #687a33;
  border-color: #dfe6c4;
}

.badge-invest {
  background: var(--gold-soft);
  color: #8c6c1c;
  border-color: #ecdfb8;
}

.badge-journal {
  background: #f1ece1;
  color: #776b50;
  border-color: #e4dccb;
}

.badge-carbon {
  background: #e2efe8;
  color: #356b58;
  border-color: #cce0d6;
}

/* ── 미터 ──────────────────────────────────────────────── */

.meters {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.meters.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.meters.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.meters.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.meter-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 5px;
}

.meter-top b {
  font-size: 12px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.bar {
  height: 7px;
  border-radius: 999px;
  background: #ebe4d5;
  overflow: hidden;
}

.bar.tall {
  height: 10px;
}

.fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width 0.45s cubic-bezier(0.22, 0.7, 0.3, 1);
}

.fill.soil,
.fill.health {
  background: linear-gradient(90deg, #93b977, #4f7a3e);
}

.fill.chem,
.fill.odor {
  background: linear-gradient(90deg, #dca77e, #b4633f);
}

.fill.pest {
  background: linear-gradient(90deg, #e0c276, #b8862f);
}

.fill.water {
  background: linear-gradient(90deg, #8fc1d1, #4a7f96);
}

.fill.shrimp {
  background: linear-gradient(90deg, #e7b486, #bd7444);
}

.fill.crop {
  background: linear-gradient(90deg, var(--crop-color, #6f9a4e), var(--crop-color, #4f7a3e));
  filter: saturate(1.05);
}

.fill.growth {
  background: linear-gradient(90deg, #e0c276, #b99a4e);
}

.hint {
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
  margin-bottom: 12px;
}

/* ── 버튼 ──────────────────────────────────────────────── */

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 9px 13px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
  text-align: center;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.btn-soft {
  background: var(--green-soft);
  border-color: #d9e5ca;
  color: #3f6031;
}

.btn-soft:hover:not(:disabled) {
  background: #e2edd5;
  border-color: #c8dab5;
}

.btn-warn {
  background: var(--terra-soft);
  border-color: #eed7c8;
  color: #8d4c2e;
}

.btn-warn:hover:not(:disabled) {
  background: #f3ddcf;
}

.btn-primary,
.btn.primary {
  background: linear-gradient(135deg, #669349, #46703a);
  border-color: transparent;
  color: #fdfcf7;
  box-shadow: 0 8px 18px rgba(70, 112, 58, 0.24);
}

.btn-primary:hover:not(:disabled),
.btn.primary:hover:not(:disabled) {
  box-shadow: 0 12px 22px rgba(70, 112, 58, 0.3);
}

.btn-gold {
  background: linear-gradient(135deg, #e3b64f, #c3992f);
  border-color: transparent;
  color: #453206;
  box-shadow: 0 8px 18px rgba(195, 153, 47, 0.25);
}

.btn-ghost,
.btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}

.btn-ghost:hover:not(:disabled),
.btn.ghost:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: var(--surface-soft);
  color: var(--ink-soft);
}

.btn.icon {
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
}

.btn.block {
  width: 100%;
}

.btn.big {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  border-radius: 13px;
}

.btn.sm {
  padding: 7px 10px;
  font-size: 11.5px;
}

.btn em {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(47, 60, 38, 0.08);
  color: inherit;
  white-space: nowrap;
}

.btn.primary em,
.btn-gold em {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.28);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.action-row .btn {
  flex: 1 1 120px;
}

.act {
  justify-content: space-between;
  padding-left: 13px;
  padding-right: 9px;
  gap: 9px;
}

.act span {
  white-space: nowrap;
}

/* ── 재배지 ────────────────────────────────────────────── */

.level-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
  margin-bottom: 10px;
}

.level-info {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.level-info b {
  font-size: 12.5px;
  font-weight: 800;
}

.level-info span {
  font-size: 10.5px;
  color: var(--muted);
}

.plot-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}

.plot-tile {
  appearance: none;
  width: 100%;
  text-align: left;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--crop-color, var(--line-strong));
  border-radius: 10px;
  background: #fbf8f1;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 1px;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.plot-tile:hover {
  background: #f7fbef;
}

.plot-tile.selected {
  border-color: var(--green-mid);
  background: #f1f8e8;
  box-shadow: 0 0 0 2px rgba(111, 154, 88, 0.18);
}

.plot-tile.locked {
  opacity: 0.62;
  border-left-color: #d8cfbe;
  background: #f6f1e7;
}

.plot-label {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--muted);
}

.plot-crop {
  font-size: 12.5px;
  font-weight: 800;
}

.plot-status {
  font-size: 9.5px;
  color: var(--muted);
}

.bar.tiny {
  height: 4px;
  margin-top: 3px;
  background: #e8e1d2;
}

.bar.tiny i {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.plot-locked {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: var(--surface-soft);
  margin-bottom: 10px;
}

.plot-locked b {
  font-size: 13px;
}

.plot-locked p {
  font-size: 11px;
  line-height: 1.55;
  color: var(--muted);
}

.crop-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.crop-option {
  appearance: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 11px 12px;
  text-align: left;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-top: 3px solid var(--crop-color, var(--green-mid));
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.crop-option:hover:not(:disabled) {
  transform: translateY(-2px);
  background: #fff;
  box-shadow: 0 8px 18px rgba(73, 59, 34, 0.08);
}

.crop-option:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.crop-name {
  font-size: 14px;
  font-weight: 800;
}

.crop-meta {
  font-size: 10.5px;
  color: var(--ink-soft);
  font-weight: 600;
}

.crop-desc {
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.4;
}

.crop-current {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-left: 4px solid var(--crop-color, var(--green));
  border-radius: 13px;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.crop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.crop-head strong {
  font-size: 16px;
  font-weight: 800;
}

.crop-stage {
  margin-left: 8px;
  font-size: 11px;
  color: var(--muted);
}

.tag {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
  background: #f1ebde;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
}

.tag-ready {
  color: #6e5310;
  background: var(--gold-soft);
  border-color: #ead8a4;
}

.crop-foot {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.crop-carbon {
  padding: 6px 9px;
  border-radius: 8px;
  background: #f3f4df;
  border: 1px solid #e2e4c2;
  color: #6d6a1e;
  font-size: 10.5px;
  font-weight: 700;
}

/* ── 축사 ──────────────────────────────────────────────── */

.pen-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.pen {
  padding: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 13px;
}

.pen-head {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 9px;
  flex-wrap: wrap;
}

.pen-name {
  font-size: 14px;
  font-weight: 800;
  margin-right: 1px;
}

.pen-count {
  font-size: 10.5px;
  color: var(--muted);
}

.pen-income {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 999px;
  padding: 2px 8px;
}

.pen-meters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pen-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.pen-actions .btn {
  flex: 1;
  padding: 7px 6px;
  font-size: 11px;
  gap: 5px;
}

.pen-actions .btn em {
  font-size: 9.5px;
  padding: 1px 5px;
}

.pen-locked {
  border-style: dashed;
  background: #faf7ef;
  opacity: 0.8;
}

.pen-locked .hint {
  margin: 0;
}

.pen-ready {
  border-color: #e0c778;
  background: #fdf9ea;
  box-shadow: 0 0 0 1px rgba(224, 199, 120, 0.2);
}

.pen-growth {
  margin-top: 8px;
  margin-bottom: 8px;
}

.pen-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 10.5px;
  color: var(--muted);
  margin: 2px 0 8px;
}

.pen .btn-gold.block {
  margin-bottom: 8px;
}

/* ── 양식장 ────────────────────────────────────────────── */

.pond-status {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 10px;
}

/* ── 산란계 농장 ───────────────────────────────────────── */

.layer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-size: 10.5px;
  color: var(--muted);
}

.layer-feed-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 9px;
}

.layer-feed-option {
  appearance: none;
  text-align: left;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.layer-feed-option:hover:not(:disabled) {
  border-color: var(--green-mid);
  background: #f7fbef;
  transform: translateY(-1px);
}

.layer-feed-option:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.layer-feed-option.chosen {
  border-color: var(--green-mid);
  background: #eef6e5;
}

.layer-feed-option.chosen:disabled {
  opacity: 0.8;
}

.layer-feed-name {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 800;
}

.layer-feed-desc {
  font-size: 10px;
  line-height: 1.4;
  color: var(--muted);
}

.layer-feed-cost {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-soft);
}

.layer-last {
  font-size: 10.5px;
  color: var(--muted);
  margin: 2px 0 9px;
}

/* ── 탄소 크레딧 ───────────────────────────────────────── */

.carbon-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.carbon-stat {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.carbon-stat span {
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
}

.carbon-stat b {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.carbon-stat small {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  margin-left: 2px;
}

.carbon-stat.highlight {
  background: #eaf3e3;
  border-color: #d6e6c8;
}

.carbon-stat.highlight b {
  color: #3f6a32;
}

.carbon-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #eadfc2;
  background: #fbf6e7;
  margin-bottom: 8px;
}

.carbon-price-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.carbon-price-label {
  font-size: 12px;
  font-weight: 800;
}

.carbon-price-sub {
  font-size: 10px;
  color: var(--muted);
}

/* ── 성원DX 배양소 ─────────────────────────────────────── */

.tank {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 13px;
  background: linear-gradient(160deg, #f5f8ec, #fbf9f1);
  border: 1px solid #e2e8d2;
  border-radius: 14px;
  margin-bottom: 12px;
}

.tank-visual {
  position: relative;
  width: 58px;
  height: 84px;
  flex: 0 0 auto;
  border-radius: 12px 12px 16px 16px;
  border: 2px solid #cdd9b5;
  background: #f8fbf1;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.tank-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, #a8c98a, #6f9a58);
  transition: height 0.5s cubic-bezier(0.22, 0.7, 0.3, 1);
}

.tank-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 24% 22%, rgba(255, 255, 255, 0.55) 0 2px, transparent 3px),
    radial-gradient(circle at 68% 48%, rgba(255, 255, 255, 0.4) 0 1.5px, transparent 3px),
    radial-gradient(circle at 38% 70%, rgba(255, 255, 255, 0.35) 0 2px, transparent 3px);
}

.tank-char {
  position: relative;
  z-index: 1;
  font-size: 20px;
  font-weight: 800;
  color: #3d5c2f;
  mix-blend-mode: multiply;
  opacity: 0.7;
}

.tank-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.tank-info b {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.tank-info span {
  font-size: 11px;
  color: var(--muted);
}

.tank-info small {
  margin-top: 3px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--green);
}

/* ── 투자 ──────────────────────────────────────────────── */

.upgrade-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upgrade {
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.upgrade.done {
  background: #f3f6ea;
  border-color: #dfe7cf;
}

.upgrade-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.upgrade-name {
  font-size: 12.5px;
  font-weight: 800;
}

.upgrade p {
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.45;
  margin: 2px 0 7px;
}

.dots {
  display: inline-flex;
  gap: 3px;
}

.dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ded5c4;
}

.dots i.on {
  background: var(--green-mid);
}

/* ── 일지 ──────────────────────────────────────────────── */

.journal {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 238px;
  overflow-y: auto;
  padding-right: 3px;
  scrollbar-width: thin;
  scrollbar-color: #d8cfbe transparent;
}

.journal::-webkit-scrollbar {
  width: 5px;
}

.journal::-webkit-scrollbar-thumb {
  background: #d8cfbe;
  border-radius: 999px;
}

.journal-item {
  padding: 8px 10px;
  border: 1px solid #efe8d9;
  background: #faf6ec;
  border-radius: 10px;
}

.journal-item b {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 1px;
}

.journal-item span {
  display: block;
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.journal-item.good {
  background: #f2f7ea;
  border-color: #dfeacd;
}

.journal-item.warn {
  background: #fbf0e6;
  border-color: #f0dcc9;
}

.journal-item.event {
  background: #fbf6e5;
  border-color: #eddfb8;
}

/* ── 턴 박스 ───────────────────────────────────────────── */

.turn-box {
  padding: 13px;
  border-radius: var(--radius);
  border: 1px dashed var(--line-strong);
  background: linear-gradient(160deg, rgba(255, 253, 248, 0.9), rgba(238, 244, 226, 0.85));
  text-align: center;
}

.turn-box p {
  margin-top: 8px;
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--muted);
}

.mobile-turn {
  display: none;
}

/* ── 푸터 ──────────────────────────────────────────────── */

.site-footer {
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: 0 clamp(14px, 3vw, 30px) 34px;
  font-size: 10.5px;
  line-height: 1.6;
  color: #8a8372;
}

.site-footer p + p {
  margin-top: 2px;
}

/* ── 모달 ──────────────────────────────────────────────── */

#modalRoot:empty {
  display: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(40, 34, 22, 0.45);
  backdrop-filter: blur(4px);
  animation: fade-in 0.18s ease;
}

.modal {
  width: 100%;
  max-width: 620px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 26px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow-lg);
  animation: pop-in 0.24s cubic-bezier(0.22, 0.8, 0.3, 1);
  scrollbar-width: thin;
  scrollbar-color: #d8cfbe transparent;
}

.modal::-webkit-scrollbar {
  width: 6px;
}

.modal::-webkit-scrollbar-thumb {
  background: #d8cfbe;
  border-radius: 999px;
}

.modal h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.modal h4 {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 3px;
}

.eyebrow {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 6px;
}

.lead {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 16px;
}

.modal .btn.block {
  margin-top: 8px;
}

.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.modal-actions .btn {
  flex: 1;
}

.intro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin: 4px 0 16px;
}

.intro-grid > div {
  padding: 12px;
  border-radius: 13px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.intro-grid h4 {
  margin: 5px 0 3px;
}

.intro-grid p {
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}

.step {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.disclaimer {
  font-size: 10.5px;
  line-height: 1.55;
  color: #8c8574;
  background: #f7f3e9;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  padding: 9px 11px;
  margin-bottom: 4px;
}

.info-body {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.info-body p + p,
.info-body p + ul,
.info-body ul + p {
  margin-top: 9px;
}

.info-body ul {
  margin: 8px 0;
  padding-left: 18px;
}

.info-body li {
  margin-bottom: 3px;
}

.info-body .disclaimer {
  margin-top: 12px;
  margin-bottom: 0;
}

/* ── 결산 ──────────────────────────────────────────────── */

.report-money {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.report-money > div {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.report-money span {
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
}

.report-money strong {
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.pos {
  color: var(--green);
}

.neg {
  color: var(--terra);
}

.delta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.delta {
  padding: 7px 9px;
  border-radius: 9px;
  background: #faf7ef;
  border: 1px solid #eee7d8;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.delta span {
  font-size: 9.5px;
  color: var(--muted);
  font-weight: 600;
}

.delta b {
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}

.delta.good {
  background: #f1f7e8;
  border-color: #dfeacb;
}

.delta.good b {
  color: #3f6630;
}

.delta.bad {
  background: #fbf0e7;
  border-color: #efdcc9;
}

.delta.bad b {
  color: #9a4f2f;
}

.report-detail {
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  padding: 8px 11px;
}

.report-detail summary {
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  list-style: none;
}

.report-detail summary::-webkit-details-marker {
  display: none;
}

.report-detail summary::before {
  content: '＋';
  margin-right: 5px;
  font-weight: 800;
}


.report-supply {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 8px 10px;
  margin-bottom: 9px;
  border-radius: 9px;
  background: #f4f7ec;
  border: 1px solid #dfe8d2;
  font-size: 10px;
  color: #52633e;
}

.report-supply b {
  color: #3f5a2d;
}

.report-detail[open] summary::before {
  content: '－';
}

.report-detail ul {
  list-style: none;
  margin: 8px 0 2px;
  padding: 0;
}

.report-detail li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11.5px;
  padding: 3px 0;
  border-top: 1px dashed #e6dfd0;
}

.report-detail li:first-child {
  border-top: 0;
}

.report-detail li span {
  color: var(--muted);
}

.report-detail .notes {
  margin-top: 7px;
  padding-top: 5px;
  border-top: 1px solid var(--line);
}

.report-detail .notes li {
  display: block;
  color: var(--green);
  font-size: 10.5px;
}

.event-box {
  padding: 12px 13px;
  border-radius: 12px;
  background: #fbf6e5;
  border: 1px solid #eddfb8;
  margin-bottom: 12px;
}

.event-tag {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #8a6a1c;
  border: 1px solid #e2cf97;
  border-radius: 999px;
  padding: 1px 7px;
  margin-bottom: 4px;
}

.event-box p {
  font-size: 11.5px;
  line-height: 1.6;
  color: #6b5a33;
}

.final-settlement {
  background: #eef5e8;
  border-color: #d7e6c9;
}

.final-settlement .event-tag {
  color: #4f6d3d;
  border-color: #c8dbb6;
}

.final-settlement p {
  color: #4d5e3c;
}

.calm {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  padding: 7px;
  margin-bottom: 8px;
}

.choice-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 4px;
}

.choice {
  appearance: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.choice:hover:not(:disabled) {
  border-color: var(--green-mid);
  background: #f7fbef;
  transform: translateY(-1px);
}

.choice:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.choice-label {
  font-size: 13px;
  font-weight: 800;
}

.choice-hint {
  font-size: 10.5px;
  color: var(--muted);
}

.feed-stock {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  font-size: 10.5px;
  color: var(--muted);
  margin-bottom: 10px;
}

.feed-stock b {
  color: var(--ink);
  font-size: 11.5px;
}

.feed-choice .choice-label {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.feed-tag {
  font-style: normal;
  font-size: 9.5px;
  font-weight: 800;
  color: #7d6118;
  background: var(--gold-soft);
  border: 1px solid #ecdfb8;
  border-radius: 999px;
  padding: 1px 6px;
}

.feed-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 3px;
  font-size: 10.5px;
}

.feed-effects {
  color: var(--green);
  font-weight: 700;
}

.feed-cost {
  color: var(--muted);
}


.badge-factory {
  background: #f1eadb;
  color: #7b5b2e;
  border-color: #e5d6bd;
}

/* ── 확장·공장·구획 토양 ───────────────────────────────── */

.crop-locked-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--crop-color, var(--green));
  border-radius: 13px;
  background: var(--surface-soft);
  margin-bottom: 10px;
}

.crop-locked-note strong {
  font-size: 14px;
  font-weight: 800;
}

.crop-locked-note p {
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.55;
  color: var(--muted);
}

.crop-locked-note .btn {
  flex: 0 0 auto;
}

.crop-reset-note {
  padding: 7px 9px;
  border-radius: 8px;
  background: #fbf6e7;
  border: 1px solid #eadfc2;
  color: #7a642f;
  font-size: 10px;
  line-height: 1.5;
}

.plot-soil-note {
  margin-top: 8px;
  font-size: 10.5px;
  color: var(--muted);
}

.pen-buy {
  margin-top: 8px;
}

.pen-buy-note {
  margin-top: 5px;
  font-size: 9.5px;
  line-height: 1.45;
  color: var(--muted);
}

.layer-buy {
  margin-top: 9px;
}

.factory-planned {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  font-size: 10.5px;
  color: var(--muted);
  margin-bottom: 9px;
}

.factory-planned b {
  color: var(--ink);
  font-size: 11.5px;
}

.factory-note {
  margin-top: 7px;
  font-size: 10px;
  line-height: 1.5;
  color: var(--muted);
}

.factory-max {
  display: inline-block;
  margin-top: 8px;
}

/* ── 최종 결과 ─────────────────────────────────────────── */

.final-hero {
  text-align: center;
  padding: 8px 0 16px;
}

.grade {
  width: 90px;
  height: 90px;
  margin: 6px auto 10px;
  border-radius: 26px;
  display: grid;
  place-items: center;
  font-size: 46px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #fdfcf6;
  background: linear-gradient(145deg, #7ba565, #46703a);
  box-shadow: 0 14px 30px rgba(70, 112, 58, 0.28);
}

.grade-A {
  background: linear-gradient(145deg, #7ba565, #46703a);
}

.grade-S {
  background: linear-gradient(145deg, #e3b64f, #b8862f);
  box-shadow: 0 14px 30px rgba(184, 134, 47, 0.3);
}

.grade-B {
  background: linear-gradient(145deg, #6f9a58, #4f7a3e);
}

.grade-C {
  background: linear-gradient(145deg, #c89a6b, #a56d43);
}

.grade-D {
  background: linear-gradient(145deg, #a08a76, #7a6654);
}

.final-hero p {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 420px;
  margin: 0 auto;
}

.final-hero .final-requirement {
  margin: 8px auto 0;
  padding: 6px 10px;
  border-radius: 8px;
  background: #fbf1de;
  border: 1px solid #eeddbb;
  color: #8a6420;
  font-size: 10.5px;
  line-height: 1.5;
}

.final-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.final-stats > div {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  display: flex;
  flex-direction: column;
}

.final-stats span {
  font-size: 9.5px;
  color: var(--muted);
}

.final-stats b {
  font-size: 14px;
  font-weight: 800;
}

.score-rows {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 14px;
}

.score-rows > div {
  display: flex;
  justify-content: space-between;
  padding: 8px 13px;
  font-size: 12px;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}

.score-rows > div:first-child {
  border-top: 0;
}

.score-rows span {
  color: var(--muted);
}

.score-rows b {
  font-variant-numeric: tabular-nums;
}

.score-rows .total {
  background: var(--green-soft);
}

.score-rows .total span,
.score-rows .total b {
  color: #3d5f2f;
  font-weight: 800;
  font-size: 14px;
}

.final-note {
  padding: 7px 10px;
  border-radius: 9px;
  background: var(--green-soft);
  border: 1px solid #d8e6ca;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 10px;
}

/* ── 토스트 ────────────────────────────────────────────── */

#toasts {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: max-content;
  max-width: min(90vw, 480px);
}

.toast {
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #fdfcf7;
  background: #313d2d;
  box-shadow: 0 10px 24px rgba(40, 34, 22, 0.28);
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition: opacity 0.22s ease, transform 0.22s ease;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast.warn {
  background: #8d4c2e;
}

.toast.gold {
  background: #a37b1e;
}

/* ── 애니메이션 ────────────────────────────────────────── */

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── 반응형 ────────────────────────────────────────────── */

@media (max-width: 1160px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .stat {
    min-width: 88px;
    padding: 6px 10px;
  }

  .stat.wide {
    min-width: 146px;
  }
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .side-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .side-col .card,
  .side-col .turn-box {
    min-width: 0;
  }

  .turn-box {
    grid-column: 1 / -1;
  }

  .mobile-turn {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    padding: 9px 14px calc(9px + env(safe-area-inset-bottom));
    background: rgba(246, 241, 231, 0.94);
    border-top: 1px solid rgba(210, 200, 180, 0.75);
    backdrop-filter: blur(14px);
  }

  .mobile-turn .btn {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    display: flex;
    padding: 12px;
    font-size: 14.5px;
  }

  .mobile-turn em {
    font-style: normal;
    font-size: 10.5px;
    font-weight: 700;
    opacity: 0.8;
  }

  body.modal-open .mobile-turn {
    opacity: 0;
    pointer-events: none;
  }

  #toasts {
    bottom: 92px;
  }

  body {
    padding-bottom: 78px;
  }

  .site-footer {
    padding-bottom: 100px;
  }

  .topbar {
    flex-wrap: wrap;
    gap: 10px;
  }

  .stats {
    order: 3;
    flex: 1 0 100%;
    justify-content: flex-start;
    padding-bottom: 3px;
  }

  .top-actions {
    margin-left: auto;
  }
}

@media (max-width: 860px) {
  .crop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  body {
    font-size: 14px;
  }

  .card-tools {
    gap: 6px;
  }

  .stock-chip {
    font-size: 9.5px;
    padding: 3px 7px;
  }

  .carbon-grid {
    gap: 6px;
  }

  .carbon-stat {
    padding: 8px 9px;
  }

  .carbon-stat b {
    font-size: 17px;
  }

  .carbon-price-row {
    align-items: stretch;
  }

  .carbon-price-row .btn {
    width: 100%;
  }

  .feed-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .brand-text p {
    display: none;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    font-size: 17px;
    border-radius: 13px;
  }

  .card {
    padding: 15px;
    border-radius: 16px;
  }

  .crop-grid {
    grid-template-columns: 1fr;
  }

  .plot-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .layer-feed-grid {
    grid-template-columns: 1fr;
  }

  .crop-option {
    flex-direction: row;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 2px 8px;
  }

  .crop-desc {
    flex: 1 0 100%;
  }

  .meters.three,
  .meters.four {
    grid-template-columns: 1fr 1fr;
  }

  .meters.three .meter:last-child {
    grid-column: 1 / -1;
  }

  .side-col {
    grid-template-columns: 1fr;
  }

  .pen-actions {
    flex-wrap: wrap;
  }

  .pen-actions .btn {
    flex: 1 1 46%;
  }

  .intro-grid {
    grid-template-columns: 1fr;
  }

  .delta-grid {
    grid-template-columns: 1fr 1fr;
  }

  .report-money {
    grid-template-columns: 1fr;
  }

  .final-stats {
    grid-template-columns: 1fr 1fr;
  }

  .modal {
    padding: 20px;
    border-radius: 18px;
  }

  .modal h2 {
    font-size: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── 디자인 콘셉트 이미지 적용 ─────────────────────────── */

.badge-art {
  width: 46px;
  height: 42px;
  padding: 0;
  overflow: hidden;
  background: var(--bg);
}

.badge-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.field-art-strip {
  position: relative;
  height: 88px;
  margin: 10px 0 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--bg);
}

.field-art-strip img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 58%;
  transform: scale(1.02);
}

.field-art-strip::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(38, 42, 28, 0.56));
  pointer-events: none;
}

.field-art-label {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 8px;
  z-index: 1;
  color: #fffdf4;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 8px rgba(20, 30, 15, 0.5);
}

.crop-option-art {
  display: block;
  width: 100%;
  height: 52px;
  margin-bottom: 4px;
  overflow: hidden;
  border: 1px solid rgba(79, 122, 62, 0.16);
  border-radius: 9px;
  background: var(--bg);
}

.crop-option-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
}

.crop-hero {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  object-fit: cover;
  object-position: center 45%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}

.crop-head-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.crop-locked-copy {
  flex: 1;
  min-width: 0;
}

.pen-head {
  align-items: center;
}

.pen-art {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  object-fit: cover;
  object-position: center 52%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}

.pen-id {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.pen-locked .pen-art {
  opacity: 0.55;
  filter: grayscale(0.6);
}

.facility-banner {
  position: relative;
  height: 88px;
  margin-bottom: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--bg);
}

.facility-banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 57%;
}

.facility-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(31, 48, 30, 0.58));
  pointer-events: none;
}

.facility-banner > span {
  position: absolute;
  left: 12px;
  bottom: 8px;
  z-index: 1;
  color: #fffdf4;
  font-size: 10.5px;
  font-weight: 700;
  text-shadow: 0 1px 8px rgba(20, 30, 15, 0.5);
}

.pond-banner {
  height: 84px;
}

.intro-art {
  height: 148px;
  margin: -4px -4px 14px;
  overflow: hidden;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: var(--bg);
}

.intro-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 52%;
}

.modal-wide {
  max-width: 980px;
}

.concept-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  margin: 14px 0 6px;
}

.concept-gallery figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.concept-gallery .concept-wide {
  grid-column: 1 / -1;
}

.concept-gallery img {
  display: block;
  width: 100%;
  height: auto;
}

.concept-gallery figcaption {
  padding: 7px 9px 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.link-btn {
  appearance: none;
  padding: 0;
  border: 0;
  background: none;
  color: var(--green);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

@media (max-width: 760px) {
  .concept-top {
    display: none;
  }
}

@media (max-width: 620px) {
  .badge-art {
    width: 42px;
    height: 39px;
  }

  .field-art-strip {
    height: 72px;
  }

  .crop-option-art {
    height: 44px;
  }

  .crop-hero {
    width: 46px;
    height: 46px;
  }

  .pen-art {
    width: 42px;
    height: 42px;
  }

  .facility-banner,
  .pond-banner {
    height: 72px;
  }

  .intro-art {
    height: 118px;
  }

  .modal-wide {
    max-width: 100%;
  }

  .concept-gallery {
    grid-template-columns: 1fr;
  }

  .concept-gallery .concept-wide {
    grid-column: auto;
  }
}

/* 디자인 콘셉트의 농장 심볼 */
.brand-mark {
  background-color: var(--bg);
  background-image: url('design/concepts/assets/brand-mark.png');
  background-size: cover;
  background-position: center;
  border-radius: 50%;
  color: transparent;
  font-size: 0;
}

/* ── HUD: 효과음·성취 ───────────────────────────────────── */

.ach-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ach-btn b {
  font-weight: 800;
  color: #3f5d33;
}

/* ── 연출 · 수확 ────────────────────────────────────────── */

.harvest-flash {
  animation: fx-harvest-flash 0.9s ease;
}

@keyframes fx-harvest-flash {
  0% {
    box-shadow: 0 0 0 0 rgba(214, 168, 60, 0);
  }
  30% {
    box-shadow: 0 0 0 3px rgba(214, 168, 60, 0.5);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(214, 168, 60, 0);
  }
}

.field-art-strip.soil-reset img {
  animation: fx-soil-pulse 1.1s ease;
}

.field-art-strip.soil-reset::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.55) 45%,
    rgba(255, 255, 255, 0) 72%
  );
  animation: fx-soil-sweep 1.1s ease;
}

@keyframes fx-soil-pulse {
  0%,
  100% {
    filter: none;
  }
  40% {
    filter: brightness(1.16) saturate(1.25);
  }
}

@keyframes fx-soil-sweep {
  0% {
    transform: translateX(-105%);
  }
  100% {
    transform: translateX(105%);
  }
}

/* ── 연출 · 성원DX 관주 ─────────────────────────────────── */

.field-art-strip.microbe-irrigation img {
  animation: fx-microbe-wet 1.2s ease;
}

@keyframes fx-microbe-wet {
  0%,
  100% {
    filter: none;
  }
  45% {
    filter: brightness(1.1) saturate(1.12);
  }
}

.microbe-drop {
  position: absolute;
  top: -12px;
  width: 3px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(126, 192, 232, 0.95), rgba(126, 192, 232, 0.1));
  pointer-events: none;
  z-index: 3;
  animation: fx-drop 1.05s ease-in forwards;
}

@keyframes fx-drop {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  100% {
    transform: translateY(104px);
    opacity: 0;
  }
}

/* ── 연출 · 중앙 카드 ───────────────────────────────────── */

.fx-center {
  position: fixed;
  inset: 0;
  z-index: 190;
  display: grid;
  place-items: center;
  padding: 18px;
  pointer-events: none;
}

.harvest-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  max-width: min(92vw, 340px);
  padding: 14px 22px;
  border-radius: 18px;
  border: 1px solid rgba(60, 50, 32, 0.08);
  border-left: 5px solid var(--crop-color, #6f9a58);
  background: rgba(255, 253, 248, 0.97);
  box-shadow: 0 18px 40px rgba(40, 34, 22, 0.26);
  text-align: center;
  animation: fx-card 1.7s ease forwards;
}

.hr-grade {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 999px;
  color: #fdfcf7;
  background: var(--crop-color, #6f9a58);
}

.hr-crop {
  font-size: 14px;
  font-weight: 800;
}

.hr-price {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #3f5d33;
}

.hr-note {
  font-size: 11px;
  color: var(--muted);
}

@keyframes fx-card {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.94);
  }
  14% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  78% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-8px) scale(0.99);
  }
}

.float-gain {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  max-width: min(92vw, 360px);
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(49, 73, 45, 0.95);
  color: #f4f8ef;
  box-shadow: 0 14px 30px rgba(30, 40, 26, 0.3);
  text-align: center;
  animation: fx-gain 1.5s ease forwards;
}

.float-gain strong {
  font-size: 12.5px;
  font-weight: 800;
}

.float-gain span {
  font-size: 11px;
  opacity: 0.86;
}

@keyframes fx-gain {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  18% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  76% {
    opacity: 1;
    transform: translateY(-6px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-18px) scale(0.99);
  }
}

/* ── 연출 · 턴 전환 ─────────────────────────────────────── */

.turn-transition {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: rgba(246, 241, 231, 0.93);
  backdrop-filter: blur(2px);
  animation: fade-in 0.2s ease;
  transition: opacity 0.36s ease;
}

.turn-transition.out {
  opacity: 0;
}

.tt-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 0 18px;
  text-align: center;
  color: #3f5d33;
}

.tt-label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--muted);
}

.tt-inner strong {
  font-size: clamp(24px, 6vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.tt-sub {
  font-size: 12px;
  color: var(--muted);
}

/* ── 성취 갤러리·최종 결과 ─────────────────────────────── */

.ach-count {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.ach-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ach-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.62);
}

.ach-row.got {
  border-color: rgba(111, 154, 88, 0.55);
  background: rgba(233, 241, 226, 0.72);
}

.ach-mark {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  background: #e8e1d2;
  color: #8a8272;
}

.ach-row.got .ach-mark {
  background: #4f7a3e;
  color: #fdfcf7;
}

.ach-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.ach-copy strong {
  font-size: 13px;
}

.ach-copy span {
  font-size: 11px;
  color: var(--muted);
}

.ach-stamp {
  font-size: 10.5px;
  font-style: normal;
  color: var(--muted);
  white-space: nowrap;
}

.final-ach {
  margin: 14px 0 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.72);
}

.final-ach ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 7px 0;
  padding: 0;
  list-style: none;
}

.final-ach li {
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eaf1e2;
  color: #3f5d33;
}

.final-ach p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 520px) {
  .top-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 5px;
  }

  .top-actions .btn {
    padding: 7px 10px;
    font-size: 11.5px;
  }

  .ach-row {
    grid-template-columns: 20px minmax(0, 1fr);
    row-gap: 3px;
  }

  .ach-stamp {
    grid-column: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .harvest-flash,
  .field-art-strip.soil-reset::before,
  .field-art-strip.soil-reset img,
  .field-art-strip.microbe-irrigation img {
    animation: none !important;
  }

  .harvest-result,
  .float-gain,
  .microbe-drop,
  .turn-transition {
    display: none !important;
  }
}

/* ── 성원DX 순환 3D ─────────────────────────────────────── */
.cycle-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.cycle-head h2 {
  margin: 3px 0 0;
}

.cycle-stage {
  position: relative;
  margin: 12px 0 10px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 95% at 50% 6%, #fcf7eb 0%, #f1e8d5 58%, #e6dac2 100%);
  height: clamp(260px, 46vh, 430px);
  width: min(100%, calc(clamp(260px, 46vh, 430px) * 1.34));
  margin: 12px auto 10px;
}

.cycle-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.cycle-caption {
  position: absolute;
  left: 14px;
  bottom: 14px;
  max-width: min(60%, 560px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
}

.cycle-caption b {
  font-size: 13px;
  letter-spacing: 0.02em;
  color: #2c5b43;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.cycle-caption span {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-soft);
  background: rgba(251, 247, 238, 0.86);
  border: 1px solid rgba(211, 200, 179, 0.7);
  padding: 5px 9px;
  border-radius: 9px;
}

.cycle-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(60, 50, 35, 0.1);
}

.cycle-progress i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--green);
}

.cycle-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.cycle-chip {
  font-size: 11.5px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  background: var(--surface-soft);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.cycle-chip.on {
  background: var(--green);
  border-color: var(--green);
  color: #f7f2e6;
}

.cycle-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.cycle-fallback {
  padding: 30px 20px;
  color: var(--muted);
  font-size: 13px;
}

.cycle-fallback p {
  margin: 0 0 6px;
}

@media (max-width: 760px) {
  .cycle-stage {
    height: clamp(230px, 40vh, 330px);
    width: min(100%, calc(clamp(230px, 40vh, 330px) * 1.2));
  }

  .cycle-caption {
    left: 10px;
    right: 10px;
    bottom: 10px;
    max-width: none;
  }

  .cycle-caption span {
    font-size: 11.5px;
  }

  .cycle-controls .btn {
    flex: 1 1 auto;
  }
}

/* ── 3D 순환: 왜 크레딧인가 ─────────────────────────── */
.cycle-why {
  margin: 12px 0 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.cycle-why-title {
  margin: 0 0 8px;
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
}

.cycle-why ol {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.cycle-why b {
  color: var(--green);
}
