/* 두렁두렁 농원 · 스티커 게임 */
:root {
  --bg: #FFF6DC;
  --surface: #FFFFFF;
  --line: #E9D9B0;
  --text: #3B2A1A;
  --muted: #7A6450;
  --primary: #5DB342;
  --accent: #FF9F1C;
  --ok: #5DB342;
  --warn: #FF9F1C;
  --danger: #E4572E;
  --soil: #9C6B3F;
  --soil-dark: #7A5230;
  --sky: #BDE6F5;
  --coin: #FFC83D;
  --grass: #A8D86E;
  --ink: #3B2A1A;
  --r: 20px;
  --display: "Jua", "Pretendard Variable", system-ui, sans-serif;
  --body: "Pretendard Variable", "Pretendard", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.farm {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-tap-highlight-color: transparent;
}
:where(.farm) button, :where(.farm) a { font: inherit; color: inherit; }
:where(.farm) button { cursor: pointer; touch-action: manipulation; }
:where(.farm) a { text-decoration-thickness: 2px; text-underline-offset: 3px; }
.farm a, .farm button { -webkit-user-select: none; user-select: none; }
.farm :focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.farm-sprites { position: absolute; width: 0; height: 0; overflow: hidden; }
.farm-ico { display: block; width: 100%; height: 100%; }

/* 데스크톱 배경: 하늘과 언덕 */
.farm-backdrop { display: none; }
@media (min-width: 600px) {
  body.farm { background: linear-gradient(#BDE6F5 0, #DDF1F8 55%, #EAF6D8 100%) fixed; }
  .farm-backdrop { display: block; position: fixed; inset: 0; z-index: 0; pointer-events: none; }
  .farm-backdrop__hills { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 46vh; }
}

.farm-app {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 0 16px 156px;
  background: var(--bg);
}
.farm--home .farm-app { padding-bottom: 72px; }
@media (min-width: 600px) {
  .farm-app { border-left: 3px solid var(--ink); border-right: 3px solid var(--ink); box-shadow: 0 0 0 8px rgba(255, 246, 220, .5); }
}

/* 머리 */
.farm-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0 10px; }
.farm-brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-family: var(--display); font-size: 21px; letter-spacing: -.01em; }
.farm-brand__mark { width: 30px; height: 30px; }
.farm-chip-btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 14px;
  border: 2px solid var(--line); border-radius: 999px; background: var(--surface);
  font-size: 14px; font-weight: 600; color: var(--muted);
}
.farm-chip-btn:hover { border-color: var(--ink); color: var(--text); }

/* 스티커 공통: 두꺼운 외곽선과 아래쪽 단색 그림자 */
.farm-tile, .farm-cell, .farm-plot, .farm-shopitem, .farm-btn, .farm-mission, .farm-pill, .farm-stagecard, .farm-goal, .farm-tab.is-active, .farm-invchip {
  border: 3px solid var(--ink);
  box-shadow: 0 4px 0 var(--ink);
}
.farm-tile, .farm-cell, .farm-plot, .farm-shopitem, .farm-btn, .farm-invchip {
  transition: transform .08s ease-out, box-shadow .08s ease-out;
}
.farm-tile:active, .farm-cell:active, .farm-plot:active, .farm-shopitem:active, .farm-btn:active, .farm-invchip:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--ink);
}
.is-pop { animation: farm-pop .34s cubic-bezier(.3, 1.6, .5, 1); }
.is-bump { animation: farm-bump .4s cubic-bezier(.3, 1.6, .5, 1); }
.is-shake { animation: farm-shake .32s linear; }
@keyframes farm-pop {
  0% { transform: translateY(3px) scale(.94); box-shadow: 0 1px 0 var(--ink); }
  55% { transform: translateY(-4px) scale(1.05); box-shadow: 0 7px 0 var(--ink); }
  100% { transform: none; box-shadow: 0 4px 0 var(--ink); }
}
@keyframes farm-bump { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes farm-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* 버튼 */
.farm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px;
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--display); font-size: 20px; line-height: 1;
  text-decoration: none;
}
.farm-btn svg { width: 24px; height: 24px; }
.farm-btn--primary { background: var(--primary); color: var(--ink); }
.farm-btn--accent { background: var(--accent); }
.farm-btn--ghost { background: var(--surface); }
.farm-btn--xl { min-height: 64px; min-width: 240px; font-size: 26px; }
.farm-btn--sm { min-height: 44px; padding: 0 14px; font-size: 17px; box-shadow: 0 3px 0 var(--ink); }
.farm-btn:disabled { opacity: .45; cursor: not-allowed; }

/* 타이틀 */
.farm-title { text-align: center; padding-top: 4px; }
.farm-title__scene svg { display: block; width: 100%; height: auto; border: 3px solid var(--ink); border-radius: 28px; box-shadow: 0 5px 0 var(--ink); }
.farm-title__name { margin: 22px 0 6px; font-family: var(--display); font-weight: 400; font-size: 44px; line-height: 1.1; letter-spacing: -.01em; }
.farm-title__lead { margin: 0 auto; max-width: 360px; color: var(--muted); font-size: 16px; text-wrap: balance; }
.farm-title__actions { margin: 22px 0 8px; }
.farm-title__cta { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.farm-title__cta[hidden] { display: none; }
.farm-save { margin: 0; font-family: var(--display); font-size: 17px; color: var(--muted); }

.farm-goal { margin: 22px 0 0; padding: 16px 14px 14px; border-radius: var(--r); background: var(--surface); text-align: left; }
.farm-goal__head { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-family: var(--display); font-size: 19px; }
.farm-goal__head svg { width: 22px; height: 22px; color: var(--accent); flex: none; }
.farm-goal__head b { font-weight: 400; color: #2F7A1F; }
.farm-loop { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; counter-reset: loop; }
.farm-loop li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.farm-loop__ico { display: grid; place-items: center; width: 56px; height: 56px; border: 3px solid var(--ink); border-radius: 18px; background: var(--bg); }
.farm-loop__ico svg { width: 40px; height: 40px; }
.farm-loop b { font-family: var(--display); font-weight: 400; font-size: 16px; margin-top: 4px; }
.farm-loop small { font-size: 13px; color: var(--muted); line-height: 1.3; }
.farm-stages { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin: 14px 0 0; padding-top: 12px; border-top: 2px dashed var(--line); font-family: var(--display); font-size: 16px; }
.farm-stages span { padding: 2px 10px; border-radius: 999px; background: var(--bg); border: 2px solid var(--line); }
.farm-stages span:last-child { background: #E3F4D6; border-color: var(--primary); }
.farm-stages i { font-style: normal; color: var(--muted); }
.farm-fine { margin: 18px 0 0; font-size: 14px; color: var(--muted); }

/* HUD */
.farm-hud { position: sticky; top: 0; z-index: 5; padding: 6px 0 12px; background: var(--bg); display: grid; gap: 10px; }
.farm-hud__row { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.farm-pill { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 14px 6px 8px; border-radius: 999px; background: var(--surface); box-shadow: 0 3px 0 var(--ink); }
.farm-pill__ico { width: 30px; height: 30px; flex: none; }
.farm-pill__label { font-size: 13px; color: var(--muted); font-weight: 600; }
.farm-pill strong { font-family: var(--display); font-weight: 400; font-size: 24px; line-height: 1; font-variant-numeric: tabular-nums; }
.farm-pill--stage { flex-direction: column; align-items: stretch; justify-content: center; gap: 5px; padding: 6px 16px; border-radius: 18px; }
.farm-pill--stage .farm-pill__label { font-family: var(--display); font-weight: 400; font-size: 16px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.farm-meter { position: relative; display: block; height: 12px; border: 2px solid var(--ink); border-radius: 999px; background: #F3E7C6; overflow: hidden; }
.farm-meter i { position: absolute; inset: 0 auto 0 0; width: 4%; background: var(--primary); border-right: 2px solid var(--ink); transition: width .35s ease-out; }
.farm-meter--sm { height: 10px; }
.farm-meter--lg { height: 16px; }

.farm-mission { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "tag label count" "bar bar reward"; align-items: center; gap: 6px 10px; padding: 10px 14px 12px; border-radius: var(--r); background: #FFFBEE; }
.farm-mission__tag { grid-area: tag; padding: 2px 10px; border-radius: 999px; background: var(--accent); border: 2px solid var(--ink); font-family: var(--display); font-size: 15px; line-height: 1.3; }
.farm-mission__label { grid-area: label; font-family: var(--display); font-size: 19px; line-height: 1.2; }
.farm-mission__count { grid-area: count; font-family: var(--display); font-weight: 400; font-size: 20px; font-variant-numeric: tabular-nums; }
.farm-mission .farm-meter { grid-area: bar; }
.farm-mission__reward { grid-area: reward; display: inline-flex; align-items: center; gap: 3px; font-family: var(--display); font-size: 16px; }
.farm-mission__reward svg { width: 20px; height: 20px; }
.farm-mission__reward[hidden] { display: none; }

/* 화면 머리말 */
.farm-screen__head { margin: 6px 0 14px; }
.farm-screen__head h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1.2; }
.farm-screen__head p { margin: 4px 0 0; font-size: 15px; color: var(--muted); }

/* 밭 */
.farm-field { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 12px; border: 3px solid var(--ink); border-radius: 26px; background: #7FBF4F; box-shadow: 0 5px 0 var(--ink); }
.farm-tile {
  position: relative; display: grid; place-items: center;
  aspect-ratio: 1; min-height: 72px; padding: 0;
  border-radius: var(--r);
  background: var(--soil) repeating-linear-gradient(180deg, transparent 0 13px, rgba(59, 42, 26, .18) 13px 16px);
  overflow: hidden;
}
.farm-tile .farm-ico { width: 74%; height: 74%; margin-top: -14%; pointer-events: none; }
.farm-tile__tag { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); padding: 0 8px; border-radius: 999px; background: rgba(255, 255, 255, .94); border: 2px solid var(--ink); font-family: var(--display); font-size: 14px; line-height: 20px; white-space: nowrap; pointer-events: none; }
.farm-tile__tag--ok { background: var(--accent); }
.farm-tile.is-weed { background-color: #8C6A3E; }
.farm-tile.is-empty { background-color: #A8774A; }
.farm-tile.is-empty::after { content: "+"; position: absolute; top: 18%; font-family: var(--display); font-size: 30px; color: rgba(255, 246, 220, .85); }
.farm-tile.is-ripe { background-color: #8F5F34; box-shadow: 0 4px 0 var(--ink), inset 0 0 0 3px var(--accent); }
.farm-tile.is-ripe .farm-ico { animation: farm-wiggle 1.8s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes farm-wiggle { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-5deg); } 92% { transform: rotate(5deg); } }
.farm-tile__grow { position: absolute; left: 10px; right: 10px; top: 8px; height: 8px; border-radius: 999px; background: rgba(255, 246, 220, .45); border: 2px solid var(--ink); overflow: hidden; }
.farm-tile__grow i { display: block; height: 100%; background: #8FD66B; transition: width .5s linear; }
.farm-tile.is-growing .farm-ico { width: 62%; height: 62%; margin-top: -6%; }

.farm-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 16px 0 0; padding: 0; font-size: 14px; color: var(--muted); }
.farm-legend li { display: inline-flex; align-items: center; gap: 6px; }
.farm-legend__sw { width: 16px; height: 16px; border-radius: 5px; border: 2px solid var(--ink); }
.farm-legend__sw--weed { background: #4E8F2F; }
.farm-legend__sw--empty { background: #A8774A; }
.farm-legend__sw--grow { background: #8FD66B; }
.farm-legend__sw--ripe { background: var(--accent); }
.farm-tip { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.farm-tip a { color: var(--text); font-weight: 700; }

/* 머지 */
.farm-merge-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 12px; }
.farm-merge-bar svg { width: 26px; height: 26px; }
.farm-merge-bar b { font-weight: 400; }
.farm-merge-bar__hint { font-family: var(--display); font-size: 16px; color: var(--muted); }
.farm-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 12px; border: 3px solid var(--ink); border-radius: 26px; background: #F2DFB4 repeating-linear-gradient(45deg, transparent 0 12px, rgba(156, 107, 63, .08) 12px 24px); box-shadow: 0 5px 0 var(--ink); }
.farm-cell { position: relative; display: grid; place-items: center; aspect-ratio: 1; min-height: 72px; padding: 0; border-radius: var(--r); background: var(--surface); }
.farm-cell .farm-ico { width: 70%; height: 70%; pointer-events: none; }
.farm-cell.is-empty { background: rgba(255, 255, 255, .35); border-style: dashed; border-color: rgba(59, 42, 26, .35); box-shadow: none; }
.farm-cell.is-empty.is-target { border-color: var(--ink); background: rgba(255, 255, 255, .6); }
.farm-cell__lv { position: absolute; top: 4px; right: 6px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 999px; border: 2px solid var(--ink); background: var(--bg); font-family: var(--display); font-weight: 400; font-size: 14px; line-height: 18px; }
.farm-cell.lv-2 { background: #EAF7E1; }
.farm-cell.lv-3 { background: #FFF0DA; }
.farm-cell.lv-4 { background: #FFE2B8; }
.farm-cell.lv-5 { background: #FFD3C4; }
.farm-cell.is-selected { transform: translateY(-5px); box-shadow: 0 9px 0 var(--ink); outline: 4px solid var(--accent); outline-offset: 1px; }
.farm-cell.is-match { box-shadow: 0 4px 0 var(--ink), 0 0 0 4px rgba(93, 179, 66, .55); }

.farm-chain { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 18px 0 0; padding: 12px 8px; border: 2px dashed var(--line); border-radius: var(--r); }
.farm-chain li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.farm-chain li + li::before { content: "›"; position: absolute; left: -8px; top: 12px; font-family: var(--display); font-size: 22px; color: var(--muted); }
.farm-chain__ico { position: relative; width: 44px; height: 44px; }
.farm-chain__ico svg { width: 100%; height: 100%; }
.farm-chain__ico b { position: absolute; right: -6px; top: -4px; font-family: var(--display); font-weight: 400; font-size: 13px; background: var(--bg); border: 2px solid var(--ink); border-radius: 999px; min-width: 20px; line-height: 16px; }
.farm-chain__name { font-family: var(--display); font-size: 14px; line-height: 1.2; }

/* 꾸미기 */
.farm-stagecard { padding: 12px 14px; border-radius: var(--r); background: var(--surface); margin-bottom: 14px; }
.farm-stagecard__steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.farm-stagecard__step { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 6px; border: 2px solid var(--line); border-radius: 12px; font-family: var(--display); font-size: 15px; color: var(--muted); text-align: center; line-height: 1.15; }
.farm-stagecard__step b { display: grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid currentColor; font-weight: 400; font-size: 13px; }
.farm-stagecard__step.is-done { color: var(--text); background: #E3F4D6; border-color: var(--primary); }
.farm-stagecard__step.is-now { color: var(--text); background: var(--coin); border-color: var(--ink); }
.farm-stagecard__note { margin: 8px 0 0; font-family: var(--display); font-size: 16px; }

.farm-shop { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.farm-shopitem { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 10px; border-radius: 18px; background: var(--surface); }
.farm-shopitem__ico { width: 46px; height: 46px; }
.farm-shopitem__name { font-family: var(--display); font-size: 16px; line-height: 1.2; }
.farm-shopitem__price { display: inline-flex; align-items: center; gap: 3px; font-family: var(--display); font-size: 16px; }
.farm-shopitem__price svg { width: 18px; height: 18px; }
.farm-shopitem__score { position: absolute; top: -8px; right: -4px; padding: 0 6px; border-radius: 999px; border: 2px solid var(--ink); background: #E3F4D6; font-family: var(--display); font-size: 13px; line-height: 18px; }
.farm-shopitem.is-short { background: #F4EDDC; }
.farm-shopitem.is-short .farm-shopitem__price { color: var(--danger); }
.farm-shopitem.is-picked { background: var(--coin); }

.farm-placebar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 0 0; padding: 8px 8px 8px 14px; border: 3px solid var(--ink); border-radius: 18px; background: var(--coin); font-family: var(--display); font-size: 17px; }
.farm-placebar[hidden], .farm-inventory[hidden] { display: none; }
.farm-inventory { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 0; }
.farm-inventory__label { font-size: 14px; color: var(--muted); font-weight: 600; }
.farm-invchip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px 0 8px; border-radius: 999px; background: var(--surface); font-family: var(--display); font-size: 16px; box-shadow: 0 3px 0 var(--ink); }
.farm-invchip .farm-ico { width: 28px; height: 28px; }

.farm-garden { margin-top: 14px; border: 3px solid var(--ink); border-radius: 26px; overflow: hidden; background: var(--grass); box-shadow: 0 5px 0 var(--ink); }
.farm-garden__sky { display: block; width: 100%; height: 72px; }
.farm-garden__village, .farm-garden__trees { opacity: 0; transition: opacity .4s; }
.farm-garden[data-stage="2"] .farm-garden__trees, .farm-garden[data-stage="3"] .farm-garden__trees, .farm-garden[data-stage="3"] .farm-garden__village { opacity: 1; }
.farm-garden__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; padding: 10px 10px 14px; background: var(--grass) radial-gradient(circle at 20% 30%, rgba(255, 255, 255, .18) 0 3px, transparent 4px) 0 0 / 28px 28px; }
.farm-plot { display: grid; place-items: center; aspect-ratio: 1; padding: 0; border-radius: 16px; border-width: 2px; box-shadow: 0 3px 0 rgba(59, 42, 26, .5); background: #B9E283; }
.farm-plot span { font-family: var(--display); font-size: 22px; color: rgba(59, 42, 26, .25); }
.farm-plot.is-open { background: #FFF6DC; border: 3px dashed var(--ink); box-shadow: none; animation: farm-breathe 1.4s ease-in-out infinite; }
.farm-plot.is-open span { color: var(--ink); }
@keyframes farm-breathe { 50% { background: #FFE9A8; } }
.farm-plot[class*="has-"] { background: #CFEDA4; border-width: 3px; box-shadow: 0 3px 0 var(--ink); }
.farm-plot .farm-ico { width: 82%; height: 82%; }
.farm-plot.has-mill .farm-mill__blades, .farm-modal__ico--spin .farm-mill__blades { transform-origin: 32px 22px; animation: farm-spin 6s linear infinite; }
@keyframes farm-spin { to { transform: rotate(360deg); } }

/* 하단 탭 */
.farm-tabs {
  position: fixed; left: 50%; bottom: 0; z-index: 20; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  padding: 8px 16px calc(10px + env(safe-area-inset-bottom));
  background: var(--bg); border-top: 3px solid var(--ink);
}
@media (min-width: 600px) { .farm-tabs { max-width: 486px; border-left: 3px solid var(--ink); border-right: 3px solid var(--ink); } }
.farm-tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 58px; border: 3px solid transparent; border-radius: 18px; text-decoration: none; font-family: var(--display); font-size: 17px; color: var(--muted); }
.farm-tab svg { width: 26px; height: 26px; }
.farm-tab.is-active { background: var(--primary); color: var(--ink); box-shadow: 0 3px 0 var(--ink); }
.farm-tab__badge { position: absolute; top: 2px; right: calc(50% - 30px); min-width: 22px; height: 22px; padding: 0 5px; border-radius: 999px; border: 2px solid var(--ink); background: var(--accent); font-family: var(--display); font-weight: 400; font-size: 13px; line-height: 18px; color: var(--ink); text-align: center; }
.farm-tab__badge[hidden] { display: none; }

/* 공고 대응표 */
.farm-fab {
  position: fixed; right: max(16px, calc(50% - 240px + 16px)); bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 21;
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px;
  border: 2px solid var(--ink); border-radius: 999px; background: var(--surface); box-shadow: 0 3px 0 var(--ink);
  font-size: 14px; font-weight: 700;
}
.farm--home .farm-fab { bottom: calc(16px + env(safe-area-inset-bottom)); }
@media (min-width: 600px) {
  .farm-fab { right: 24px; bottom: 24px; }
  .farm--home .farm-fab { bottom: 24px; }
}

.farm-sheet, .farm-modal { padding: 0; border: 0; background: transparent; color: var(--text); max-width: none; max-height: none; }
.farm-sheet::backdrop, .farm-modal::backdrop { background: rgba(59, 42, 26, .45); }
.farm-sheet[open] { position: fixed; inset: auto 0 0 0; width: 100%; margin: 0; }
.farm-sheet__body { max-width: 560px; margin: 0 auto; max-height: 86vh; overflow: auto; padding: 18px 18px 22px; background: var(--surface); border: 3px solid var(--ink); border-bottom: 0; border-radius: 24px 24px 0 0; }
@media (min-width: 600px) {
  .farm-sheet[open] { inset: 0; margin: auto; width: min(560px, calc(100% - 32px)); height: fit-content; }
  .farm-sheet__body { border-bottom: 3px solid var(--ink); border-radius: 24px; box-shadow: 0 6px 0 var(--ink); }
}
.farm-sheet__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.farm-sheet__eyebrow { margin: 0; font-size: 13px; color: var(--muted); font-weight: 600; }
.farm-sheet__title { margin: 2px 0 0; font-family: var(--display); font-weight: 400; font-size: 26px; }
.farm-icon-btn { display: grid; place-items: center; width: 44px; height: 44px; border: 2px solid var(--line); border-radius: 50%; background: var(--surface); }
.farm-map { list-style: none; margin: 14px 0 0; padding: 0; }
.farm-map__row { display: grid; gap: 2px; padding: 12px 0; border-top: 2px dashed var(--line); }
.farm-map__need { font-size: 14px; color: var(--muted); }
.farm-map__show { font-family: var(--display); font-size: 18px; text-decoration: none; }
.farm-map__show:hover { text-decoration: underline; }
.farm-sheet__foot { margin: 8px 0 0; padding-top: 12px; border-top: 2px dashed var(--line); font-size: 14px; color: var(--muted); }

.farm-modal[open] { position: fixed; inset: 0; margin: auto; width: min(400px, calc(100% - 32px)); height: fit-content; }
.farm-modal__card { padding: 22px 20px 20px; text-align: center; background: var(--surface); border: 3px solid var(--ink); border-radius: 28px; box-shadow: 0 6px 0 var(--ink); }
.farm-modal__art { display: grid; place-items: center; }
.farm-modal__ico { width: 96px; height: 96px; }
.farm-modal__title { margin: 8px 0 6px; font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1.25; }
.farm-modal__body p { margin: 0; color: var(--muted); }
.farm-modal__body b { color: var(--text); }
.farm-modal__actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.farm-result { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 0; }
.farm-result div { padding: 8px 4px; border: 2px solid var(--line); border-radius: 14px; background: var(--bg); }
.farm-result dt { font-size: 13px; color: var(--muted); }
.farm-result dd { margin: 0; font-family: var(--display); font-size: 20px; }

/* 알림 */
.farm-toast {
  position: fixed; left: 0; right: 0; top: 14px; z-index: 40; margin: 0 auto; width: max-content;
  display: flex; align-items: center; gap: 8px; max-width: calc(100% - 32px);
  padding: 10px 18px; border: 3px solid var(--ink); border-radius: 999px; background: var(--coin); box-shadow: 0 4px 0 var(--ink);
  font-family: var(--display); font-size: 17px; line-height: 1.3;
}
.farm-toast svg { width: 24px; height: 24px; flex: none; }
.farm-toast[hidden] { display: none; }
.farm-toast.is-in { animation: farm-drop .32s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes farm-drop { from { transform: translateY(-24px); opacity: 0; } to { transform: none; opacity: 1; } }

.farm-fx { position: fixed; z-index: 50; display: flex; flex-direction: column; align-items: center; pointer-events: none; transform: translate(-50%, -50%); }
.farm-fx .farm-ico { width: 52px; height: 52px; }
.farm-fx b { margin-top: -4px; padding: 0 8px; border-radius: 999px; background: var(--surface); border: 2px solid var(--ink); font-family: var(--display); font-weight: 400; font-size: 15px; white-space: nowrap; }

/* 안내 한 줄 */
.demo-notice { margin: 28px 0 0; text-align: center; font-size: 12px; color: var(--muted); }

@media (min-width: 600px) {
  .farm-title__name { font-size: 50px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
