/* module.css — SMACSS 의 Module(재사용 조각) + State(is-접두사). 평이한 클래스, @layer·@scope·@container·중첩 없음. */

/* 브랜드 */
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-family: var(--head); font-size: 24px; color: var(--soil-2); }
.brand-ico { width: 28px; height: 28px; }
.l-footer .brand { color: #fff4d4; }
.eyebrow { font-weight: 700; color: var(--yolk); letter-spacing: .02em; margin-bottom: .5em; }
.lead { font-size: 18px; max-width: 46ch; }
.hero h1 { color: #fff8e6; text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.small { font-size: 14px; color: var(--ink-2); }
.meta { color: var(--ink-2); font-size: 14px; margin-bottom: .4em; }
.sub { color: var(--ink-2); font-size: 14px; margin: 0; }
.ico-s { width: 18px; height: 18px; vertical-align: -3px; }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 2px solid var(--soil-2); border-radius: 999px; padding: 9px 20px; font-weight: 700; text-decoration: none; line-height: 1.3; background: var(--card); color: var(--soil-2); box-shadow: 2px 3px 0 var(--soil-2); transition: transform .08s; }
.btn:hover { color: var(--soil-2); transform: translateY(-1px); }
.btn:active { transform: translate(2px, 3px); box-shadow: none; }
.btn-main { background: var(--yolk); }
.btn-lg { padding: 12px 26px; font-size: 17px; }
.btn-sub { background: var(--card); }
.btn-ghost { background: transparent; color: #fff8e6; border-color: #fff8e6; box-shadow: none; }
.btn-ghost:hover { color: #fff8e6; background: rgba(255,255,255,.12); }
.btn-ghost-d { background: transparent; box-shadow: none; }
.btn-warn { background: #f6d3c8; border-color: #8c2f1a; color: #8c2f1a; box-shadow: 2px 3px 0 #8c2f1a; }
.btn-water { background: #cfe8f6; border-color: #1f5f86; color: #14405c; box-shadow: 2px 3px 0 #1f5f86; }
.btn-buy { background: var(--leaf-l); font-size: 14px; padding: 7px 14px; flex-shrink: 0; }
.btn-buy b { background: rgba(255,255,255,.55); border-radius: 999px; padding: 0 8px; font-size: 13px; }
.btn.is-off { opacity: .5; background: #e6dcc0; box-shadow: none; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.2em 0; }
.chips-row { list-style: none; padding: 0; margin: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.chips-row a { display: inline-block; padding: 4px 14px; border: 1px solid rgba(255,248,230,.6); border-radius: 999px; color: #fff8e6; text-decoration: none; font-size: 14px; }
.chips-row a:hover { background: rgba(255,255,255,.14); color: #fff; }

/* 카드·태그·빵부스러기 */
.card { background: var(--card); border: 2px solid var(--soil); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px; }
.card h2, .card h3 { margin-bottom: .45em; }
.card p:last-child { margin-bottom: 0; }
.tag { display: inline-block; background: var(--leaf-l); color: var(--leaf-d); border-radius: 999px; padding: 0 10px; font-size: 13px; font-weight: 700; }
.crumbs ol { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--ink-2); }
.crumbs li + li::before { content: "›"; margin-right: 6px; }
.crumbs a { color: var(--ink-2); }

.step { position: relative; padding-top: 34px; }
.step-no { position: absolute; top: -16px; left: 18px; width: 36px; height: 36px; border-radius: 50%; background: var(--yolk); border: 2px solid var(--soil-2); font-family: var(--head); font-size: 20px; display: grid; place-items: center; }

/* 작물 */
.crop-ico { width: 62%; height: 62%; display: block; transform-origin: 50% 90%; transition: transform .25s linear; }
.crop-big { width: 72px; height: 72px; display: block; margin-bottom: 6px; }
.crop-mini { width: 36px; height: 36px; flex-shrink: 0; }
.crop-card { display: block; text-decoration: none; color: var(--ink); height: 100%; transition: transform .1s; }
.crop-card:hover { transform: translateY(-2px); color: var(--ink); }
.crop-card h3 { margin-bottom: .1em; }
.crop-hero { display: flex; gap: 18px; align-items: center; }
.crop-hero .crop-big { width: 96px; height: 96px; flex-shrink: 0; }
.crop-hero h1 { margin-bottom: .1em; }
.crop-row { display: flex; gap: 12px; align-items: center; }
.crop-row .crop-ico { width: 44px; height: 44px; flex-shrink: 0; transform: none; }

/* 표 */
.table { background: var(--card); border: 2px solid var(--soil); border-radius: 12px; overflow: hidden; font-size: 15px; }
.table th, .table td { padding: 10px 14px; }
.table thead th { background: var(--paper-2); font-size: 14px; }
.table tbody th { font-weight: 500; }
.table tfoot th, .table tfoot td { background: var(--paper-2); font-weight: 700; border-bottom: 0; }
.table-wrap { overflow-x: auto; margin-bottom: 1em; }
.table-wide { min-width: 640px; }
.card .table { box-shadow: none; }

/* 통계·사실표 */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--card); border: 2px solid var(--line); border-radius: 12px; padding: 8px 14px; min-width: 0; }
.stat .k { display: block; font-size: 13px; color: var(--ink-2); }
.stat b { font-family: var(--head); font-weight: 400; font-size: 24px; line-height: 1.3; overflow-wrap: anywhere; }
.stat-coin { background: #fff0c4; border-color: var(--yolk-d); }
.stat-coin b { font-size: 32px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin: 0 0 1em; }
.facts > div { border-bottom: 1px dashed var(--line); padding: 6px 0; }
.facts dt { font-size: 13px; color: var(--ink-2); }
.facts dd { font-weight: 700; display: flex; gap: 6px; align-items: center; }
.facts-col { grid-template-columns: 1fr; }
.tile .k { display: block; font-size: 13px; color: var(--ink-2); }
.tile b { font-family: var(--head); font-weight: 400; font-size: 30px; }

/* 농장(게임) */
.farm { background: var(--card); color: var(--ink); border: 2px solid var(--soil); border-radius: 20px; box-shadow: 4px 5px 0 var(--soil-2); padding: 18px; position: relative; }
.farm-head { display: flex; justify-content: space-between; align-items: baseline; }
.farm-head h2 { margin: 0 0 .3em; font-size: 22px; }
.grade { margin: 0; font-size: 14px; color: var(--leaf-d); font-weight: 700; }
.stats-mini { grid-template-columns: 1.3fr 1fr 1fr; }
.stats-mini .stat b { font-size: 20px; }
.stats-mini .stat-coin b { font-size: 26px; }
.farm-full { padding: 22px; }
.farm-main { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 960px) { .farm-main { grid-template-columns: 1fr; } }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.segs { display: inline-flex; border: 2px solid var(--soil-2); border-radius: 999px; overflow: hidden; }
.seg { border: 0; background: var(--card); padding: 6px 14px; font-weight: 700; font-size: 14px; }
.seg.is-on { background: var(--soil-2); color: #fff8e6; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; border: 2px solid var(--line); background: var(--card); border-radius: 999px; padding: 2px 12px 2px 4px; font-size: 14px; }
.chip .crop-ico { width: 24px; height: 24px; transform: none; }
.chip.is-on { border-color: var(--leaf-d); background: #e6f4d6; font-weight: 700; }
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.farm-mini .board { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.board.is-plant .plot { outline: 2px dashed var(--leaf-d); outline-offset: 2px; }
.plot { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; padding: 8px 8px 8px; aspect-ratio: 1 / 1.06; background: radial-gradient(circle at 30% 20%, #7a5636 0, #5b3d27 70%); border: 2px solid var(--soil-2); border-radius: 14px; color: #fff8e6; overflow: hidden; -webkit-tap-highlight-color: transparent; }
.plot::before { content: ""; position: absolute; inset: auto 0 22% 0; height: 3px; background: rgba(0,0,0,.18); }
.plot-soil { flex: 1; display: grid; place-items: end center; min-height: 0; padding-bottom: 4px; }
.plot-bar { height: 8px; background: rgba(0,0,0,.4); border-radius: 999px; overflow: hidden; }
.plot-bar i { display: block; height: 100%; background: var(--leaf-l); border-radius: 999px; }
.plot-tag { position: absolute; top: 5px; right: 5px; font-size: 11px; line-height: 1.5; padding: 0 7px; border-radius: 999px; background: rgba(0,0,0,.42); }
.plot-tag:empty { display: none; }
.plot.is-auto::after { content: "자동"; position: absolute; top: 5px; left: 5px; font-size: 11px; line-height: 1.5; padding: 0 7px; border-radius: 999px; background: var(--leaf); color: #fff; }
.plot.is-ready { border-color: var(--yolk); box-shadow: 0 0 0 3px rgba(240,180,41,.55); }
.plot.is-ready .plot-tag { background: var(--yolk); color: var(--soil-2); font-weight: 700; }
.plot.is-ready:not(.is-auto) .crop-ico { animation: bob .9s ease-in-out infinite; }
@keyframes bob { 50% { translate: 0 -4px; } }
.pop { position: absolute; left: 50%; top: 30%; translate: -50% 0; color: #fff3b0; font-weight: 700; font-size: 16px; text-shadow: 0 1px 2px #000; pointer-events: none; animation: pop .9s ease-out forwards; }
@keyframes pop { to { translate: -50% -34px; opacity: 0; } }
.hint { font-size: 13px; color: var(--ink-2); margin: 10px 0 0; }
.farm-more { margin: 8px 0 0; font-weight: 700; }
.note { background: #e9f4dc; border: 2px solid var(--leaf); border-radius: 12px; padding: 10px 14px; font-size: 15px; margin: 0 0 14px; }
.note[hidden] { display: none; }
.toast { position: fixed; left: 50%; bottom: 22px; translate: -50% 20px; opacity: 0; pointer-events: none; background: var(--soil-2); color: #fff8e6; padding: 10px 20px; border-radius: 999px; font-size: 15px; z-index: 60; max-width: calc(100vw - 32px); transition: opacity .2s, translate .2s; }
.toast.is-on { opacity: 1; translate: -50% 0; }

/* 패널(탭 + 목록) */
.panel { border: 2px solid var(--line); border-radius: 14px; background: #fffdf6; overflow: hidden; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px 8px 0; background: var(--paper-2); }
.tab { border: 0; background: transparent; border-radius: 10px 10px 0 0; padding: 8px 12px; font-weight: 700; font-size: 14px; color: var(--ink-2); }
.tab.is-on { background: #fffdf6; color: var(--soil-2); }
.pane { padding: 6px 14px 14px; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.list li:last-child { border-bottom: 0; }
.list h3 { font-family: var(--body); font-weight: 700; font-size: 16px; margin: 0; }
.list h3 small { font-weight: 400; margin-left: 4px; }
.list p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.max, .lock { font-size: 13px; color: var(--ink-2); flex-shrink: 0; text-align: right; }
.max { color: var(--leaf-d); font-weight: 700; }
.presti { display: grid; gap: 14px; padding-top: 10px; }
.presti section { border-bottom: 1px dashed var(--line); padding-bottom: 14px; }
.presti section:last-child { border-bottom: 0; }
.presti h3 { font-family: var(--body); font-weight: 700; font-size: 16px; }
.presti-now { background: var(--paper-2); border-radius: 10px; padding: 6px 12px; font-size: 14px; }
.code { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.code code { font-size: 20px; letter-spacing: .06em; }

/* 이웃 */
.rank { list-style: none; padding: 0; margin: 0 0 12px; }
.rk { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; grid-template-areas: "no name score" "no vil score"; gap: 0 10px; padding: 9px 4px; border-bottom: 1px dashed var(--line); align-items: center; }
.rk-no { grid-area: no; font-family: var(--head); font-size: 20px; text-align: center; color: var(--ink-2); }
.rk.is-top .rk-no { color: var(--yolk-d); }
.rk-name { grid-area: name; font-weight: 700; }
.rk-vil { grid-area: vil; font-size: 13px; color: var(--ink-2); }
.rk-score { grid-area: score; font-family: var(--head); font-size: 20px; }
.rk.is-me { background: #fff0c4; border-radius: 10px; border-bottom-color: transparent; }
.rank-card h3 small { font-family: var(--body); margin-left: 6px; }
.box-list { list-style: none; padding: 0; margin: 0; }
.box-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.box-list li:last-child { border-bottom: 0; }
.box-list div { display: grid; }
.box-list span { font-size: 13px; color: var(--ink-2); }
.nb { display: flex; flex-direction: column; }
.nb-top { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.nb-top h3 { margin: 0; }
.nb-top .meta { margin: 0; }
.greet { color: var(--ink-2); font-size: 14px; flex: 1; }
.nb-act { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.nb-act .btn { padding: 6px 14px; font-size: 14px; }
.bubble { background: var(--card); border: 2px solid var(--soil); border-radius: 18px; padding: 12px 18px; position: relative; margin-bottom: 18px; }
.bubble::after { content: ""; position: absolute; left: 28px; bottom: -11px; width: 18px; height: 18px; background: var(--card); border-right: 2px solid var(--soil); border-bottom: 2px solid var(--soil); rotate: 45deg; }
.field { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.cell { display: flex; flex-direction: column; gap: 4px; aspect-ratio: 1 / 1.05; background: radial-gradient(circle at 30% 20%, #7a5636 0, #5b3d27 70%); border: 2px solid var(--soil-2); border-radius: 14px; padding: 8px; }
.cell .soil { flex: 1; display: grid; place-items: end center; min-height: 0; }
.cell .soil .crop-ico { transition: none; }
.cell .bar { height: 7px; border-radius: 999px; background: rgba(0,0,0,.4); overflow: hidden; }
.cell .bar i { display: block; height: 100%; background: var(--leaf-l); }
.cell.is-empty { background: #6b4b30; opacity: .55; }
@media (max-width: 420px) { .field { gap: 6px; } .cell { padding: 5px; border-radius: 10px; } }

/* 소식·FAQ·산문 */
.news-list h2, .news-list h3 { font-size: 20px; margin-bottom: .3em; }
.news-list a { color: var(--soil-2); text-decoration: none; }
.news-list a:hover { text-decoration: underline; }
.faq details { background: var(--card); border: 2px solid var(--soil); border-radius: 14px; margin-bottom: 10px; box-shadow: 2px 3px 0 var(--soil); }
.faq summary { cursor: pointer; padding: 14px 18px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::after { content: "+"; font-family: var(--head); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq summary::-webkit-details-marker { display: none; }
.faq details p { padding: 0 18px 14px; margin: 0; color: var(--ink-2); }
.rules { padding-left: 1.1em; }
.rules li { margin-bottom: .5em; }
.refund { margin: 28px 0 0; }
.prose { max-width: 680px; padding-bottom: 40px; }
.prose p { font-size: 17px; }
.presti-card ol { padding-left: 1.2em; margin: 0; }
.presti-card li { margin-bottom: .7em; }
.blds .card { padding: 14px 16px; }
.blds h3 { margin-bottom: .1em; }
.bld-grid .card { position: relative; padding-top: 28px; }
.bld-no { position: absolute; top: -14px; left: 16px; width: 30px; height: 30px; border-radius: 50%; background: var(--leaf-l); border: 2px solid var(--soil-2); display: grid; place-items: center; font-family: var(--head); }
.visit-field .field { margin-bottom: 14px; }
.visit .facts { grid-template-columns: 1fr 1fr; }

/* 설치 밴드 */
.install { background: var(--leaf-d); color: #f3ecd2; }
.install h2 { color: #fff8e6; }
.install a:not(.btn) { color: #ffe9a3; }
.store-list { list-style: none; padding: 0; margin: 1em 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.store-list small { color: var(--ink-2); font-weight: 400; }
.qr-pair { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.qr-pair figure { margin: 0; background: #fffaf0; border: 2px solid var(--soil-2); border-radius: 14px; padding: 12px 12px 6px; text-align: center; color: var(--ink); }
.qr-pair img { display: block; margin: 0 auto 4px; }
.qr-pair figcaption { font-size: 13px; }

/* 푸터 조각 */
.foot-sns { display: flex !important; gap: 12px; flex-wrap: wrap; }
.foot-brand p { color: #c9b88f; margin: .6em 0; }
.rating-badge { display: flex; gap: 10px; align-items: center; margin-bottom: .6em; }
.rating-badge b { display: grid; place-items: center; background: var(--leaf); color: #fff; border-radius: 10px; padding: 8px 10px; font-size: 14px; text-align: center; line-height: 1.2; min-width: 64px; }
.rating-badge span { font-size: 12px; color: #c9b88f; line-height: 1.5; }
.foot-rating p { font-size: 13px; color: #c9b88f; }

/* 모달(:target — JS 없이) */
.modal { position: fixed; inset: 0; z-index: 90; display: none; place-items: center; padding: 20px; }
.modal:target { display: grid; }
.modal-back { position: absolute; inset: 0; background: rgba(40,25,12,.7); }
.modal-box { position: relative; background: var(--card); color: var(--ink); border: 2px solid var(--soil); border-radius: 18px; max-width: 640px; width: 100%; max-height: 82vh; overflow: auto; padding: 24px 26px 20px; }
.modal-box h2 { font-size: 24px; }
.modal-box h3 { font-family: var(--body); font-weight: 700; font-size: 16px; margin: 1em 0 .2em; }
.modal-box p { font-size: 15px; margin-bottom: .6em; }
.modal-x { position: sticky; top: 0; float: right; background: var(--yolk); border: 2px solid var(--soil-2); border-radius: 999px; padding: 2px 14px; font-weight: 700; font-size: 14px; text-decoration: none; color: var(--soil-2); }

@media (max-width: 520px) {
  .stats-mini { grid-template-columns: 1fr 1fr; }
  .stats-mini .stat-coin { grid-column: 1 / -1; }
  .farm { padding: 14px; border-radius: 16px; }
  .farm-full { padding: 14px; }
  .facts, .visit .facts { grid-template-columns: 1fr; }
  .crop-hero { flex-direction: column; align-items: flex-start; }
}
