/* Love Capsule v4 (2026-11-20): no-zoom phone, sidebar desktop, presence,
   counter, today, calendar, music, profiles, shows, socials, themes,
   stickers, games. Loaded after style.css. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { touch-action: manipulation; overscroll-behavior-y: none; }
input, textarea, select { font-size: 16px !important; }      /* iOS zooms on focus below 16px */
button { touch-action: manipulation; }

/* nav: phone = 5 tabs + More; wide = full sidebar */
.tab.extra { display: none; }
.tab { position: relative; }
.badge { position: absolute; top: 2px; right: 8px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--rose);
  color: #fff; font-size: 10px; font-style: normal; font-weight: 800; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px #241a2b; }
.badge.dot-only { min-width: 9px; width: 9px; height: 9px; padding: 0; top: 6px; right: 14px; }
.more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.more-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 6px; border-radius: 18px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .05); font-weight: 700; font-size: 13.5px; color: var(--t2); }
.more-item.on { border-color: rgba(255, 143, 189, .6); color: #fff; }
.more-ico { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: var(--sweet); color: #2a0f22; }
.more-item .badge { top: 8px; right: 12px; }
@media (min-width: 760px) and (max-width: 999px) { .tab.more { display: flex; } }

/* header presence */
.top-r { gap: 4px; }
.pres { position: relative; background: none; border: 0; padding: 2px; border-radius: 50%; }
.pdot { position: absolute; right: 1px; bottom: 1px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--bg); background: #6b5a68; }
.pdot.online { background: #4ade80; animation: pulse 2s infinite; }
.pdot.away { background: #fbbf24; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, .55); } 70% { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }
.av.ph { background-size: cover; background-position: center; box-shadow: 0 0 0 2px var(--pc, #8e8e93); }
.live-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--t4); margin-top: 2px; }
.live-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #6b5a68; }
.live-chip.online { color: #86efac; }
.live-chip.online::before { background: #4ade80; animation: pulse 2s infinite; }
.live-chip.away { color: #fcd34d; }
.live-chip.away::before { background: #fbbf24; }
.rain { position: fixed; top: -30px; z-index: 75; pointer-events: none; animation: rain linear forwards; }
.rain svg { width: 100%; height: 100%; fill: currentColor; }
@keyframes rain { to { transform: translateY(110vh) rotate(200deg); } }

/* who cards (status) */
.who-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.who-card { text-align: left; padding: 13px 14px; border-radius: 20px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .025)), var(--panel); min-width: 0; color: inherit; }
.who-card.mine:hover { border-color: rgba(255, 143, 189, .4); }
.who-top { display: flex; align-items: center; gap: 9px; }
.who-st { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; font-size: 14px; font-weight: 700; color: var(--t1); min-height: 22px; }
.who-st em { font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--t5); }
.st-emo { font-size: 18px; }
.st-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.st-opt { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 16px; border: 1px solid rgba(255, 182, 214, .12); background: rgba(255, 255, 255, .05); font-size: 12px; font-weight: 700; color: var(--t2); }
.st-opt span { font-size: 22px; }
.st-opt.on { border-color: var(--pink); background: rgba(255, 143, 189, .16); }

/* live counter */
.counter-card { padding: 16px 16px 18px; margin-top: 12px; }
.counter-l { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: var(--t3); margin-bottom: 10px; }
.counter-l svg { color: var(--rose); fill: currentColor; }
.counter { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.cseg { text-align: center; padding: 10px 2px; border-radius: 14px; background: rgba(255, 255, 255, .06); }
.cseg b { display: block; font-size: 22px; font-weight: 800; line-height: 1.1; }
.cseg b.tick { animation: tick 360ms var(--ease); }
.cseg span { font-size: 10.5px; font-weight: 700; color: var(--t4); }
@keyframes tick { 0% { transform: translateY(-6px); opacity: .3; } 100% { transform: none; opacity: 1; } }
@media (max-width: 380px) { .cseg b { font-size: 18px; } .cseg span { font-size: 9.5px; } }

/* today */
.day-switch { display: flex; gap: 8px; justify-content: center; margin-bottom: 4px; }
.days-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 14px; }
.day-col { padding: 16px; }
.day-head { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.ring { width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: conic-gradient(var(--pink) calc(var(--p) * 1%), rgba(255, 255, 255, .08) 0); }
.ring span { width: 36px; height: 36px; border-radius: 50%; background: var(--panel); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; }
.add.slim { min-height: 44px; margin-bottom: 8px; }
.todos { display: flex; flex-direction: column; }
.todo { display: flex; align-items: center; gap: 11px; padding: 10px 2px; border-bottom: 1px solid rgba(255, 182, 214, .07); font-size: 15px; font-weight: 600; }
.todo:last-child { border-bottom: 0; }
.todo-t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.todo-t[data-edit] { cursor: pointer; }
.todo.done .todo-t { color: var(--t5); text-decoration: line-through; }
.tick-box { width: 24px; height: 24px; flex-shrink: 0; border-radius: 8px; border: 2px solid rgba(255, 182, 214, .4); background: none; display: flex; align-items: center; justify-content: center; color: #2a0f22; transition: background 140ms; }
.todo.done .tick-box { background: var(--sweet); border-color: transparent; }
.tick-box.ro { opacity: .8; }
.todo.locked { color: var(--t4); }
.empty.sm { padding: 14px 6px; font-size: 13.5px; }
.cheer { margin-top: 10px; text-align: center; font-weight: 800; color: #ffc2da; }
.cheer-btn { width: 100%; margin-top: 10px; }
.strike { text-decoration: line-through; color: var(--t5) !important; }

/* calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin: 2px 4px 12px; }
.cal-title { font-size: 19px; font-weight: 800; }
.cal-head .icon-btn { font-size: 24px; color: var(--t2); }
.cal-wrap { display: grid; grid-template-columns: 1fr; gap: 16px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 12px; }
.cal-dow { text-align: center; font-size: 11.5px; font-weight: 800; color: var(--t4); padding-bottom: 4px; }
.cal-cell { aspect-ratio: 1 / 1; border-radius: 12px; border: 0; background: rgba(255, 255, 255, .03); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-weight: 700; font-size: 14px; color: var(--t1); }
.cal-cell.out { opacity: .32; }
.cal-cell.today span { width: 26px; height: 26px; border-radius: 50%; background: var(--sweet); color: #2a0f22; display: flex; align-items: center; justify-content: center; }
.cal-cell.pick { outline: 2px solid var(--pink); outline-offset: -2px; background: rgba(255, 143, 189, .1); }
.cal-dots { display: flex; gap: 2px; height: 5px; }
.cal-dots b { width: 5px; height: 5px; border-radius: 50%; background: var(--c); }
.cal-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex-shrink: 0; margin: 0 11px; }
.ask.hint { width: 100%; text-align: left; margin-top: 16px; color: inherit; }
.ask.hint > svg { color: var(--pink); flex-shrink: 0; }

/* music */
.music-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.music-item { position: relative; border-radius: 16px; overflow: hidden; }
.music-item iframe { width: 100%; height: 352px; border: 0; display: block; border-radius: 16px; }
.music-item .x { position: absolute; top: 8px; right: 8px; background: rgba(0, 0, 0, .5); color: #fff; }

/* profiles + socials */
.prof-grid, .play-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.prof { padding: 18px; }
.prof-top { display: flex; align-items: center; gap: 12px; }
.prof-av .av { width: 64px; height: 64px; font-size: 26px; }
.prof-name { font-size: 20px; font-weight: 800; }
.prof-bio { margin-top: 10px; color: var(--t2); font-size: 14.5px; }
.soc-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.soc { width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .08); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 140ms; }
.soc:hover { background: rgba(255, 143, 189, .2); }
.soc-ico { width: 18px; height: 18px; filter: invert(1); opacity: .92; }
.soc-ico.generic { filter: none; display: flex; align-items: center; justify-content: center; color: var(--t1); }
.soc-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 8px; }
.soc-opt { height: 42px; border-radius: 12px; border: 1px solid rgba(255, 182, 214, .12); background: rgba(255, 255, 255, .05); display: flex; align-items: center; justify-content: center; }
.soc-opt.on { border-color: var(--pink); background: rgba(255, 143, 189, .18); }
#soc-edit .add { margin-top: 10px; }
#soc-edit .soc-ico { flex-shrink: 0; }
.soc-list { margin-top: 10px; border-radius: 12px; overflow: hidden; }
.soc-list .set-date { gap: 10px; }
.soc-list .set-date .dim { flex: 1; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-row { display: flex; align-items: center; gap: 10px; }
.photo-row .av { width: 56px; height: 56px; font-size: 22px; }
.theme-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.theme-sw { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border-radius: 16px; border: 1px solid rgba(255, 182, 214, .12); background: rgba(255, 255, 255, .04); font-size: 12px; font-weight: 700; color: var(--t2); }
.theme-sw i { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--a), var(--b)); }
.theme-sw.on { border-color: #fff; color: #fff; }

/* shows */
.cnt { font-style: normal; font-size: 12px; color: var(--t5); margin-left: 4px; }
.show-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.show { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 20px; border: 1px solid var(--line); background: var(--panel); text-align: left; color: inherit; min-width: 0; }
.show-art { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(120% 90% at 20% 10%, hsl(var(--h) 85% 72% / .9), transparent 60%), linear-gradient(135deg, hsl(var(--h) 60% 40%), hsl(calc(var(--h) + 60) 55% 28%)); }
.show-art span { font-size: 28px; font-weight: 800; color: rgba(255, 255, 255, .92); text-shadow: 0 2px 12px rgba(0, 0, 0, .25); }
.show-art em { position: absolute; top: 8px; right: 8px; font-style: normal; font-size: 11px; font-weight: 800; padding: 3px 7px; border-radius: 999px; background: rgba(0, 0, 0, .35); color: #fff; }
.show-t { font-size: 14.5px; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.show .stat { align-self: flex-start; }

/* stickers */
.sticker { position: absolute; width: 34px; height: 34px; opacity: .2; transform: rotate(var(--rot)); animation: bob 7s ease-in-out infinite; }
.sticker svg { width: 100%; height: 100%; }
@keyframes bob { 0%, 100% { transform: rotate(var(--rot)) translateY(0); } 50% { transform: rotate(var(--rot)) translateY(-8px); } }
@media (min-width: 1000px) { .sticker { width: 52px; height: 52px; opacity: .26; } }

/* games */
.score-card { padding: 16px; }
.score-l { text-align: center; font-weight: 800; color: var(--t3); }
.score-row { display: flex; align-items: center; justify-content: center; gap: 22px; margin: 12px 0 8px; }
.score-p { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.score-p .av { width: 46px; height: 46px; font-size: 18px; }
.score-p b { font-size: 26px; font-weight: 800; }
.score-p span { font-size: 12px; color: var(--t4); font-weight: 700; }
.score-vs { font-weight: 800; color: var(--t5); }
.score-mini { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--t4); font-weight: 700; }
.play-grid { margin-top: 4px; }
.game-card { padding: 16px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 12px; }
.ttt-msg { text-align: center; font-weight: 800; color: var(--t3); }
.ttt-msg.go { color: #fff; }
.ttt { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 300px; width: 100%; margin: 0 auto; }
.ttt-c { aspect-ratio: 1 / 1; border-radius: 18px; border: 1px solid rgba(255, 182, 214, .14); background: rgba(255, 255, 255, .05); display: flex; align-items: center; justify-content: center; }
.ttt.live .ttt-c:not(:disabled):hover { background: rgba(255, 143, 189, .14); }
.ttt-c.win { background: rgba(255, 143, 189, .25); border-color: var(--pink); }
.m-heart { width: 44%; height: 44%; color: var(--rose); animation: popin 260ms var(--ease); }
.m-heart svg { width: 100%; height: 100%; fill: currentColor; }
.m-star { font-style: normal; font-size: 38px; color: #ffd27a; animation: popin 260ms var(--ease); }
@keyframes popin { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
.q-list { display: flex; flex-direction: column; gap: 10px; }
.q-item { padding: 12px; border-radius: 16px; background: rgba(255, 255, 255, .05); }
.q-item.solved { background: rgba(126, 224, 181, .08); }
.q-ask { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; font-weight: 800; font-size: 15px; }
.q-del { background: none; border: 0; color: var(--t4); padding: 2px; }
.q-ans { margin-top: 6px; font-size: 13.5px; color: var(--t3); }
.q-ans b { color: var(--t1); }
.q-guess { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 8px; font-size: 14px; }
.q-guess em { font-style: normal; font-weight: 800; font-size: 12.5px; }
.g-right { color: #86efac; }
.g-close { color: #fcd34d; }
.g-wrong { color: #fca5a5; }
.grade { display: flex; gap: 6px; }
.chip.sm { padding: 5px 9px; font-size: 12px; }
.q-form { display: flex; flex-direction: column; gap: 8px; }
.q-form input { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 182, 214, .12); border-radius: 12px; padding: 12px 13px; outline: 0; color: var(--t1); }
.q-form input:focus { border-color: rgba(255, 143, 189, .6); }
#hc { width: 100%; max-width: 420px; aspect-ratio: 6 / 5; height: auto; margin: 0 auto; display: block; border-radius: 16px; touch-action: none; }
.hc-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13.5px; color: var(--t3); font-weight: 700; }
.hc-board { display: flex; gap: 16px; justify-content: center; font-size: 13px; color: var(--t3); font-weight: 700; }
.hc-board b { color: var(--t1); }
.tl-item.locked .tl-t { display: flex; align-items: center; gap: 6px; }

/* wide screens: sidebar + multi-column layouts (kept last so it wins) */
@media (min-width: 1000px) {
  .app { max-width: 1220px; display: grid; grid-template-columns: 220px minmax(0, 1fr); column-gap: 28px; padding: 26px 28px 48px; }
  .top { grid-column: 1 / -1; }
  .tabs { grid-column: 1; grid-row: 2; position: sticky; top: 20px; align-self: start; flex-direction: column; width: auto; margin: 0; padding: 8px; gap: 2px; border-radius: 22px; }
  .tab, .tab.extra { display: flex; flex-direction: row; justify-content: flex-start; gap: 10px; padding: 11px 14px; font-size: 14.5px; border-radius: 14px; width: 100%; }
  .tab svg { width: 18px; height: 18px; }
  .tab.more, .tab-pill { display: none; }
  .tab.on { background: linear-gradient(135deg, rgba(255, 143, 189, .28), rgba(195, 161, 255, .22)); }
  .tab:hover:not(.on) { background: rgba(255, 255, 255, .05); }
  .badge { position: static; margin-left: auto; box-shadow: none; }
  .view { grid-column: 2; grid-row: 2; min-width: 0; }
  .home-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .home-b > .sec-h:first-child { margin-top: 4px; }
  .days-grid, .prof-grid, .play-grid { grid-template-columns: 1fr 1fr; }
  .cal-wrap { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .show-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .music-grid { grid-template-columns: 1fr 1fr; }
  .cal-cell { aspect-ratio: auto; height: 72px; }
  .who-row { grid-template-columns: 1fr 1fr; }
}

/* shows: where you left off + quick +1 episode */
.left-off { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: #ffc2da; }
.ep-bump { align-self: flex-start; font-size: 12px; font-weight: 800; padding: 5px 10px; border-radius: 999px; background: rgba(255, 143, 189, .16); color: var(--t1); cursor: pointer; }
.ep-bump:active { background: rgba(255, 143, 189, .35); }

/* more colors: 24 themes in a scrolling grid, custom pickers */
.theme-row { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
.custom-theme { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 12px; border-radius: 16px; border: 1px solid rgba(255, 182, 214, .12); background: rgba(255, 255, 255, .04); font-weight: 700; font-size: 13px; }
.custom-theme.on { border-color: #fff; }
.custom-theme > span { flex: 1; }
.cpick, .swatch.custom { position: relative; width: 32px; height: 32px; border-radius: 50%; overflow: hidden; cursor: pointer; flex-shrink: 0; }
.cpick input, .swatch.custom input { position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); border: 0; padding: 0; cursor: pointer; background: none; }
.swatch.custom { background: conic-gradient(#ff453a, #ffd60a, #30d158, #64d2ff, #a77bf3, #ff6f9f, #ff453a); }
.swatch.custom input { opacity: 0; }
.colors { flex-wrap: wrap; }
