:root {
  --bg: #fbf6f2; --card: #ffffff; --ink: #2b2320; --sub: #8a7b74; --line: #efe4dd; --soft: #fdeee9;
  --me: #3b82f6; --her: #ec6f8e; --both: #f59e0b; --ok: #16a34a; --alt: #84cc16; --paper: #fffbea;
  --cat-음식: #ef4444; --cat-카페: #a16207; --cat-숙박: #7c3aed; --cat-여행: #0ea5e9;
  --cat-액티비티: #16a34a; --cat-체험: #f97316; --cat-캠핑: #15803d; --cat-기타: #64748b;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b1715; --card: #262120; --ink: #f3ece8; --sub: #a8988f; --line: #3a312e; --soft: #33261f; --paper: #3a3322;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] { --bg: #1b1715; --card: #262120; --ink: #f3ece8; --sub: #a8988f; --line: #3a312e; --soft: #33261f; --paper: #3a3322; color-scheme: dark; }

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: -apple-system, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", sans-serif; -webkit-tap-highlight-color: transparent; }
button, input, textarea, select { font: inherit; color: inherit; }
.app { max-width: 480px; margin: 0 auto; min-height: 100vh; padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); }

header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
header h1 { font-size: 20px; margin: 0; }
.heart { color: var(--her); }
.sub, .muted { color: var(--sub); font-size: 13px; }
.head-right { display: flex; gap: 6px; align-items: center; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 5px 10px; font-size: 13px; cursor: pointer; }
.icon-btn { background: none; border: 0; font-size: 20px; cursor: pointer; padding: 4px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin-bottom: 12px; }
.card h2 { font-size: 15px; margin: 0 0 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.row { display: flex; gap: 10px; }
.half { flex: 1; min-width: 0; }
.who { font-weight: 700; font-size: 13px; }
.me { color: var(--me); } .her { color: var(--her); } .both { color: var(--both); }
.emo { font-size: 30px; line-height: 1.3; }
.bar { height: 10px; background: var(--line); border-radius: 6px; overflow: hidden; margin: 6px 0 2px; }
.bar > i { display: block; height: 100%; border-radius: 6px; transition: width .3s; }
.pill { display: inline-block; font-size: 12px; padding: 3px 8px; border-radius: 99px; background: var(--soft); }
.btn { border: 0; border-radius: 12px; padding: 10px 14px; background: var(--ink); color: var(--bg); font-weight: 600; cursor: pointer; }
.btn.ghost { background: var(--soft); color: var(--ink); }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .5; }
.link-btn { background: none; border: 0; color: var(--sub); font-size: 12px; cursor: pointer; padding: 2px 4px; text-decoration: underline; }
.soft-box { font-size: 13px; padding: 10px; border-radius: 12px; background: var(--soft); margin-top: 8px; }

input[type=text], input[type=email], input[type=date], input[type=number], input[type=url], textarea, select {
  width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--bg);
}
textarea { min-height: 72px; resize: vertical; }
label.field { display: block; margin: 10px 0 4px; font-size: 13px; color: var(--sub); }

.moods { display: flex; justify-content: space-between; margin: 6px 0 10px; }
.moods button { font-size: 28px; background: none; border: 2px solid transparent; border-radius: 12px; padding: 4px 6px; cursor: pointer; }
.moods button.on { border-color: var(--her); background: var(--soft); }
.entry { border-top: 1px solid var(--line); padding: 10px 0; }
.entry:first-child { border-top: 0; padding-top: 0; }
.entry .note { margin: 4px 0; white-space: pre-wrap; word-break: break-word; }
.cmt { font-size: 13px; color: var(--sub); margin-top: 2px; }
.cmt-form { display: flex; gap: 6px; margin-top: 6px; }
.cmt-form input { padding: 6px 10px; font-size: 13px; }
.cmt-form button { padding: 6px 10px; font-size: 13px; }

.dots { display: flex; gap: 6px; margin-top: 6px; }
.dots span { width: 34px; height: 34px; border-radius: 9px; background: var(--line); font-size: 12px; display: grid; place-items: center; color: var(--sub); }
.dots span.done { background: var(--ok); color: #fff; }
.dots span.alt { background: var(--alt); color: #fff; }
.dots span.today { outline: 2px solid var(--ink); outline-offset: 1px; }
.check { min-width: 44px; height: 44px; border-radius: 12px; border: 2px solid var(--line); background: none; font-size: 18px; cursor: pointer; color: var(--ok); font-weight: 700; flex: none; }
.check.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.check.alt-on { background: var(--alt); border-color: var(--alt); color: #fff; font-size: 13px; }

.install-card { border-color: var(--me); }
.hero-row { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 12px; }
.hero-row .dday { font-size: 36px; }
.hero-row .muted { text-align: right; font-size: 12px; }
.next-event { border-color: var(--her); background: linear-gradient(135deg, var(--soft), var(--card)); }
.ev-title { font-size: 17px; font-weight: 700; margin-top: 2px; cursor: pointer; }
.topic-card { font-size: 14px; cursor: pointer; }
.mood-cell { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; background: var(--soft); border: 0; border-radius: 14px; padding: 10px 12px; cursor: pointer; text-align: left; }
.mood-cell .emo { font-size: 26px; }

.day-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; cursor: pointer; }
.day-row + .day-row { border-top: 1px dashed var(--line); }
.day-row .time { width: 44px; flex: none; font-weight: 700; font-size: 15px; text-align: center; line-height: 1.1; }
.day-row .time small { display: block; font-size: 10px; color: var(--sub); font-weight: 500; }
.day-row .t { flex: 1; min-width: 0; }
.who-checks { display: flex; gap: 6px; }
.pcheck { width: 42px; height: 42px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0; line-height: 1; }
.pcheck .pname { font-size: 10px; font-weight: 700; }
.pcheck.me .pname { color: var(--me); } .pcheck.her .pname { color: var(--her); }
.pcheck .pico { font-size: 15px; font-weight: 800; height: 16px; }
.pcheck.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.pcheck.on .pname { color: #fff; }
.pcheck.late { border-color: #f87171; color: #ef4444; background: var(--soft); }
.info-chip { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: var(--soft); white-space: nowrap; }
.info-chip.me { color: var(--me); } .info-chip.her { color: var(--her); }
.pcheck.skip { background: var(--line); color: var(--sub); }
.pcheck.both { width: 56px; } .pcheck.both .pname { color: var(--text, inherit); background: linear-gradient(90deg, var(--me), var(--her)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pcheck.both.on .pname { color: #fff; background: none; }

.memo-add { display: flex; gap: 6px; }
.memo-add input { flex: 1; }
.memo-list { margin-top: 6px; }
.memo-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.memo-item .box { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--sub); background: none; cursor: pointer; font-size: 13px; color: #fff; padding: 0; flex: none; }
.memo-item.done .box { background: var(--ok); border-color: var(--ok); }
.memo-item.done .txt { color: var(--sub); text-decoration: line-through; }
.memo-item .txt { flex: 1; min-width: 0; word-break: break-word; }
.memo-item .bullet { color: var(--sub); }
.memo-item .by { font-size: 11px; font-weight: 700; }
.memo-item .by.me { color: var(--me); } .memo-item .by.her { color: var(--her); }
.memo-item .x { background: none; border: 0; color: var(--sub); font-size: 18px; cursor: pointer; padding: 0 4px; }

.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.cal-head .icon-btn { font-size: 24px; padding: 0 10px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.cal-grid.dow span { font-size: 11px; color: var(--sub); padding: 4px 0; }
.cal-grid .day { aspect-ratio: 1; border: 0; background: none; border-radius: 10px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0; }
.cal-grid .day .n { font-size: 14px; }
.cal-grid .day.today .n { font-weight: 800; color: var(--her); }
.cal-grid .day.sel { background: var(--ink); color: var(--bg); }
.cal-grid .day.sel .n { color: var(--bg); }
.marks { display: flex; gap: 2px; height: 7px; align-items: center; }
.marks i, .cal-legend i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; }
i.ev { background: var(--her); }
i.md { background: var(--me); }
i.ring { background: conic-gradient(var(--ok) calc(var(--p) * 1%), var(--line) 0); width: 7px; height: 7px; }
.cal-legend { margin-top: 8px; font-size: 11px; display: flex; gap: 6px; align-items: center; justify-content: center; }
.routine { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; cursor: pointer; flex-wrap: wrap; }
.routine + .routine { border-top: 1px dashed var(--line); }
.dow-pick { display: flex; gap: 4px; }
.dow-pick button { flex: 1; border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 8px 0; cursor: pointer; }
.dow-pick button.on { background: var(--ink); color: var(--bg); }
.toggle { display: block; font-size: 13px; line-height: 1.5; }
input[type=time] { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--bg); }

#alert { border-radius: 22px; margin: auto; max-width: 360px; width: calc(100% - 32px); }
#alertBody { padding: 22px 18px; text-align: center; display: grid; gap: 8px; }
#alertBody h3 { margin: 0; font-size: 18px; }
.al-icon { font-size: 44px; animation: shake .6s 2; }

.hero { text-align: center; padding: 22px 16px; background: linear-gradient(135deg, var(--soft), var(--card)); }
.dday { font-size: 44px; font-weight: 800; letter-spacing: -1px; background: linear-gradient(90deg, var(--me), var(--her)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.topic { background: var(--soft); border-radius: 12px; padding: 10px 12px; font-size: 14px; }

.batt { display: flex; align-items: center; gap: 2px; margin-top: 6px; }
.batt-body { position: relative; flex: 1; height: 22px; border: 2px solid var(--sub); border-radius: 7px; padding: 2px; overflow: hidden; }
.batt-body i { display: block; height: 100%; border-radius: 4px; transition: width .3s; }
.batt-body i.low { background: #f87171; } .batt-body i.mid { background: #fbbf24; } .batt-body i.hi { background: #84cc16; } .batt-body i.full { background: var(--ok); }
.batt-body span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.batt-cap { width: 4px; height: 9px; background: var(--sub); border-radius: 0 2px 2px 0; }
.score-col { text-align: center; }
.big { font-size: 34px; font-weight: 800; line-height: 1.1; margin-top: 2px; }
.big small { font-size: 16px; font-weight: 600; color: var(--sub); }
.wish { font-size: 13px; margin-top: 8px; }
.sec { font-size: 12px; font-weight: 700; margin: 14px 0 4px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.sec:first-child { margin-top: 0; }
.goal { display: flex; align-items: center; gap: 12px; padding: 10px 0; cursor: pointer; }
.goal + .goal { border-top: 1px dashed var(--line); }
.goal .t { flex: 1; min-width: 0; }
.goal .chev { color: var(--sub); font-size: 22px; }
#calCard .day-title { margin: 14px 0 6px; padding-top: 12px; border-top: 1px solid var(--line); }
#calCard .cal-grid .day { aspect-ratio: auto; height: 40px; }
details summary { cursor: pointer; }
.gauges { display: flex; gap: 10px; }
.gauge { flex: 1; display: flex; align-items: center; gap: 4px; }
.gauge .batt { flex: 1; margin-top: 4px; }
.gauge .batt-body { height: 18px; }

.saju { padding: 10px 0; display: grid; gap: 4px; font-size: 14px; }
.saju + .saju { border-top: 1px solid var(--line); }
.saju-theme { font-weight: 700; font-size: 15px; margin-top: 2px; }
.luck-line { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; }

.cookie { font-size: 84px; text-align: center; cursor: pointer; user-select: none; transition: transform .2s; }
.cookie:active { transform: scale(.9) rotate(-8deg); }
.cookie.shake { animation: shake .5s; }
@keyframes shake { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
.paper { background: var(--paper); border-radius: 12px; padding: 14px; margin-top: 8px; border: 1px dashed #e2c46a; animation: pop .35s; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.seg { display: flex; background: var(--soft); border-radius: 12px; padding: 3px; gap: 3px; margin-bottom: 10px; }
.seg button { flex: 1; white-space: nowrap; border: 0; background: none; border-radius: 9px; padding: 7px 0; cursor: pointer; font-size: 13px; }
.seg button.on { background: var(--card); font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.cats { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 8px; scrollbar-width: none; }
.cats button { flex: none; border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 5px 10px; font-size: 13px; cursor: pointer; }
.cats button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
#map { width: 100%; height: 280px; border-radius: 14px; overflow: hidden; background: var(--soft); display: grid; place-items: center; text-align: center; color: var(--sub); font-size: 13px; }
#map.nokey { height: auto; padding: 16px; }
.place { display: flex; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); align-items: flex-start; }
.place:first-child { border-top: 0; padding-top: 0; }
.place .dot { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; flex: none; color: #fff; }
.place .t { flex: 1; min-width: 0; }
.place .name { font-weight: 700; }
.place.visited .name { color: var(--sub); }
.place a { color: var(--sub); font-size: 12px; }
.marker { padding: 4px 8px; border-radius: 99px; color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,.25); transform: translate(-50%, -100%); }
.marker.visited { opacity: .55; }
.lf-marker { background: none; border: 0; }
.lf-marker .marker { display: inline-block; }
.leaflet-popup-content .map-info { padding: 0; }
#map .leaflet-control-attribution { font-size: 9px; line-height: 1.2; padding: 0 4px; background: rgba(255,255,255,.55); color: #777; }
.menu-line { font-size: 12.5px; color: var(--text, inherit); margin-top: 2px; }
details.more { margin-top: 10px; } details.more summary { color: var(--sub); font-size: 13px; cursor: pointer; }
.drop { border: 2px dashed var(--line); border-radius: 14px; padding: 14px; text-align: center; color: var(--sub); font-size: 13px; cursor: pointer; }
.drop img { max-width: 100%; max-height: 160px; border-radius: 10px; margin-top: 8px; }
.cand { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-top: 8px; }

nav.tabs { position: fixed; bottom: 0; left: 0; right: 0; background: var(--card); border-top: 1px solid var(--line); display: flex; justify-content: center; padding-bottom: env(safe-area-inset-bottom); z-index: 10; }
nav.tabs div { display: flex; max-width: 480px; width: 100%; }
nav.tabs button { flex: 1; background: none; border: 0; padding: 9px 0 12px; font-size: 11px; color: var(--sub); cursor: pointer; }
nav.tabs button span { display: block; font-size: 20px; }
nav.tabs button.on { color: var(--ink); font-weight: 700; }

dialog { border: 0; border-radius: 20px 20px 0 0; padding: 0; width: 100%; max-width: 480px; margin: auto auto 0; background: var(--card); color: var(--ink); max-height: 88vh; }
dialog::backdrop { background: rgba(0,0,0,.4); }
#sheetBody { padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); overflow-y: auto; max-height: 88vh; }
#sheetBody h3 { margin: 0 0 8px; }
#toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 99px; font-size: 13px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 20; max-width: calc(100% - 32px); text-align: center; }
#toast.show { opacity: 1; }
.empty { text-align: center; color: var(--sub); font-size: 13px; padding: 12px 0; }
.lock { text-align: center; padding: 30px 10px; }

.pos-cand { display: block; width: 100%; text-align: left; background: var(--card); cursor: pointer; margin-top: 6px; }
.map-info { padding: 8px 10px; font-size: 13px; color: #222; background: #fff; border-radius: 8px; }
.map-info a { color: #03c75a; }

/* ===== 놀이 ===== */
.game-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.game-grid button { border: 1px solid var(--line); background: var(--soft); border-radius: 14px; padding: 10px 2px; font-size: 11.5px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.game-grid button span { font-size: 24px; }
.game-log { margin-top: 10px; font-size: 13px; display: grid; gap: 3px; }
.game-log .me { color: var(--me); font-weight: 700; } .game-log .her { color: var(--her); font-weight: 700; }
.preset-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.preset-row .chip { white-space: nowrap; }
.wheel-wrap { position: relative; width: 240px; margin: 14px auto 6px; }
.wheel-pin { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); font-size: 22px; z-index: 2; color: var(--ink); }
#wheel { width: 240px; height: 240px; display: block; }
#wheel text { font-size: 11px; font-weight: 700; fill: #fff; paint-order: stroke; stroke: #0003; stroke-width: 2px; }
.game-result { text-align: center; font-size: 20px; min-height: 30px; margin: 8px 0; }
.game-result div { font-size: 15px; }
.ladder, .plinko { width: 100%; max-width: 320px; display: block; margin: 8px auto; }
.lad-line { stroke: var(--sub); stroke-width: 3; stroke-linecap: round; }
.lad-path { fill: none; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.lad-top { font-size: 13px; font-weight: 700; fill: var(--ink); } .lad-bot { font-size: 12px; fill: var(--ink); }
.peg { fill: var(--sub); } .ball { fill: #f43f5e; stroke: #fff; stroke-width: 2; }
.slot-t { font-size: 11px; font-weight: 700; fill: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips .chip.on { background: var(--ink); color: var(--card); border-color: var(--ink); }
.chips.no .chip.on { background: #ef4444; border-color: #ef4444; color: #fff; }
.menu-cands { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.cup { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; margin-top: 12px; }
.cup button { min-height: 110px; border-radius: 16px; border: 2px solid var(--line); background: var(--soft); font-size: 16px; font-weight: 700; cursor: pointer; padding: 10px; }
.cup button:active { transform: scale(.97); border-color: var(--her); }
.cup span { font-weight: 800; color: var(--sub); }
.cup-win { text-align: center; font-size: 30px; font-weight: 800; margin: 20px 0; }
.bal-list { display: grid; gap: 6px; }
.bal-list > div { padding: 8px 10px; border-radius: 12px; background: var(--soft); font-size: 14px; }
.bal-list > div.same { border: 1px solid var(--her); }
.bal-list .me { color: var(--me); } .bal-list .her { color: var(--her); }

/* ===== 서로 알아가기 ===== */
.tiny { font-size: 11.5px; }
.test-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.test-grid button { text-align: left; border: 1px solid var(--line); background: var(--soft); border-radius: 14px; padding: 12px; cursor: pointer; display: grid; gap: 2px; }
.test-grid button span { font-size: 24px; } .test-grid button small { color: var(--sub); font-size: 11.5px; }
.test-grid button.locked { opacity: .6; }
.quiz-alert { width: 100%; text-align: left; border: 1px solid var(--her); cursor: pointer; margin-bottom: 10px; }
.hist { display: grid; gap: 4px; }
.hist-row { text-align: left; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 8px 2px; cursor: pointer; font-size: 14px; }
.quiz-q { font-size: 18px; font-weight: 700; margin: 14px 0; }
.quiz-opts { display: grid; gap: 8px; } .quiz-opts.two button { min-height: 64px; }
.quiz-opts button { border: 2px solid var(--line); background: var(--soft); border-radius: 14px; padding: 14px; font-size: 15px; cursor: pointer; text-align: left; }
.quiz-opts button:active { border-color: var(--her); }
.score-big { text-align: center; font-size: 44px; font-weight: 800; margin: 10px 0 2px; }
.quiz-review { display: grid; gap: 6px; margin-top: 12px; font-size: 14px; }
.quiz-review > div { background: var(--soft); border-radius: 12px; padding: 8px 10px; }
.progress { height: 6px; border-radius: 9px; background: var(--line); overflow: hidden; } .progress i { display: block; height: 100%; background: var(--her); }
.type-card { background: var(--soft); border-radius: 14px; padding: 10px; text-align: center; } .type-card b { font-size: 24px; }
.type-card .me, .el-row .me, .month-flow .me, .saju-box .me { color: var(--me); font-weight: 700; } .type-card .her, .el-row .her, .month-flow .her, .saju-box .her { color: var(--her); font-weight: 700; }
.axis-bars { display: grid; gap: 8px; margin-top: 14px; font-size: 12.5px; }
.axis-bars > div { display: grid; grid-template-columns: 62px 1fr 62px; gap: 6px; align-items: center; } .axis-bars > div span:last-child { text-align: right; }
.axis-bars .bar { height: 10px; border-radius: 9px; background: color-mix(in srgb, var(--her) 30%, transparent); overflow: hidden; } .axis-bars .bar i { display: block; height: 100%; background: var(--me); }
.saju-box { background: var(--soft); border-radius: 14px; padding: 10px 12px; margin-top: 10px; display: grid; gap: 6px; font-size: 14px; }
.el-row { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; } .el-row > span:first-child { width: 34px; }
.el { font-size: 12px; padding: 2px 7px; border-radius: 99px; color: #fff; } .el.zero { opacity: .35; }
.el-목 { background: #16a34a; } .el-화 { background: #ef4444; } .el-토 { background: #a16207; } .el-금 { background: #64748b; } .el-수 { background: #2563eb; }
.month-flow { display: grid; gap: 3px; padding-top: 6px; border-top: 1px solid var(--line); }
.taste-ex { display: grid; gap: 6px; margin-top: 6px; } .taste-ex > div { display: flex; justify-content: space-between; gap: 6px; background: var(--soft); border-radius: 12px; padding: 8px 10px; font-size: 13.5px; align-items: center; }
.seg-mini { display: flex; gap: 3px; } .seg-mini b { font-size: 11px; padding: 3px 6px; border-radius: 8px; border: 1px solid var(--line); font-weight: 500; } .seg-mini b.on { background: var(--her); color: #fff; border-color: var(--her); }

/* ===== 기념일 ===== */
i.an { background: #f59e0b; }
.anniv-card { width: 100%; text-align: left; cursor: pointer; display: grid; gap: 6px; font: inherit; color: inherit; }
.anniv-card > div { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.anniv-card .dleft { color: var(--her); }
.anniv-list { display: grid; gap: 4px; margin-top: 10px; }
.anniv-list > div { display: grid; grid-template-columns: 1fr auto 52px; gap: 8px; padding: 7px 4px; border-bottom: 1px solid var(--line); font-size: 14px; }
.anniv-list b { text-align: right; color: var(--her); }
.anniv-day { background: color-mix(in srgb, #f59e0b 18%, transparent); border-radius: 12px; padding: 8px 10px; margin-bottom: 8px; font-size: 14px; }

/* ===== 근처 ===== */
.me-dot { width: 16px; height: 16px; border-radius: 50%; background: #2563eb; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(37,99,235,.25); transform: translate(-50%, -50%); }
.nearby-card { width: 100%; text-align: left; cursor: pointer; font: inherit; color: inherit; border-color: var(--her); }
.dist { color: var(--her); }

/* ===== 사진 · 버킷 ===== */
i.ph { background: #0ea5e9; }
.thumbs { display: flex; gap: 6px; overflow-x: auto; }
.thumb { flex: 0 0 auto; width: 72px; height: 72px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); padding: 0; background: var(--soft); cursor: pointer; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.add { font-size: 26px; color: var(--sub); }
.thumb.sm { width: 40px; height: 40px; border-radius: 8px; }
.day-photos { margin-top: 8px; }
.album { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.album > div { position: relative; } .album .thumb.big { width: 100%; height: auto; aspect-ratio: 1; }
.album span { position: absolute; left: 4px; bottom: 4px; font-size: 11px; color: #fff; background: #0008; border-radius: 6px; padding: 1px 5px; }
.viewer img { width: 100%; max-height: 62vh; object-fit: contain; border-radius: 12px; background: #000; display: block; }
#sheetBody .me { color: var(--me); } #sheetBody .her { color: var(--her); }
.bucket { display: grid; gap: 2px; margin-top: 8px; }
.b-row { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--line); }
.b-row > span:not(.muted) { flex: 1; cursor: pointer; }
.b-row.done > span { color: var(--sub); }
.b-check { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line); background: var(--card); cursor: pointer; flex: none; color: #fff; font-weight: 800; }
.b-check.on { background: var(--ok); border-color: var(--ok); }
#badd { white-space: nowrap; flex: none; }

/* ===== 게임 긴장감 ===== */
.snd { font-size: 16px; float: right; }
.wheel-pin.flick { animation: flick .12s ease-out; }
@keyframes flick { 0% { transform: translateX(-50%) rotate(-25deg); } 100% { transform: translateX(-50%) rotate(0); } }
#wheel { will-change: transform; }
#wheel g.win path, #wheel g.win circle { stroke: #fff; stroke-width: 5; filter: drop-shadow(0 0 6px #fff); }
.game-result.pop { animation: pop .5s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.peg.hit { fill: #fbbf24; r: 5; transition: r .1s; }
.slot.win rect { stroke: #fff; stroke-width: 3; filter: drop-shadow(0 0 8px #fbbf24); }
.lad-card rect { fill: var(--line); } .lad-card text { font-size: 12px; font-weight: 700; fill: var(--ink); }
.lad-card.open rect { fill: #fbbf24; animation: pop .45s cubic-bezier(.2,1.6,.4,1); transform-box: fill-box; transform-origin: center; }
.lad-card.open text { fill: #2b2320; }
#sheetBody { position: relative; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.confetti i { position: absolute; top: -20px; font-style: normal; animation: fall 2.2s ease-in forwards; }
@keyframes fall { to { transform: translate(var(--dx), 110vh) rotate(540deg); opacity: .2; } }
/* ===== 취향 맞추기 ===== */
.pill-list { display: flex; flex-wrap: wrap; gap: 6px; }
.quiz-opts.three { grid-template-columns: repeat(3, 1fr); } .quiz-opts.three button { text-align: center; }
.quiz-opts button.picked { border-color: var(--her); background: color-mix(in srgb, var(--her) 15%, var(--soft)); }

/* ===== 업데이트 노트 · 요청 ===== */
.notes { margin: 4px 0 6px; padding-left: 18px; font-size: 14px; display: grid; gap: 3px; }
.new-badge { background: var(--her); color: #fff; font-size: 10px; padding: 1px 6px; border-radius: 99px; }
.note-ver { border-bottom: 1px solid var(--line); padding: 8px 0; }
.fb-list { display: grid; gap: 8px; }
.fb-row { background: var(--soft); border-radius: 12px; padding: 9px 11px; font-size: 14px; display: grid; gap: 3px; }
.fb-st { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--line); }
.fb-st.doing { background: #fbbf24; color: #2b2320; } .fb-st.done { background: var(--ok); color: #fff; } .fb-st.wont { background: #94a3b8; color: #fff; }
.fb-reply { color: var(--sub); font-size: 13px; }

/* ===== 🎊 선혜 오는 날 ===== */
.welcome { position: fixed; inset: 0; z-index: 100; background: radial-gradient(circle at 50% 30%, #fff1f5, #fbcfe8 70%); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; text-align: center; color: #2b2320; overflow: hidden; transition: opacity .35s; }
.welcome.bye { opacity: 0; }
.w-gift { cursor: pointer; display: grid; gap: 6px; animation: wiggle 1.2s ease-in-out infinite; }
.w-env { font-size: 84px; }
@keyframes wiggle { 0%,100% { transform: rotate(0); } 20% { transform: rotate(-6deg) scale(1.04); } 40% { transform: rotate(6deg) scale(1.04); } 60% { transform: rotate(0); } }
.w-drum { font-size: 26px; font-weight: 800; animation: pulse .25s ease-in-out infinite alternate; }
@keyframes pulse { to { transform: scale(1.12); } }
.w-banner { position: relative; width: min(92vw, 420px); animation: unroll .9s cubic-bezier(.2,1.4,.4,1) both; transform-origin: top center; }
@keyframes unroll { from { transform: scaleY(0) rotate(-3deg); } to { transform: scaleY(1) rotate(-2deg); } }
.w-rope { height: 6px; background: #8b5e34; border-radius: 3px; margin: 0 -10px; }
.w-cloth { background: #dc2626; color: #fff; border: 6px double #fde68a; border-radius: 6px; padding: 18px 10px 20px; box-shadow: 0 12px 30px rgba(220,38,38,.35); }
.w-small { font-size: 18px; letter-spacing: 4px; color: #fde68a; font-weight: 800; }
.w-big { font-size: clamp(34px, 11vw, 52px); font-weight: 900; letter-spacing: 2px; text-shadow: 0 3px 0 #991b1b; margin: 6px 0; }
.w-sub { font-size: 14px; opacity: .9; letter-spacing: 3px; }
.w-tassels { display: flex; justify-content: space-around; margin-top: -2px; }
.w-tassels i { width: 6px; height: 18px; background: #fde68a; border-radius: 0 0 3px 3px; }
.w-msg { font-size: 17px; line-height: 1.6; animation: pop .6s .5s both cubic-bezier(.2,1.6,.4,1); }
.w-ok { min-width: 180px; animation: pop .6s .9s both cubic-bezier(.2,1.6,.4,1); }
.welcome .confetti { position: absolute; }

/* ===== 🧩 루미 ===== */
.rm-entry { width: 100%; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-align: left; border: 0; background: linear-gradient(135deg, #166534, #15803d); color: #fff; border-radius: 18px; padding: 12px 14px; margin-bottom: 10px; cursor: pointer; box-shadow: 0 6px 16px #16653444; }
.rm-entry span { grid-row: span 2; font-size: 32px; } .rm-entry b { font-size: 16px; } .rm-entry small { color: #d1fae5; font-size: 12px; } .rm-entry .me, .rm-entry .her { color: #fde68a; }
.rummi { position: fixed; inset: 0; z-index: 90; color: #fff; display: flex; flex-direction: column; gap: 8px;
  padding: calc(8px + env(safe-area-inset-top)) 10px calc(10px + env(safe-area-inset-bottom));
  background: radial-gradient(120% 80% at 50% 30%, #1f7a4a, #0f3d26 75%), #0f3d26; font-family: inherit; }
.rm-top { display: flex; align-items: center; gap: 10px; }
.rm-x { width: 36px; height: 36px; border-radius: 50%; border: 0; background: #ffffff1f; color: #fff; font-size: 16px; cursor: pointer; flex: none; }
.rm-title { flex: 1; font-size: 18px; }
.rm-player { display: flex; align-items: center; gap: 8px; flex: 1; padding: 4px 10px 4px 4px; border-radius: 99px; background: #0000002e; border: 2px solid transparent; transition: .2s; }
.rm-player b { font-size: 14px; display: block; line-height: 1.1; } .rm-player small { font-size: 11px; color: #d1fae5; }
.rm-player.active { border-color: #fbbf24; background: #fbbf2422; box-shadow: 0 0 0 4px #fbbf2422; }
.rm-av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #fff; flex: none; }
.me .rm-av, .rm-player.me .rm-av { background: var(--me); } .her .rm-av, .rm-player.her .rm-av { background: var(--her); }
.rm-pool { background: #00000033; border-radius: 12px; padding: 6px 10px; font-weight: 700; font-size: 14px; }
.rm-guide { background: #00000033; border-radius: 14px; padding: 8px 12px; font-size: 14px; text-align: center; line-height: 1.5; }
.rm-guide.mine { background: linear-gradient(135deg, #fde68a, #fbbf24); color: #3b2a05; box-shadow: 0 4px 14px #fbbf2440; }
.rm-guide small { display: block; font-size: 11.5px; opacity: .75; }
.rm-guide.shake { animation: rmshake .35s; }
@keyframes rmshake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.rm-dots::after { content: '…'; animation: rmdots 1.2s steps(3) infinite; display: inline-block; width: 1em; overflow: hidden; vertical-align: bottom; }
@keyframes rmdots { from { width: 0; } to { width: 1em; } }
.rm-open { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 12px; }
.rm-bar { flex: 1; height: 8px; border-radius: 9px; background: #00000022; overflow: hidden; } .rm-bar i { display: block; height: 100%; background: #b45309; transition: width .3s; }
.rm-open b.ok { color: #15803d; }
.rm-table { flex: 1; overflow-y: auto; border-radius: 18px; padding: 10px; display: flex; flex-direction: column; gap: 8px;
  background: repeating-linear-gradient(45deg, #ffffff05 0 6px, transparent 6px 12px), #14532d; box-shadow: inset 0 3px 14px #0007, 0 0 0 3px #7c4a1e, 0 0 0 6px #5b3414; }
.rm-empty { margin: auto; text-align: center; color: #bbf7d0; font-size: 14px; padding: 20px; }
.rm-set { display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 12px; background: #00000026; border: 2px solid transparent; flex-wrap: wrap; transition: .15s; }
.rm-tiles { display: flex; flex-wrap: wrap; gap: 3px; }
.rm-set.bad { border-color: #f87171; background: #7f1d1d66; }
.rm-table.placing .rm-set { border-color: #fde68a99; box-shadow: 0 0 12px #fde68a44; }
.rm-why { width: 100%; font-size: 11.5px; color: #fecaca; }
.rm-plus { margin-left: auto; width: 40px; height: 48px; border-radius: 10px; border: 2px dashed #fde68a; background: #fde68a22; color: #fde68a; font-size: 22px; font-weight: 800; cursor: pointer; animation: rmpulse 1s ease-in-out infinite alternate; }
@keyframes rmpulse { to { background: #fde68a55; } }
.rm-newset { border: 2px dashed #ffffff55; background: none; color: #ffffffb0; border-radius: 12px; padding: 12px; cursor: pointer; font-size: 14px; flex: none; }
.rm-newset.ready { border-color: #fde68a; color: #3b2a05; background: #fde68a; font-weight: 700; animation: rmpulse2 .9s ease-in-out infinite alternate; }
@keyframes rmpulse2 { to { box-shadow: 0 0 18px #fde68a99; } }
.rm-tile { position: relative; width: 34px; height: 46px; border-radius: 7px; border: 0; padding: 0; cursor: pointer; flex: none;
  background: linear-gradient(180deg, #fffdf5, #f3ead2); box-shadow: 0 3px 0 #cdbb8f, 0 4px 8px #0005; transition: transform .12s, box-shadow .12s; }
.rm-tile i { font-style: normal; font-weight: 900; font-size: 19px; font-family: "Arial Rounded MT Bold", "Apple SD Gothic Neo", sans-serif; }
.rm-tile::after { content: ''; position: absolute; left: 50%; bottom: 6px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: currentColor; opacity: .55; }
.rm-tile.c0 { color: #dc2626; } .rm-tile.c1 { color: #1d4ed8; } .rm-tile.c2 { color: #ca8a04; } .rm-tile.c3 { color: #111827; }
.rm-tile.joker { color: #db2777; background: linear-gradient(180deg, #fff1f7, #fbcfe8); } .rm-tile.joker::after { display: none; }
.rm-tile.sel { transform: translateY(-7px); box-shadow: 0 3px 0 #cdbb8f, 0 0 0 3px #fbbf24, 0 8px 14px #0006; }
.rm-tile.new { box-shadow: 0 3px 0 #cdbb8f, 0 0 0 2px #34d399, 0 4px 8px #0005; }
.rm-tile.just { box-shadow: 0 3px 0 #cdbb8f, 0 0 0 2px #f472b6, 0 0 10px #f472b6; }
.rm-me { background: linear-gradient(180deg, #8b5a2b, #6b4220); border-radius: 18px; padding: 8px; box-shadow: 0 -2px 12px #0005, inset 0 1px 0 #ffffff22; display: grid; gap: 8px; }
.rm-rack-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rm-rack-head .rm-player { flex: 0 1 auto; }
.rm-tools { display: flex; gap: 6px; }
.rm-chip { border: 0; border-radius: 99px; background: #ffffff26; color: #fff; padding: 6px 10px; font-size: 12.5px; cursor: pointer; }
.rm-rack { display: flex; flex-wrap: wrap; gap: 5px; padding: 8px; border-radius: 12px; background: #4a2c12; box-shadow: inset 0 3px 8px #0007; min-height: 64px; }
.rm-rack .rm-tile { width: 38px; height: 52px; } .rm-rack .rm-tile i { font-size: 21px; }
.rm-back { border: 2px dashed #fde68a; color: #fde68a; background: none; border-radius: 10px; padding: 0 10px; cursor: pointer; font-size: 13px; }
.rm-actions { display: flex; gap: 8px; }
.rm-btn { flex: 1; border: 0; border-radius: 14px; padding: 13px 10px; font-size: 15px; font-weight: 700; cursor: pointer; background: #ffffff26; color: #fff; }
.rm-btn.primary { background: linear-gradient(135deg, #fde68a, #f59e0b); color: #3b2a05; box-shadow: 0 4px 12px #f59e0b55; }
.rm-btn.primary.dim { opacity: .65; } .rm-btn:disabled { opacity: .35; }
.rm-btn.big { padding: 16px; font-size: 17px; } .rm-btn small { display: block; font-size: 12px; font-weight: 500; }
.rm-end { position: absolute; inset: 0; background: #0009; display: grid; place-items: center; z-index: 3; animation: pop .4s both; }
.rm-end-box { background: #fff; color: #2b2320; border-radius: 22px; padding: 24px 20px; width: min(86vw, 340px); display: grid; gap: 8px; text-align: center; }
.rm-end-box > b { font-size: 24px; } .rm-end-ic { font-size: 64px; }
.rm-end-box .rm-btn { color: #2b2320; background: #f1f1f1; } .rm-end-box .rm-btn.primary { background: linear-gradient(135deg, #fde68a, #f59e0b); }
.rm-lobby { flex: 1; overflow-y: auto; background: var(--card); color: var(--ink); border-radius: 20px; padding: 18px; display: grid; gap: 12px; align-content: start; }
.rm-score { display: flex; justify-content: center; align-items: center; gap: 18px; padding: 10px 0; }
.rm-score > div { display: grid; justify-items: center; gap: 4px; font-weight: 700; } .rm-score .rm-av { width: 44px; height: 44px; font-size: 18px; }
.rm-score b { font-size: 42px; line-height: 1; } .rm-score .vs { color: var(--sub); font-weight: 800; }
.rm-last { text-align: center; background: var(--soft); border-radius: 12px; padding: 8px; }
.rm-opt { font-size: 14px; }
.rm-lobby .rm-btn { background: var(--soft); color: var(--ink); } .rm-lobby .rm-btn.primary { background: linear-gradient(135deg, #fde68a, #f59e0b); color: #3b2a05; }
.rm-rules summary { cursor: pointer; font-weight: 700; } .rm-rules ol { padding-left: 20px; line-height: 1.7; font-size: 14px; }
.rm-howto { background: var(--soft); border-radius: 12px; padding: 8px 10px; font-size: 13.5px; }
.rm-hist { display: grid; gap: 4px; font-size: 14px; } .rm-hist > div { display: flex; gap: 10px; border-bottom: 1px solid var(--line); padding: 5px 0; }
.rm-hist .me { color: var(--me); font-weight: 700; } .rm-hist .her { color: var(--her); font-weight: 700; }
.rm-note { font-size: 11.5px; color: var(--sub); }
.rummi .confetti { position: absolute; z-index: 4; }
@media (max-width: 360px) { .rm-tile { width: 30px; height: 42px; } .rm-rack .rm-tile { width: 34px; height: 48px; } }


/* 루미: 한눈에 보는 테이블 + 끌어서 놓기 */
.rm-table { flex-direction: row; flex-wrap: wrap; align-content: flex-start; align-items: flex-start; gap: 6px; --tw: 36px; overflow-y: auto; }
.rm-set { flex-wrap: nowrap; gap: 2px; padding: 4px; max-width: 100%; }
.rm-set .rm-tile { width: var(--tw); height: calc(var(--tw) * 1.32); border-radius: calc(var(--tw) * .2); }
.rm-set .rm-tile i { font-size: calc(var(--tw) * .55); }
.rm-set .rm-tile::after { width: calc(var(--tw) * .16); height: calc(var(--tw) * .16); bottom: calc(var(--tw) * .15); margin-left: calc(var(--tw) * -.08); }
.rm-set.over, .rm-newset.over, .rm-rack.over { outline: 3px solid #fde68a; box-shadow: 0 0 16px #fde68a88; background: #fde68a33; }
.rm-table.dragging .rm-set { border-color: #fde68a66; }
.rm-newset { height: calc(var(--tw) * 1.32 + 12px); min-width: calc(var(--tw) * 2.6); padding: 0 10px; display: grid; place-content: center; font-size: 13px; line-height: 1.2; }
.rm-newset small { display: block; font-size: 10px; opacity: .7; }
.rm-table.dragging .rm-newset { border-color: #fde68a; color: #fde68a; }
.rm-plus { width: calc(var(--tw) * 1.05); height: calc(var(--tw) * 1.32); margin-left: 2px; font-size: 18px; }
.rm-tile { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.rm-tile.lifting { opacity: .25; }
.rm-ghost { position: fixed; left: 0; top: 0; z-index: 10; display: flex; gap: 3px; pointer-events: none; filter: drop-shadow(0 10px 14px #0008); }
.rm-ghost .rm-tile { transform: rotate(-4deg) scale(1.12); }
.rm-rack.many .rm-tile { width: 32px; height: 44px; } .rm-rack.many .rm-tile i { font-size: 18px; }
.rm-empty { width: 100%; }

.rm-notice { position: fixed; left: 50%; top: calc(64px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 95; background: #fff; color: #2b2320; padding: 12px 18px; border-radius: 16px; box-shadow: 0 10px 30px #0006; font-size: 15px; white-space: nowrap; animation: rmpoke .5s cubic-bezier(.2,1.6,.4,1), rmshake .4s .5s 2; transition: opacity .4s; }
.rm-notice.bye { opacity: 0; }
@keyframes rmpoke { from { transform: translate(-50%, -30px) scale(.6); opacity: 0; } to { transform: translate(-50%, 0) scale(1); opacity: 1; } }
