:root {
  --bg: #f6f5fb;
  --surface: #ffffff;
  --surface-2: #f0eff8;
  --text: #15131f;
  --muted: #6b6880;
  --border: #e7e4f2;
  --brand: #7c3aed;
  --shadow: 0 1px 2px rgba(20,20,40,.05), 0 10px 30px rgba(40,20,90,.08);
  --shadow-lg: 0 18px 50px rgba(60,20,120,.22);
  --radius: 20px;
  --radius-sm: 12px;
  --maxw: 1120px;
  font-family: "Pretendard Variable", Pretendard, system-ui, -apple-system, "Segoe UI", Roboto, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0b14; --surface: #17151f; --surface-2: #211e2c;
    --text: #efedf6; --muted: #a09db4; --border: #2c2838;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.4);
    --shadow-lg: 0 20px 56px rgba(0,0,0,.55);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
a { color: inherit; text-decoration: none; }
kbd { font: inherit; font-size: .72rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; color: var(--muted); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 80%, transparent); backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; gap: 16px; height: 62px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.12rem; letter-spacing: -.02em; }
.brand-mark { font-size: 1.3rem; }
.main-nav { display: flex; gap: 4px; margin-left: 6px; }
.main-nav a { padding: 8px 13px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: .92rem; transition: .15s; }
.main-nav a:hover { color: var(--text); background: var(--surface-2); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { display: inline-flex; align-items: center; gap: 7px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); padding: 8px 12px; border-radius: 11px; cursor: pointer; font: inherit; font-size: .9rem; font-weight: 600; transition: .15s; }
.icon-btn:hover { border-color: var(--brand); color: var(--text); }
.login-btn { background: linear-gradient(120deg, #7c3aed, #b4138a); color: #fff; border: 0; padding: 9px 18px; border-radius: 11px; cursor: pointer; font: inherit; font-weight: 700; font-size: .92rem; box-shadow: 0 4px 14px rgba(150,30,160,.3); transition: .15s; }
.login-btn:hover { filter: brightness(1.07); transform: translateY(-1px); }
.login-btn.is-user { background: var(--surface-2); color: var(--text); box-shadow: none; border: 1px solid var(--border); display: inline-flex; align-items: center; gap: 8px; }
.login-btn .uav { width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: .72rem; font-weight: 800; }

/* Hero — saturated gradient, white text for max legibility (compact) */
.hero { position: relative; overflow: hidden; padding: 36px 0 34px; color: #fff;
  background:
    radial-gradient(900px 520px at 18% 8%, #8b2fe0 0%, transparent 58%),
    radial-gradient(820px 520px at 88% 4%, #ff2d7e 0%, transparent 55%),
    radial-gradient(760px 560px at 50% 116%, #0091ff 0%, transparent 55%),
    radial-gradient(520px 420px at 82% 100%, #ff8a1f 0%, transparent 55%),
    linear-gradient(135deg, #4413a3 0%, #7a1c7e 55%, #b1340b 100%);
}
.hero-bg { display: none; }
.hero-inner { position: relative; z-index: 1; text-align: center; }
.hero-eyebrow { display: inline-block; font-weight: 700; font-size: .8rem; color: #fff; background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.28); padding: 5px 13px; border-radius: 999px; margin: 0 0 12px; backdrop-filter: blur(4px); }
.hero-title { font-size: clamp(1.7rem, 4.6vw, 2.7rem); line-height: 1.12; font-weight: 800; letter-spacing: -.03em; margin: 0 0 10px; color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.3); }
.grad { color: #ffe14d; }
.hero-sub { max-width: 600px; margin: 0 auto 18px; color: rgba(255,255,255,.95); font-size: .98rem; text-shadow: 0 1px 10px rgba(0,0,0,.28); }
.hero-search { display: inline-flex; align-items: center; gap: 10px; width: min(560px, 92%); background: #fff; color: #6b6880; border: 0; box-shadow: 0 14px 40px rgba(0,0,0,.28); border-radius: 999px; padding: 16px 24px; cursor: text; font: inherit; font-size: 1rem; transition: .18s; }
.hero-search:hover { transform: translateY(-2px) scale(1.01); box-shadow: 0 18px 50px rgba(0,0,0,.34); }
.hero-search { padding: 13px 22px; }
.hs-ph { font-weight: 500; }
.hero-stats { margin: 16px 0 0; color: rgba(255,255,255,.96); font-size: .9rem; font-weight: 600; text-shadow: 0 1px 10px rgba(0,0,0,.25); }
.hero-stats b { color: #fff; }

/* Category sections */
.cat-section { margin: 54px 0; }
.cat-head { display: flex; align-items: baseline; gap: 12px; margin: 0 0 20px; }
.cat-emoji { font-size: 1.5rem; }
.cat-title { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.cat-desc { color: var(--muted); font-size: .92rem; }
/* App list — vertical rows: left = icon+name, right = description */
.app-list { display: flex; flex-direction: column; gap: 14px; }
.app-row { position: relative; display: flex; align-items: stretch; gap: 20px; background: var(--surface); border: 1px solid var(--border); border-left: 6px solid var(--ac, var(--brand)); border-radius: var(--radius-sm); padding: 18px 22px; box-shadow: var(--shadow); overflow: hidden; transition: transform .16s, box-shadow .16s, border-color .16s; }
.app-row::after { content: ""; position: absolute; inset: 0; background: var(--ac); opacity: .045; pointer-events: none; }
.app-row:hover { transform: translateX(3px); box-shadow: var(--shadow-lg); }
.app-row .stretch { position: absolute; inset: 0; z-index: 2; }
.row-left { display: flex; align-items: center; gap: 15px; flex: 0 0 232px; min-width: 0; }
.row-emoji { flex: none; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 15px; font-size: 1.8rem; background: #fff; border: 1.5px solid color-mix(in srgb, var(--ac) 45%, var(--border)); box-shadow: 0 4px 12px color-mix(in srgb, var(--ac) 22%, transparent); }
@media (prefers-color-scheme: dark) { .row-emoji { background: #f4f3fa; } }
.row-id { min-width: 0; }
.row-name { font-size: 1.24rem; font-weight: 800; letter-spacing: -.02em; }
.row-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.chip { font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.chip.count { background: color-mix(in srgb, var(--ac) 15%, var(--surface)); color: color-mix(in srgb, var(--ac) 78%, var(--text)); }
.row-right { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; border-left: 1px solid var(--border); padding-left: 20px; }
.row-desc { color: var(--muted); font-size: .96rem; line-height: 1.55; }
.row-go { margin-top: 8px; font-weight: 800; font-size: .9rem; color: color-mix(in srgb, var(--ac) 82%, #000); display: inline-flex; align-items: center; gap: 6px; }
@media (prefers-color-scheme: dark) { .row-go, .sr-app { color: color-mix(in srgb, var(--ac) 50%, #fff) !important; } }
.app-row:hover .row-go { gap: 10px; }
/* 오른쪽 사진 썸네일 */
.row-thumb { position: relative; flex: none; width: 176px; align-self: stretch; min-height: 104px; border-radius: 13px; overflow: hidden; background: var(--ac); }
.rt-fallback { position: absolute; inset: 0; display: grid; place-items: center; font-size: 3.2rem; color: #fff; background: linear-gradient(150deg, color-mix(in srgb, var(--ac) 78%, #fff 6%), color-mix(in srgb, var(--ac) 92%, #000 14%)); }
.row-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; z-index: 1; }
.app-row:hover .row-thumb img { transform: scale(1.06); }
.row-thumb img { transition: transform .35s; }
@media (max-width: 640px) {
  .app-row { flex-wrap: wrap; }
  .row-thumb { order: -1; width: 100%; min-height: 132px; }
  .row-left { flex-basis: 100%; }
  .row-right { border-left: 0; border-top: 1px solid var(--border); padding-left: 0; padding-top: 13px; flex-basis: 100%; }
}

/* Coming soon */
.soon-section { margin: 60px 0 30px; }
.soon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.soon-card { display: flex; align-items: center; gap: 11px; border: 1.5px dashed var(--border); border-radius: var(--radius-sm); padding: 16px 18px; color: var(--muted); background: color-mix(in srgb, var(--surface) 50%, transparent); }
.soon-card .se { font-size: 1.4rem; opacity: .85; }
.soon-card .sl { font-weight: 700; font-size: .92rem; }
.soon-card .ss { font-size: .76rem; color: var(--muted); }
.soon-note { color: var(--muted); font-size: .9rem; margin: 8px 0 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); margin-top: 50px; padding: 40px 0; background: var(--surface); }
.foot-brand { font-weight: 800; font-size: 1.05rem; margin: 0 0 8px; }
.foot-desc { color: var(--muted); max-width: 560px; margin: 0 0 14px; font-size: .92rem; }
.foot-copy { color: var(--muted); font-size: .82rem; margin: 0; }
.loading { text-align: center; color: var(--muted); padding: 60px 0; }

/* Modals (shared) */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px 16px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(12,10,28,.55); backdrop-filter: blur(3px); }
.modal-panel { position: relative; width: min(640px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .16s ease-out; }
@keyframes pop { from { transform: translateY(-8px) scale(.98); opacity: 0; } }
.sm-head { display: flex; align-items: center; gap: 11px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.sm-ico { font-size: 1.1rem; }
#searchInput { flex: 1; border: 0; background: transparent; font: inherit; font-size: 1.05rem; color: var(--text); outline: none; }
.sm-close { border: 0; background: var(--surface-2); color: var(--muted); width: 30px; height: 30px; border-radius: 8px; cursor: pointer; font-size: .9rem; }
.sm-results { max-height: 60vh; overflow-y: auto; padding: 8px; }
.sm-hint, .sm-empty { color: var(--muted); text-align: center; padding: 28px 16px; font-size: .92rem; }
.sr-item { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 12px; transition: background .12s; }
.sr-item:hover, .sr-item:focus { background: var(--surface-2); outline: none; }
.sr-emoji { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; font-size: 1.25rem; background: color-mix(in srgb, var(--ac) 16%, var(--surface)); flex: none; }
.sr-body { min-width: 0; flex: 1; }
.sr-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-sub { font-size: .8rem; color: var(--muted); }
.sr-app { font-size: .74rem; font-weight: 700; color: color-mix(in srgb, var(--ac) 82%, #000); flex: none; }
.sr-more { text-align: center; color: var(--muted); font-size: .82rem; padding: 10px; }

/* Auth panel */
.auth-panel, .share-panel { width: min(420px, 100%); padding: 30px 26px 24px; text-align: center; }
.auth-x { position: absolute; top: 14px; right: 14px; }
.auth-logo { font-size: 2.4rem; margin-bottom: 6px; }
.auth-title { font-size: 1.4rem; font-weight: 800; margin: 0 0 6px; }
.auth-sub { color: var(--muted); font-size: .92rem; margin: 0 0 20px; }
.auth-btns { display: flex; flex-direction: column; gap: 10px; }
.social { display: flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 12px; padding: 14px; font: inherit; font-weight: 700; font-size: 1rem; cursor: pointer; transition: .15s; }
.social:hover { filter: brightness(.97); transform: translateY(-1px); }
.social .si { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; font-weight: 800; font-size: .9rem; }
.social.kakao { background: #FEE500; color: #191600; }
.social.kakao .si { background: #191600; color: #FEE500; }
.social.google { background: #fff; color: #1f1f1f; border: 1px solid #dadce0; }
.social.google .si { background: #fff; color: #4285F4; border: 1px solid #dadce0; }
@media (prefers-color-scheme: dark) { .social.google { background: #1f1f24; color: #eee; border-color: #3a3a44; } .social.google .si { background: #fff; } }
.auth-note { color: var(--muted); font-size: .76rem; margin: 16px 0 0; }
.auth-note a { color: var(--brand); }

/* Share */
.share-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 10px; margin-top: 18px; }
.share-item { display: flex; flex-direction: column; align-items: center; gap: 7px; border: 1px solid var(--border); background: var(--surface); border-radius: 14px; padding: 14px 8px; cursor: pointer; font: inherit; font-size: .82rem; font-weight: 600; color: var(--text); transition: .14s; }
.share-item:hover { border-color: var(--brand); background: var(--surface-2); transform: translateY(-2px); }
.share-item .se { font-size: 1.5rem; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(20px); background: #15131f; color: #fff; padding: 12px 20px; border-radius: 999px; font-size: .9rem; font-weight: 600; z-index: 200; box-shadow: var(--shadow-lg); opacity: 0; transition: .2s; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast[hidden] { display: block; }

@media (max-width: 680px) {
  .main-nav { display: none; }
  .icon-btn .ib-label { display: none; }
  .hero { padding: 54px 0 42px; }
}
