/* SHIFT ON — design skins (html[data-skin]). Images: www/img/themes/ (cut from the user's own theme drawings). */

/* ---------- shared: classic layout with illustrated hero ---------- */
[data-skin] .hero .plant { display: none; }
[data-skin] .hero > * { position: relative; }
[data-skin="night"] .hero::before, [data-skin="sunset"] .hero::before, [data-skin="neon"] .hero::before {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 64%; background: var(--hero-img) right center / cover no-repeat;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 42%); mask-image: linear-gradient(to right, transparent 0, #000 42%);
}
[data-skin] .hero .today { max-width: 58%; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

/* ---------- 2. 라벤더 밤 ---------- */
:root[data-skin="night"] {
  --primary: #3D4BB0; --primary-weak: #E9EBFA; --primary-ink: #2C3890; --secondary: #6E56CF; --secondary-weak: #EFEAFB;
  --bg: #F1F2FB; --surface: #FFFFFF; --surface-2: #F6F6FD; --line: #E2E3F3; --ink: #1A1D3A; --ink-2: #3A3E63; --muted: #6E7192;
  --shadow: 0 6px 22px rgba(61, 75, 176, .08); --hero-img: url(../img/themes/hero-night.jpg);
}
[data-skin="night"] body { background: linear-gradient(180deg, #ECEEFB 0, #F4F2FC 60%, #F1F2FB 100%) fixed; }
[data-skin="night"] .topbar { background: #EEF0FB; }
[data-skin="night"] .hero { background: linear-gradient(135deg, #3445B0 0%, #5A5FC4 55%, #8A7AD0 100%); box-shadow: 0 14px 34px rgba(52, 69, 176, .28); }
[data-skin="night"] .logo-mark { background: linear-gradient(140deg, #4E5BD0, #7B68D8); }

/* ---------- 3. 노을 ---------- */
:root[data-skin="sunset"] {
  --primary: #A9472A; --primary-weak: #F8E3D8; --primary-ink: #8A3820; --secondary: #9C4D6E; --secondary-weak: #F5E2EA;
  --bg: #FBF4EE; --surface: #FFFBF8; --surface-2: #F8EEE7; --line: #EEDDD2; --ink: #2B1A14; --ink-2: #5A3D31; --muted: #8A7064;
  --shadow: 0 6px 22px rgba(169, 71, 42, .08); --hero-img: url(../img/themes/hero-sunset.jpg);
}
[data-skin="sunset"] .topbar { background: var(--bg); }
[data-skin="sunset"] .hero { background: linear-gradient(135deg, #A9472A 0%, #C46A43 50%, #DE9566 100%); box-shadow: 0 14px 34px rgba(169, 71, 42, .25); }
[data-skin="sunset"] .hero::before { width: 70%; }
[data-skin="sunset"] .logo-mark { background: linear-gradient(140deg, #B5532F, #D57A45); }
[data-skin="sunset"] .quick button .qi, [data-skin="sunset"] .quick button.purple .qi { background: #F6DCCF; color: #A9472A; }
[data-skin="sunset"] .bottom-nav button.active { background: #F8E3D8; }

/* ---------- 5. 네온 블루 (dark) ---------- */
:root[data-skin="neon"] {
  --primary: #3D7BFF; --primary-weak: #13265E; --primary-ink: #A9C4FF; --secondary: #7B6BFF; --secondary-weak: #1E1F5C;
  --bg: #060B1E; --surface: #0C1638; --surface-2: #101C45; --line: #22357A; --ink: #EEF3FF; --ink-2: #C5D2F2; --muted: #8C9CC8;
  --shadow: 0 0 0 1px rgba(64, 120, 255, .18), 0 8px 26px rgba(0, 0, 0, .45); --hero-img: url(../img/themes/hero-neon.jpg);
}
[data-skin="neon"] body { background: radial-gradient(120% 60% at 50% 0, #0D1D5A 0, #060B1E 60%) fixed; }
[data-skin="neon"] .topbar { background: #070D25; }
[data-skin="neon"] .hero { background: linear-gradient(135deg, #0B1F78 0%, #1638B8 55%, #2B5BEA 100%); border: 1px solid rgba(110, 160, 255, .55); box-shadow: 0 0 28px rgba(47, 107, 255, .35); }
[data-skin="neon"] .card, [data-skin="neon"] .quick button, [data-skin="neon"] .list-item {
  background: linear-gradient(180deg, rgba(24, 44, 120, .55), rgba(10, 20, 58, .7)); border: 1px solid rgba(80, 130, 255, .4); box-shadow: 0 0 18px rgba(47, 107, 255, .12);
}
[data-skin="neon"] .empty { background: rgba(10, 20, 58, .55); border-color: rgba(80, 130, 255, .45); }
[data-skin="neon"] .quick button .qi { background: linear-gradient(140deg, #2C64F0, #1C3FB8); color: #fff; box-shadow: 0 0 14px rgba(60, 120, 255, .5); }
[data-skin="neon"] .quick button.purple .qi { background: linear-gradient(140deg, #5B4EE8, #3A2FB0); color: #fff; }
[data-skin="neon"] .logo-mark { background: linear-gradient(140deg, #2F6BFF, #1A3FD0); box-shadow: 0 0 14px rgba(47, 107, 255, .6); }
[data-skin="neon"] .bottom-nav { background: rgba(6, 11, 30, .92); border-top-color: #1C2C66; }
[data-skin="neon"] .bottom-nav button.active { color: #5C93FF; text-shadow: 0 0 10px rgba(80, 140, 255, .7); }

/* ---------- cartoon layout (1. 노랑 헬멧 · 4. 민트 그린) ---------- */
:root[data-skin="helmet"] {
  --brand: #FFD43B; --brand-2: #F7C21A; --brand-ink: #1E1E1E; --head-bg: #2B2A2B; --head-ink: #fff; --head-accent: #FFD43B;
  --primary: #B88300; --primary-weak: #FFF3C4; --primary-ink: #7A5600; --secondary: #6E56CF; --secondary-weak: #EFEAFB;
  --bg: #FFF8E3; --surface: #FFFFFF; --surface-2: #FFFBEF; --line: #F1E6C4; --ink: #1E1E1E; --ink-2: #3D3A33; --muted: #77705F;
  --shadow: 0 6px 18px rgba(120, 90, 0, .08);
}
:root[data-skin="mint"] {
  --brand: #9BDE6A; --brand-2: #6FC63F; --brand-ink: #1F3A12; --head-bg: linear-gradient(180deg, #C8EEDD 0, #DDF5E9 100%); --head-ink: #1E3B2A; --head-accent: #3FAE2F;
  --primary: #3B9A2A; --primary-weak: #E3F6DA; --primary-ink: #2C7A1E; --secondary: #2F8F7A; --secondary-weak: #DDF3EE;
  --bg: #E9F8F1; --surface: #FFFFFF; --surface-2: #F3FBF7; --line: #D3EEE1; --ink: #17271E; --ink-2: #34483C; --muted: #66796D;
  --shadow: 0 6px 18px rgba(30, 110, 70, .08);
}
[data-skin="helmet"] .topbar, [data-skin="mint"] .topbar { background: var(--bg); }
[data-skin="mint"] body { background: linear-gradient(180deg, #DDF5E9 0, #E9F8F1 40%) fixed; }

.toon-head { position: relative; display: flex; align-items: center; gap: 8px; margin: calc(-8px - var(--safe-top)) -16px 0; padding: calc(var(--safe-top) + 14px) 10px 54px 14px; background: var(--head-bg); color: var(--head-ink); }
.toon-head::after { content: ''; position: absolute; left: -10%; right: -10%; bottom: -1px; height: 44px; background: var(--bg); border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
[data-skin="mint"] .toon-head::after { background: #E3F6EC; }
.toon-face { width: 54px; height: 54px; object-fit: contain; flex: none; }
.toon-logo { font-size: 25px; font-weight: 900; letter-spacing: -.5px; line-height: 1.05; font-style: italic; }
.toon-logo em { color: var(--head-accent); font-style: inherit; }
.toon-sub { font-size: 12.5px; opacity: .82; margin-top: 3px; font-weight: 600; }
.toon-head .icon-btn { color: var(--head-ink); z-index: 3; }
.toon-head .icon-btn svg.i { width: 26px; height: 26px; }
.toon-head .icon-btn .dot { border-color: transparent; }
.toon-hero { position: relative; margin-top: -28px; padding: 0 0 4px; z-index: 1; }
.toon-hero h2 { position: relative; font-size: 21px; font-weight: 900; letter-spacing: -.7px; max-width: 64%; line-height: 1.3; }
.toon-hero p { position: relative; font-size: 13.5px; color: var(--ink-2); margin-top: 6px; max-width: 62%; }
.toon-mascot { position: absolute; right: -8px; top: -50px; width: 138px; pointer-events: none; -webkit-mask-image: linear-gradient(#000 78%, transparent); mask-image: linear-gradient(#000 78%, transparent); }
.toon-today { position: relative; display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; background: var(--surface); border-radius: 999px; padding: 4px 12px 4px 4px; box-shadow: var(--shadow); font-size: 12.5px; font-weight: 700; color: var(--ink-2); max-width: 62%; }
.toon-today b { min-width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); font-weight: 900; font-size: 13px; }
.toon-today span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toon-big { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.toon-big button { position: relative; display: flex; align-items: center; gap: 10px; min-height: 96px; padding: 14px 12px; border-radius: 22px; text-align: left; background: var(--surface); box-shadow: var(--shadow); border: 2px solid color-mix(in srgb, var(--line) 70%, transparent); transition: transform .12s; }
.toon-big button.main { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border-color: transparent; color: var(--brand-ink); box-shadow: 0 10px 22px color-mix(in srgb, var(--brand-2) 35%, transparent); }
.toon-big button:active, .toon-tiles button:active { transform: scale(.97); }
.toon-big .ti svg.i { width: 40px; height: 40px; stroke-width: 1.7; }
.toon-big button:not(.main) .ti { color: var(--head-accent); }
[data-skin="helmet"] .toon-big button:not(.main) .ti { color: #E8B000; }
.toon-big b { display: block; font-size: 19px; font-weight: 900; letter-spacing: -.6px; }
.toon-big small { display: block; font-size: 12.5px; font-weight: 600; opacity: .8; margin-top: 2px; }
.toon-badge { position: absolute; top: -9px; right: -5px; min-width: 28px; height: 28px; border-radius: 14px; background: #EF3B3B; color: #fff; font-style: normal; font-size: 14px; font-weight: 900; display: grid; place-items: center; padding: 0 7px; border: 2px solid var(--surface); }
.toon-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.toon-tiles button { display: grid; justify-items: center; gap: 6px; padding: 14px 2px 12px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); transition: transform .12s; }
.toon-tiles svg.i { width: 30px; height: 30px; color: var(--ink); stroke-width: 1.8; }
.toon-tiles button:nth-child(1) svg.i, .toon-tiles button:nth-child(4) svg.i { color: #E8B000; }
[data-skin="mint"] .toon-tiles button:nth-child(2) svg.i { color: var(--primary); }
.toon-tiles span { font-size: 13px; font-weight: 800; letter-spacing: -.4px; }
.toon-feed { margin-top: 14px; padding: 14px 14px 6px; border-radius: 22px; }
.toon-feed .section-head { margin-bottom: 4px; }
.toon-feed h2 { display: flex; align-items: center; gap: 6px; font-size: 18px; }
.toon-feed h2 svg.i { width: 24px; height: 24px; color: #E8A500; }
.feed-row { display: flex; align-items: center; gap: 8px; width: 100%; padding: 11px 0; border-top: 1px solid var(--line); text-align: left; }
.feed-row .grow b { display: block; font-size: 13.5px; font-weight: 800; }
.feed-row .grow small { display: block; font-size: 12px; color: var(--muted); }
.feed-row.unread .grow b::after { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #EF3B3B; margin-left: 4px; vertical-align: 2px; }
.feed-row .ft { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.feed-row > svg.i { color: var(--muted); }
.fi { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.fl { font-size: 11.5px; font-weight: 800; padding: 3px 8px; border-radius: 999px; white-space: nowrap; flex: none; }
.fi.yellow, .fl.yellow { background: #FFF1BF; color: #8F6300; }
.fi.blue, .fl.blue { background: #E1EDFF; color: #1D5FD6; }
.fi.green, .fl.green { background: #DFF5E3; color: #1E8E3E; }
.fi.red, .fl.red { background: #FDE4E4; color: #D23030; }
.fi.violet, .fl.violet { background: #EFE5FD; color: #7A3FD6; }
@media (max-width: 370px) { .fl { display: none; } .toon-big b { font-size: 17px; } }

.bottom-nav.five { grid-template-columns: repeat(5, 1fr); padding-left: 8px; padding-right: 8px; }
[data-skin="helmet"] .bottom-nav, [data-skin="mint"] .bottom-nav { border-top: 0; border-radius: 24px 24px 0 0; box-shadow: 0 -6px 20px rgba(0, 0, 0, .06); }
.bottom-nav.five button { font-size: 12px; color: var(--ink-2); }
.bottom-nav.five button.active { background: var(--brand); color: var(--brand-ink); border-radius: 16px; }

/* theme picker */
.skin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.skin-opt { display: grid; justify-items: center; gap: 6px; padding: 10px 4px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.skin-opt i { width: 34px; height: 34px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.skin-opt.on { border-color: var(--primary); color: var(--ink); }
