/* Teamchaja base styles. One mobile-width column; the native wrapper reuses it unchanged. */
:root {
  --green: #167A45;
  --green-deep: #0E5C34;
  --green-light: #E4F3EA;
  --ink: #141414;
  --muted: #4B5563;
  --line: #E3E7E3;
  --line-strong: #D9DED9;
  --chip: #F3F5F3;
  --amber: #B45309; --amber-bg: #FEF3C7; --amber-text: #92400E;
  --red: #991B1B;
  --bg: #FFFFFF;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: 'Noto Sans KR', system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

#app { max-width: 480px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }

.topbar { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 10px; gap: 10px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; letter-spacing: -0.2px; }
.brand svg { width: 28px; height: 28px; }
.pill { height: 32px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 16px; background: #fff; font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.iconbtn { width: 36px; height: 36px; border: 0; border-radius: 18px; background: var(--chip); display: inline-flex; align-items: center; justify-content: center; }

.chips { display: flex; gap: 8px; padding: 6px 20px 12px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { height: 34px; padding: 0 14px; border-radius: 17px; border: 1px solid var(--line-strong); background: #fff; font-size: 13px; font-weight: 500; white-space: nowrap; }
.chip.on { background: var(--green); border-color: var(--green); color: #fff; }
[data-level] { font-size: 12px; letter-spacing: -0.02em; }

.main { flex: 1 1 auto; padding: 0 20px 100px; display: flex; flex-direction: column; gap: 10px; }
.card { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.card.muted { opacity: .6; }
.card .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tag { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; }
.tag.match { color: var(--green-deep); background: var(--green-light); }
.tag.guest { color: #7C3AED; background: #EFE9FB; }
.tag.slot { color: #1D4ED8; background: #E3EBFC; }
.tag.avail { color: #0F766E; background: #DDF4F1; }
.status { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 10px; }
.status.open { color: var(--green-deep); border: 1px solid var(--green-deep); }
.status.almost { color: var(--amber-text); background: var(--amber-bg); }
.status.closed { color: var(--muted); background: #EEF0EE; }
.title { font-size: 15px; font-weight: 500; }
.sub { font-size: 12px; color: var(--muted); }
.name { font-size: 14px; font-weight: 700; }

.fab { position: fixed; right: max(20px, calc(50% - 220px)); bottom: 92px; width: 56px; height: 56px; border: 0; border-radius: 28px; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(22,122,69,.35); }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 480px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); padding: 8px 8px calc(10px + env(safe-area-inset-bottom)); background: #fff; }
.tabbar button { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; background: none; color: var(--muted); font-size: 11px; font-weight: 500; padding: 6px 0; }
.tabbar button.on { color: var(--green); font-weight: 700; }

.btn { height: 52px; border-radius: 14px; border: 0; background: var(--green); color: #fff; font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; width: 100%; }
.btn.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line-strong); }
.btn.kakao { background: #FEE500; color: #191919; }
.btn.naver { background: #03C75A; color: #fff; }
.btn.google { background: #fff; color: var(--ink); border: 1px solid var(--line-strong); }
.stack { display: flex; flex-direction: column; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.field input, .field textarea, .field select { height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; font-size: 15px; font-weight: 500; color: var(--ink); background: #fff; }
.field textarea { height: auto; padding: 10px 12px; resize: none; }
.center { text-align: center; }
.hero { padding: 48px 20px 16px; display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center; }
.hero h1 { margin: 0; font-size: 28px; font-weight: 900; letter-spacing: -0.5px; }
.hero p { margin: 0; color: var(--muted); }
.error { padding: 12px 14px; border-radius: 12px; background: #FEE2E2; color: var(--red); font-size: 13px; }

.toast { position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 20px; font-size: 13px; opacity: 0; transition: all .2s; pointer-events: none; z-index: 50; max-width: 90vw; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
a.card { color: inherit; }
select { appearance: none; background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23141414' stroke-width='2.5'><path d='M6 9l6 6 6-6'/></svg>") no-repeat right 12px center; padding-right: 32px; }
input[type=date], input[type=time] { min-width: 0; }

.story h2 { font-size: 18px; margin: 18px 0 6px; } .story h3 { font-size: 15px; margin: 14px 0 4px; }
.story p { margin: 0 0 10px; } .story ul, .story ol { padding-left: 22px; margin: 0 0 10px; } .story ol.steps li { margin-bottom: 6px; }
.story blockquote { margin: 10px 0; padding: 8px 12px; border-left: 3px solid var(--green); color: var(--muted); }
.story .note { padding: 10px 12px; border-radius: 10px; background: var(--amber-bg); color: var(--amber-text); margin: 10px 0; }
.story table { border-collapse: collapse; width: 100%; font-size: 13px; margin: 10px 0; } .story th, .story td { border: 1px solid var(--line-strong); padding: 6px 8px; text-align: left; }
.story figure { margin: 12px 0; } .story img { max-width: 100%; border-radius: 10px; display: block; } .story figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; }
.story a { color: var(--green-deep); text-decoration: underline; }

/* Bottom sheet: filters, region picker */
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 480px; max-height: 85vh; overflow-y: auto; background: #fff; border-radius: 20px 20px 0 0; padding: 14px 20px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }
.sheet .handle { width: 40px; height: 4px; border-radius: 2px; background: var(--line-strong); margin: 0 auto; }
.chip.filter.on { background: var(--green-light); border-color: var(--green); color: var(--green-deep); }
.region-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 500; background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; text-align: left; }
.region-row.on { color: var(--green-deep); font-weight: 700; }

/* 마이 (design A) */
.me-head { background: var(--green); color: #fff; padding: 52px 20px 20px; display: flex; flex-direction: column; gap: 16px; }
.me-head .row { display: flex; align-items: center; justify-content: space-between; }
.me-pill { height: 32px; padding: 0 12px; border: 1px solid rgba(255,255,255,.5); border-radius: 16px; background: none; color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.me-avatar { width: 64px; height: 64px; border-radius: 32px; background: #fff; color: var(--green-deep); display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 900; flex: 0 0 auto; }
.me-chip { height: 22px; padding: 0 8px; border-radius: 11px; background: rgba(255,255,255,.18); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; }
.me-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; background: rgba(0,0,0,.18); border-radius: 14px; padding: 12px 8px; }
.me-stats > div { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.me-stats b { font-size: 20px; font-weight: 900; }
.me-stats span { font-size: 11px; opacity: .85; }
.me-bar { background: var(--green); color: #fff; padding: 52px 20px 16px; display: flex; align-items: center; gap: 10px; }
.me-back { width: 36px; height: 36px; border-radius: 18px; background: rgba(255,255,255,.16); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.me-label { font-size: 13px; font-weight: 700; color: var(--muted); }
.list-group { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; background: #fff; }
.list-row { min-height: 52px; padding: 0 14px; display: flex; align-items: center; gap: 12px; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; color: var(--ink); text-align: left; width: 100%; }
.list-row:last-child { border-bottom: 0; }
.list-row.on { background: var(--green-light); }
.list-ico { color: var(--green); display: inline-flex; }
.list-main { flex: 1 1 auto; font-size: 15px; font-weight: 500; }
.list-chev { color: #9AA3AE; }
.badge { height: 22px; min-width: 22px; padding: 0 7px; border-radius: 11px; background: var(--amber); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.switch { width: 48px; height: 28px; border-radius: 14px; border: 0; background: var(--line-strong); position: relative; flex: 0 0 auto; padding: 0; }
.switch span { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 11px; background: #fff; transition: left .15s; }
.switch.on { background: var(--green); }
.switch.on span { left: 23px; }
.modal-bg { position: fixed; inset: 0; background: rgba(20,20,20,.45); z-index: 40; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal { width: 100%; max-width: 400px; background: #fff; border-radius: 20px; padding: 24px 20px 20px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.25); }
.modal-ico { width: 48px; height: 48px; border-radius: 24px; background: #FEE2E2; color: var(--red); display: inline-flex; align-items: center; justify-content: center; align-self: center; }

/* picker buttons look like inputs */
.pick { height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; font-size: 15px; font-weight: 500; color: var(--ink); background: #fff; font-family: inherit; text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; }
/* chip rows on pointer devices: a thin scrollbar so overflow is visible */
@media (hover: hover) and (pointer: fine) {
  .chips { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; cursor: grab; }
  .chips::-webkit-scrollbar { display: block; height: 4px; }
  .chips::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 2px; }
}

/* date strip and map */
.datestrip { padding-top: 0; gap: 6px; }
.datechip { flex: 0 0 auto; width: 48px; height: 52px; border-radius: 12px; border: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-family: inherit; color: var(--ink); }
.datechip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.map-pin { height: 26px; padding: 0 8px; border-radius: 13px; border: 2px solid var(--green); background: #fff; color: var(--green); font: 700 11px/1 'Noto Sans KR', system-ui, sans-serif; box-shadow: 0 2px 6px rgba(0,0,0,.18); white-space: nowrap; cursor: pointer; }
.map-me { display: block; width: 16px; height: 16px; border-radius: 8px; background: #1D4ED8; border: 3px solid #fff; box-shadow: 0 0 0 2px #1D4ED8; }

/* legal pages and footer */
.site-foot { display: flex; flex-direction: column; gap: 4px; align-items: center; padding: 20px 16px 8px; font-size: 11px; color: var(--muted); text-align: center; line-height: 1.5; }
.site-foot a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.legal { font-size: 14px; line-height: 1.65; padding-top: 14px; }
.legal h1 { font-size: 20px; margin: 0 0 4px; }
.legal h2 { font-size: 15px; margin: 22px 0 6px; color: var(--green-deep); }
.legal p { margin: 0 0 10px; }
.legal ul, .legal ol { margin: 0 0 10px; padding-left: 20px; }
.legal li { margin: 0 0 4px; }
.legal table { border-collapse: collapse; width: 100%; font-size: 12px; margin: 6px 0 12px; display: block; overflow-x: auto; }
.legal th, .legal td { border: 1px solid var(--line); padding: 5px 7px; text-align: left; vertical-align: top; min-width: 80px; }
.legal th { background: var(--chip); }
.legal hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.consent { display: flex; flex-direction: column; gap: 8px; padding: 2px 0 4px; }
.consent label { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; color: var(--ink); }
.consent input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--green); flex: 0 0 auto; }
.consent a { color: var(--green-deep); text-decoration: underline; text-underline-offset: 2px; }
