@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;800&family=Playfair+Display:wght@700&family=Noto+Sans+KR:wght@400;700&display=swap');

:root{
  --bg:#f7f4ef;--card:#fff;--ink:#1c1917;--ink2:#57534e;--muted:#a8a29e;--line:#e7e5e4;--soft:#f5f5f4;
  --red:#dc2626;--red-bg:#fef2f2;
  --seoul:#1d4ed8;--seoul-bg:#eff6ff;
  --busan:#0e7490;--busan-bg:#ecfeff;
  --travel:#d97706;--travel-bg:#fffbeb;
  --kpop:#db2777;--kpop-bg:#fdf2f8;
  --green:#15803d;--green-bg:#f0fdf4;
  --shadow:0 1px 4px rgba(0,0,0,.06);--shadow-h:0 6px 20px rgba(0,0,0,.1);
}
*{margin:0;padding:0;box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{font-family:'Outfit',sans-serif;background:var(--bg);color:var(--ink);min-height:100vh;min-height:100dvh;padding:0 0 calc(72px + env(safe-area-inset-bottom))}
a{color:inherit;text-decoration:none}
button{font-family:inherit}
.kr{font-family:'Noto Sans KR',sans-serif}

/* HERO */
.hero{background:linear-gradient(135deg,#1c1917 0%,#292524 50%,#44403c 100%);color:#fafaf9;padding:2.5rem 1.5rem 2rem;text-align:center;position:relative;overflow:hidden}
.hero::before{content:'\D55C\AD6D';font-family:'Noto Sans KR',sans-serif;position:absolute;font-size:12rem;font-weight:700;color:rgba(255,255,255,.035);top:50%;left:50%;transform:translate(-50%,-50%);pointer-events:none;letter-spacing:1.5rem;white-space:nowrap}
.hero h1{font-family:'Playfair Display',serif;font-size:2.4rem;letter-spacing:.04em;margin-bottom:.2rem;position:relative}
.hero .dates{font-weight:300;font-size:1rem;color:#a8a29e;letter-spacing:.06em;position:relative}
.hero .travelers{margin-top:.4rem;font-size:.82rem;color:#78716c;font-weight:300;position:relative}
.hero-sm{background:linear-gradient(135deg,#1c1917 0%,#292524 50%,#44403c 100%);color:#fafaf9;padding:1.8rem 1.5rem 1.4rem;text-align:center;position:relative;overflow:hidden}
.hero-sm h1{font-family:'Playfair Display',serif;font-size:1.6rem;letter-spacing:.03em;margin-bottom:.15rem;position:relative}
.hero-sm p{font-weight:300;font-size:.82rem;color:#a8a29e;position:relative}
.hero-sm .hangul{position:absolute;right:-1rem;top:50%;transform:translateY(-50%);font-family:'Noto Sans KR',sans-serif;font-size:6rem;font-weight:700;color:rgba(255,255,255,.04);pointer-events:none}
.countdown{margin-top:.7rem;display:inline-flex;align-items:center;gap:.4rem;background:rgba(255,255,255,.08);padding:.35rem .9rem;border-radius:20px;font-size:.82rem;color:#fbbf24;position:relative}
.countdown .cd-num{font-family:'Playfair Display',serif;font-size:1.1rem;font-weight:700}

/* SYNC PILL */
.sync{position:fixed;top:calc(.6rem + env(safe-area-inset-top));right:.6rem;z-index:950;display:flex;align-items:center;gap:.35rem;background:rgba(28,25,23,.85);color:#e7e5e4;font-size:.62rem;font-weight:500;padding:.3rem .6rem;border-radius:20px;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);transition:opacity .3s;letter-spacing:.02em}
.sync .dot{width:7px;height:7px;border-radius:50%;background:#a8a29e}
.sync.ok .dot{background:#22c55e}.sync.saving .dot{background:#fbbf24}.sync.err .dot{background:#ef4444}
.sync.ok{opacity:.75}

.main{max-width:980px;margin:0 auto;padding:1.2rem 1rem 2rem}
.main.narrow{max-width:720px}
.stitle{font-family:'Playfair Display',serif;font-size:1.35rem;margin:2rem 0 .8rem;padding-bottom:.35rem;border-bottom:2px solid var(--line);display:flex;align-items:baseline;justify-content:space-between;gap:.5rem}
.stitle:first-child{margin-top:.6rem}
.stitle small{font-family:'Outfit',sans-serif;font-size:.72rem;font-weight:400;color:var(--muted)}
.hint{font-size:.72rem;color:var(--muted);font-weight:300;line-height:1.45}

/* TAGS / COLORS */
.tag{display:inline-block;font-size:.55rem;font-weight:600;letter-spacing:.05em;text-transform:uppercase;padding:2px 6px;border-radius:3px}
.t-f{background:var(--red-bg);color:var(--red)}.t-s{background:var(--seoul-bg);color:var(--seoul)}.t-b{background:var(--busan-bg);color:var(--busan)}.t-tr{background:var(--travel-bg);color:var(--travel)}.t-k{background:var(--kpop-bg);color:var(--kpop)}.t-g{background:var(--green-bg);color:var(--green)}.t-n{background:var(--soft);color:var(--ink2)}
.c-f{--c:var(--red)}.c-s{--c:var(--seoul)}.c-b{--c:var(--busan)}.c-tr{--c:var(--travel)}.c-k{--c:var(--kpop)}

/* CARD + SECTION */
.card{background:var(--card);border-radius:12px;padding:1.1rem;box-shadow:var(--shadow)}
.card h3{font-family:'Playfair Display',serif;font-size:1.1rem;margin-bottom:.7rem}
.section{background:var(--card);border-radius:12px;margin-bottom:.7rem;box-shadow:var(--shadow);overflow:hidden}
.section-header{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.1rem;cursor:pointer;-webkit-tap-highlight-color:transparent;user-select:none;gap:.5rem}
.section-header h2{font-family:'Playfair Display',serif;font-size:1.05rem;display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}
.section-header .progress{font-size:.7rem;font-weight:400;color:var(--muted);font-family:'Outfit',sans-serif}
.chevron{width:20px;height:20px;transition:transform .2s;color:var(--muted);flex-shrink:0}
.section.open .chevron{transform:rotate(180deg)}
.section-body{display:none;padding:0 1.1rem 1.1rem}
.section.open .section-body{display:block}

/* FORMS */
.inp,.sel,.ta{width:100%;padding:.55rem .65rem;border:1.5px solid var(--line);border-radius:8px;font-family:'Outfit',sans-serif;font-size:.82rem;color:var(--ink);background:#fff;outline:none;transition:border-color .15s;-webkit-appearance:none;appearance:none}
.sel{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a8a29e' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right .6rem center;padding-right:1.8rem}
.inp:focus,.sel:focus,.ta:focus{border-color:var(--seoul)}
.ta{min-height:84px;resize:vertical;font-weight:300;line-height:1.45}
.inp::placeholder,.ta::placeholder{color:#c4c0b8}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.35rem;padding:.55rem .9rem;background:var(--ink);color:#fff;border:none;border-radius:8px;font-size:.78rem;font-weight:600;cursor:pointer;transition:opacity .12s;white-space:nowrap}
.btn:hover{opacity:.88}
.btn.ghost{background:var(--soft);color:var(--ink)}
.btn.sm{padding:.35rem .6rem;font-size:.7rem}
.btn.red{background:var(--red)}
.row{display:flex;gap:.45rem;flex-wrap:wrap}
.row>*{flex:1;min-width:0}
.field label{display:block;font-size:.6rem;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);margin-bottom:.25rem}

/* CHECK ITEMS */
.check-group-title{font-size:.65rem;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);margin:1rem 0 .4rem}
.check-group-title:first-child{margin-top:.2rem}
.check-item{display:flex;align-items:center;gap:.55rem;padding:.45rem 0;border-bottom:1px solid var(--soft);font-size:.82rem;font-weight:300}
.check-item:last-child{border-bottom:none}
.check-item input[type=checkbox]{width:19px;height:19px;accent-color:var(--seoul);flex-shrink:0;cursor:pointer}
.check-item label{cursor:pointer;flex:1;line-height:1.35}
.check-item.done label{text-decoration:line-through;color:var(--muted)}
.check-item .when{font-size:.6rem;color:var(--muted);display:block;text-decoration:none!important}
.check-item .x{background:none;border:none;color:#d6d3d1;font-size:1rem;cursor:pointer;padding:0 .2rem}
.check-item .x:hover{color:var(--red)}

/* MODAL */
.modal-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:1000;justify-content:center;align-items:center;padding:1.5rem;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}
.modal-overlay.active{display:flex;animation:fadeIn .2s ease}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
@keyframes slideUp{from{opacity:0;transform:translateY(30px)}to{opacity:1;transform:translateY(0)}}
.modal{background:#fff;border-radius:16px;max-width:540px;width:100%;max-height:86vh;max-height:86dvh;overflow-y:auto;position:relative;animation:slideUp .25s ease;box-shadow:0 25px 60px rgba(0,0,0,.25)}
.modal-handle{display:none}
.modal-bar{height:4px;background:var(--c,var(--ink))}
.modal-header{padding:1rem 1.3rem .6rem;display:flex;justify-content:space-between;align-items:flex-start;gap:1rem}
.modal-header h2{font-family:'Playfair Display',serif;font-size:1.15rem;line-height:1.3}
.modal-close{background:none;border:none;font-size:1.5rem;cursor:pointer;color:var(--muted);padding:0;line-height:1}
.modal-close:hover{color:var(--ink)}
.modal-body{padding:0 1.3rem 1.3rem}
.m-sec{margin-bottom:.9rem}
.m-sec-t{font-size:.6rem;font-weight:600;text-transform:uppercase;letter-spacing:.1em;color:var(--muted);margin-bottom:.35rem}
.m-row{display:flex;justify-content:space-between;align-items:flex-start;padding:.32rem 0;font-size:.8rem;border-bottom:1px solid var(--soft);gap:.8rem}
.m-row:last-child{border-bottom:none}
.m-row .l{color:#78716c;font-weight:300;flex-shrink:0}
.m-row .v{text-align:right;font-weight:500}

/* TAB BAR */
.tab-bar{position:fixed;bottom:0;left:0;right:0;height:calc(64px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid var(--line);display:flex;justify-content:space-around;align-items:flex-start;padding-top:6px;z-index:900;padding-bottom:env(safe-area-inset-bottom)}
.tab-bar a{display:flex;flex-direction:column;align-items:center;gap:2px;color:var(--muted);font-size:.6rem;font-weight:500;letter-spacing:.03em;transition:color .12s;padding:4px 6px;-webkit-tap-highlight-color:transparent;min-width:56px}
.tab-bar a.active{color:var(--red)}
.tab-bar svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.tab-bar a.active svg{stroke-width:2.2}

/* GATE */
.gate{position:fixed;inset:0;z-index:2000;background:linear-gradient(135deg,#1c1917 0%,#292524 50%,#44403c 100%);display:none;align-items:center;justify-content:center;padding:1.5rem}
.gate.active{display:flex}
.gate-box{background:#fff;border-radius:16px;padding:1.6rem 1.4rem;max-width:360px;width:100%;text-align:center;box-shadow:0 25px 60px rgba(0,0,0,.35)}
.gate-box .flag{font-size:2.4rem}
.gate-box h2{font-family:'Playfair Display',serif;font-size:1.35rem;margin:.3rem 0 .2rem}
.gate-box p{font-size:.78rem;color:var(--ink2);font-weight:300;margin-bottom:1rem;line-height:1.45}
.gate-box .err{color:var(--red);font-size:.72rem;min-height:1.1em;margin-top:.5rem}
.gate-box .inp{text-align:center;font-size:1rem;margin-bottom:.6rem}
.gate-box .btn{width:100%;padding:.7rem}

/* TOAST */
.toast{position:fixed;left:50%;bottom:calc(80px + env(safe-area-inset-bottom));transform:translateX(-50%) translateY(20px);background:var(--ink);color:#fff;font-size:.78rem;padding:.55rem .9rem;border-radius:10px;opacity:0;pointer-events:none;transition:all .25s;z-index:1500;max-width:90vw;text-align:center}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}

/* CHIPS / FILTERS */
.chips{display:flex;gap:.4rem;overflow-x:auto;padding:.2rem 0 .6rem;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.chips::-webkit-scrollbar{display:none}
.chip{flex-shrink:0;padding:.42rem .8rem;border-radius:20px;background:#fff;border:1.5px solid var(--line);font-size:.75rem;font-weight:500;color:var(--ink2);cursor:pointer;-webkit-tap-highlight-color:transparent;white-space:nowrap}
.chip.on{background:var(--ink);border-color:var(--ink);color:#fff}

.empty-state{text-align:center;padding:1.6rem 1rem;color:var(--muted);font-size:.8rem;font-weight:300}


/* PHOTOS */
.hero.photo,.hero-sm.photo{background:linear-gradient(180deg,rgba(28,25,23,.62) 0%,rgba(28,25,23,.38) 45%,rgba(28,25,23,.9) 100%),var(--img) center/cover no-repeat,#1c1917}
.hero.photo{padding:4.4rem 1.5rem 2.6rem}
.hero.photo::before{color:rgba(255,255,255,.07)}
.hero.photo h1{text-shadow:0 2px 24px rgba(0,0,0,.45)}
.hero.photo .dates{color:#f5f5f4}.hero.photo .travelers{color:#d6d3d1}
.hero.photo .countdown{background:rgba(0,0,0,.35);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.hero-sm.photo{padding:2.8rem 1.5rem 1.9rem}
.hero-sm.photo h1{text-shadow:0 2px 18px rgba(0,0,0,.5)}
.hero-sm.photo p{color:#e7e5e4}
.hero-sm.photo .hangul{color:rgba(255,255,255,.08)}
.banner{position:relative;border-radius:14px;overflow:hidden;min-height:150px;background:#292524 var(--img) center/cover no-repeat;box-shadow:var(--shadow);display:flex;align-items:flex-end;color:#fff;-webkit-tap-highlight-color:transparent}
.banner::after{content:'';position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,0) 30%,rgba(0,0,0,.78) 100%)}
.banner .bt{position:relative;z-index:1;padding:.85rem 1rem}
.banner h3{font-family:'Playfair Display',serif;font-size:1.35rem;line-height:1.15}
.banner .kr{font-size:.75rem;opacity:.8}
.banner small{display:block;font-size:.72rem;color:#e7e5e4;margin-top:.15rem;font-weight:300}
a.banner{transition:transform .15s,box-shadow .15s}
a.banner:hover{transform:translateY(-2px);box-shadow:var(--shadow-h)}
.credit{text-align:center;font-size:.62rem;color:#c4c0b8;margin:1.4rem 0 .2rem}
.credit a{text-decoration:underline}

@media(max-width:720px){
  .hero h1{font-size:1.8rem}
  .hero{padding:2.2rem 1rem 1.5rem}
  .modal-overlay{align-items:flex-end;padding:0}
  .modal{border-radius:20px 20px 0 0;max-height:92vh;max-height:92dvh;box-shadow:0 -10px 40px rgba(0,0,0,.2)}
  .modal-handle{display:block;width:36px;height:4px;background:#d6d3d1;border-radius:2px;margin:10px auto 0}
  .stitle{font-size:1.2rem}
  .hero-sm{padding-top:2.7rem}
  .hero{padding-top:2.8rem}
  .hero.photo{padding:3.6rem 1rem 2rem}
  .hero-sm.photo{padding:3rem 1rem 1.6rem}
}
