/* ————— daile.love · 法式浪漫 ————— */
:root {
  --ivory: #f6f1e9;
  --paper: #fdfbf7;
  --paper-2: #f3ece1;
  --ink: #2b2226;
  --ink-soft: #5c4d54;
  --muted: #9b8a91;
  --bordeaux: #7a2e3b;
  --bordeaux-deep: #5e1f2b;
  --rose: #d9b6b9;
  --blush: #efdede;
  --gold: #b8956a;
  --gold-soft: #e2cfae;
  --line: rgba(122, 46, 59, .14);
  --shadow: 0 18px 50px -24px rgba(60, 30, 40, .35);
  --serif: "Didot", "Bodoni 72", "Playfair Display", "Cormorant Garamond", "Baskerville", "Libre Baskerville", "Times New Roman", "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", "Noto Serif SC", serif;
  --sans: -apple-system, "PingFang SC", "Helvetica Neue", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--serif);
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 15% -10%, #fbf6ee 0%, transparent 60%),
    radial-gradient(900px 600px at 110% 100%, #f1e3e0 0%, transparent 55%),
    var(--ivory);
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
a { color: var(--bordeaux); text-decoration: none; border-bottom: 1px solid var(--gold-soft); }
a:hover { border-color: var(--bordeaux); }
h1, h2, h3 { margin: 0; font-weight: 400; }
h3 { font-size: 1.15rem; letter-spacing: .02em; display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
h3 em { font-style: italic; color: var(--gold); font-size: .85rem; letter-spacing: .06em; }
code { font-family: ui-monospace, Menlo, monospace; background: var(--paper-2); padding: 2px 7px; border-radius: 3px; font-size: .85em; letter-spacing: .08em; }
.muted { color: var(--muted); font-size: .9rem; margin: 0; }
.empty-hint { color: var(--muted); text-align: center; padding: 14px; font-style: italic; }

/* 纸张颗粒 + 飘落花瓣 */
.grain { position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .35; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.petals { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.petals span {
  position: absolute; top: -30px; width: 14px; height: 18px; opacity: 0;
  background: radial-gradient(circle at 30% 30%, #f3d9d6, #dfb6b8);
  border-radius: 80% 0 80% 0; transform: rotate(20deg);
  animation: fall linear infinite;
}
@keyframes fall {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  8% { opacity: .55; }
  50% { transform: translate(40px, 50vh) rotate(180deg); }
  100% { transform: translate(-20px, 105vh) rotate(360deg); opacity: 0; }
}
.screen { position: relative; z-index: 1; }

/* ===== 登录卡片 ===== */
#auth { min-height: 100vh; display: grid; place-items: center; padding: 28px 16px; }
.auth-card { width: 100%; max-width: 440px; background: var(--paper); box-shadow: var(--shadow); padding: 10px; }
.frame { border: 1px solid var(--gold-soft); outline: 1px solid var(--gold-soft); outline-offset: 3px; padding: 36px 34px 30px; text-align: center; }
.eyebrow { margin: 0; font-style: italic; color: var(--gold); font-size: .85rem; letter-spacing: .12em; }
.wordmark { font-size: 2.6rem; letter-spacing: .04em; margin: 6px 0 0; line-height: 1.1; }
.wordmark i, .brand i { color: var(--bordeaux); font-style: italic; }
.tagline { color: var(--muted); margin: 6px 0 0; font-size: .95rem; letter-spacing: .12em; }
.ornament { color: var(--gold); font-size: 1.4rem; margin: 14px 0 18px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.auth-form .hint { text-align: center; margin: 0 0 4px; color: var(--ink-soft); }
.auth-form .hint b { font-weight: 400; font-size: 1.1rem; letter-spacing: .1em; color: var(--ink); }
.auth-form small { color: var(--muted); }
label { display: flex; flex-direction: column; gap: 5px; }
label > span { font-family: var(--sans); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
label > span em { font-family: var(--serif); text-transform: none; letter-spacing: .04em; color: var(--gold); margin-left: 4px; }
input, textarea, select {
  font: inherit; font-size: 1rem; color: var(--ink); background: transparent; border: none; border-bottom: 1px solid var(--line);
  padding: 8px 2px; outline: none; width: 100%; border-radius: 0; transition: border-color .2s;
}
input:focus, textarea:focus, select:focus { border-bottom-color: var(--bordeaux); }
textarea, select { border: 1px solid var(--line); padding: 10px 12px; background: var(--paper); }
input.code { text-align: center; font-size: 1.9rem; letter-spacing: .35em; padding: 6px 0; }
.qr { width: 190px; height: 190px; margin: 0 auto; border: 1px solid var(--line); padding: 8px; background: #fff; }
.secret { text-align: center; font-size: .82rem; color: var(--muted); word-break: break-all; margin: 0; }
.switch { text-align: center; color: var(--muted); font-size: .9rem; margin: 4px 0 0; }
.err { color: var(--bordeaux); font-size: .9rem; margin: 0; text-align: center; font-style: italic; }
.err:empty { display: none; }
.backup { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.backup li { font-family: ui-monospace, Menlo, monospace; border: 1px solid var(--line); padding: 8px; text-align: center; letter-spacing: .1em; font-size: .9rem; }
.backup:empty { display: none; }

/* ===== 按钮 ===== */
.btn {
  font-family: var(--sans); font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 500;
  cursor: pointer; border: 1px solid var(--bordeaux); background: transparent; color: var(--bordeaux);
  padding: 12px 22px; border-radius: 0; transition: background .2s, color .2s, transform .1s;
}
.btn:hover { background: var(--bordeaux); color: var(--paper); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--bordeaux); color: var(--paper); }
.btn.primary:hover { background: var(--bordeaux-deep); }
.btn.danger { border-color: var(--line); color: var(--muted); }
.btn.danger:hover { background: var(--blush); color: var(--bordeaux); }
.btn.small { padding: 7px 14px; font-size: .68rem; border-color: var(--line); color: var(--muted); }
.btn:disabled { opacity: .5; cursor: default; }
.icon { background: none; border: none; font-family: var(--serif); font-size: 1.8rem; color: var(--gold); cursor: pointer; padding: 0 12px; line-height: 1; }
.icon:hover { color: var(--bordeaux); }

/* ===== 主布局 ===== */
#app { max-width: 920px; margin: 0 auto; padding: 0 20px 60px; }
.top { display: flex; justify-content: space-between; align-items: baseline; padding: 26px 0 14px; }
.brand { font-size: 1.5rem; letter-spacing: .05em; }
.who { font-size: .85rem; color: var(--ink-soft); display: flex; gap: 6px; align-items: center; letter-spacing: .03em; }
.partner { color: var(--muted); }
.partner::before { content: '·'; margin: 0 6px; }
.partner.online { color: var(--bordeaux); }

.tabs { display: flex; justify-content: center; gap: 4px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px 0; position: sticky; top: 0; z-index: 5; background: rgba(246, 241, 233, .9); backdrop-filter: blur(8px); }
.tabs button {
  font: inherit; border: none; background: none; color: var(--ink-soft); cursor: pointer; position: relative;
  padding: 10px 16px; display: flex; flex-direction: column; align-items: center; gap: 0; line-height: 1.2; transition: color .2s;
}
.tabs button span { font-size: .95rem; letter-spacing: .12em; }
.tabs button em { font-size: .7rem; color: var(--gold); letter-spacing: .1em; }
.tabs button::after { content: ''; position: absolute; left: 50%; bottom: 2px; width: 0; height: 1px; background: var(--bordeaux); transition: width .25s, left .25s; }
.tabs button.active { color: var(--bordeaux); }
.tabs button.active::after { left: 16px; width: calc(100% - 32px); }
.tabs b { position: absolute; top: 6px; right: 4px; background: var(--bordeaux); color: #fff; font-family: var(--sans); font-size: .6rem; border-radius: 999px; padding: 1px 5px; font-weight: 500; }
main { padding-top: 26px; }
.tab { display: none; flex-direction: column; gap: 22px; }
.tab.active { display: flex; }
.card { background: var(--paper); border: 1px solid var(--line); padding: 24px 26px; box-shadow: var(--shadow); }
.card form, form.card { display: flex; flex-direction: column; gap: 14px; }
.msg { color: var(--gold); font-size: .9rem; margin-left: 10px; font-style: italic; }
.row { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.row > * { flex: 1; }
.row.end { justify-content: flex-end; }
.row.end > *, .row.start > * { flex: 0 0 auto; }
.row.start { align-items: center; }
.grow { flex: 3; }
.emoji-pick { flex: 0 0 70px; }
.emoji-pick input { text-align: center; font-size: 1.3rem; }
.check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink-soft); font-size: .95rem; }
.check input { width: auto; }
.foot { text-align: center; color: var(--gold); font-style: italic; font-size: .85rem; letter-spacing: .12em; margin-top: 40px; }

/* ===== 首页 ===== */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 22px; }
@media (max-width: 680px) { .hero { grid-template-columns: 1fr; } }
.together {
  background: var(--bordeaux); color: var(--paper); padding: 30px 28px; box-shadow: var(--shadow); text-align: center;
  display: flex; flex-direction: column; justify-content: center; min-height: 220px; position: relative;
}
.together::before { content: ''; position: absolute; inset: 10px; border: 1px solid rgba(226, 207, 174, .5); pointer-events: none; }
.together .sub { font-style: italic; color: var(--gold-soft); letter-spacing: .08em; }
.together .big { font-size: 4.6rem; line-height: 1; margin: 8px 0 4px; letter-spacing: -.02em; }
.together .unit { font-family: var(--sans); font-size: .7rem; letter-spacing: .3em; text-transform: uppercase; color: var(--gold-soft); }
.together.empty { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.together.empty::before { border-color: var(--gold-soft); }
.together.empty .sub { color: var(--muted); }
.upcoming ul, .memories, .events, .log { list-style: none; padding: 0; margin: 0; }
.upcoming li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.upcoming li:last-child { border: none; }
.upcoming li:hover, .events li:hover, .memories li:hover { color: var(--bordeaux); }
.upcoming .days { font-style: italic; color: var(--bordeaux); white-space: nowrap; }
.upcoming .days.today { background: var(--bordeaux); color: var(--paper); padding: 3px 12px; font-style: normal; font-family: var(--sans); font-size: .7rem; letter-spacing: .15em; text-transform: uppercase; }
.meta { color: var(--muted); font-size: .85rem; font-style: italic; }
.memories li, .events li { padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.memories li:last-child, .events li:last-child { border: none; }
.events b, .memories b { font-weight: 400; font-size: 1.05rem; }
.events .note, .memories .note { color: var(--ink-soft); font-size: .92rem; white-space: pre-wrap; margin-top: 4px; padding-left: 12px; border-left: 1px solid var(--gold-soft); }
.glyph { color: var(--bordeaux); margin-right: 6px; }

/* ===== 日历 ===== */
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cal-head h3 { margin: 0; padding: 0; border: none; font-size: 1.3rem; letter-spacing: .1em; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 18px; }
.cal-grid .dow { text-align: center; font-family: var(--sans); font-size: .65rem; letter-spacing: .15em; color: var(--gold); padding: 8px 0; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.cal-grid .day {
  aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: .95rem; cursor: pointer; position: relative; transition: background .15s; color: var(--ink-soft);
}
.cal-grid .day:hover { background: var(--blush); }
.cal-grid .day.other { opacity: .3; }
.cal-grid .day.today { color: var(--bordeaux); font-style: italic; }
.cal-grid .day.today::after { content: ''; position: absolute; inset: 6px; border: 1px solid var(--bordeaux); border-radius: 50%; }
.cal-grid .day.has { color: var(--bordeaux); }
.cal-grid .day .dots { font-size: .6rem; line-height: 1; margin-top: 3px; color: var(--gold); letter-spacing: 2px; }
.cal .btn { align-self: center; }

/* ===== 聊天 ===== */
.chat { display: flex; flex-direction: column; height: 70vh; min-height: 440px; padding: 16px; }
.chat-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 6px; }
.chat-log #chat-more { align-self: center; margin-bottom: 8px; }
.bubble { max-width: 76%; display: flex; gap: 10px; align-items: flex-end; }
.bubble .av { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--gold-soft); display: grid; place-items: center; font-size: .8rem; color: var(--bordeaux); flex: none; }
.bubble .body { background: var(--paper-2); padding: 10px 14px; white-space: pre-wrap; word-break: break-word; border: 1px solid var(--line); line-height: 1.55; }
.bubble .time { font-family: var(--sans); font-size: .65rem; color: var(--muted); margin: 0 6px 4px; letter-spacing: .05em; }
.bubble.mine { align-self: flex-end; flex-direction: row-reverse; }
.bubble.mine .body { background: var(--bordeaux); color: var(--paper); border-color: var(--bordeaux); }
.bubble.mine .av { display: none; }
.day-sep { align-self: center; font-style: italic; font-size: .8rem; color: var(--gold); margin: 8px 0; letter-spacing: .1em; }
.day-sep::before, .day-sep::after { content: ' — '; color: var(--gold-soft); }
.typing { height: 20px; font-size: .8rem; color: var(--muted); padding: 0 8px; font-style: italic; }
.chat-form { display: flex; gap: 12px; padding-top: 10px; border-top: 1px solid var(--line); align-items: center; }
.chat-form input { flex: 1; }

/* ===== 留言板 ===== */
.note-form textarea { resize: vertical; }
.note-form .row { align-items: center; }
.colors { display: flex; gap: 10px; flex: 0; }
.colors label { cursor: pointer; }
.colors input { display: none; }
.colors i { display: block; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); transition: transform .15s; }
.colors input:checked + i { outline: 1px solid var(--bordeaux); outline-offset: 3px; }
.c-pink { background: #f0dcdc; } .c-yellow { background: #f3e9cf; } .c-blue { background: #dfe6ea; } .c-green { background: #e1e8dc; } .c-purple { background: #e6dfe8; }
.notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.note {
  padding: 22px 20px 16px; position: relative; white-space: pre-wrap; word-break: break-word; min-height: 150px;
  box-shadow: var(--shadow); border: 1px solid rgba(0,0,0,.04); font-size: 1.05rem; line-height: 1.65;
  transform: rotate(var(--r, 0deg)); transition: transform .2s;
}
.note::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--gold-soft); }
.note:hover { transform: rotate(0) translateY(-2px); z-index: 2; }
.note.pink { background: #f5e6e6; } .note.yellow { background: #f6efdc; } .note.blue { background: #e8edf0; } .note.green { background: #e8eee3; } .note.purple { background: #ece6ee; }
.note .foot { display: flex; justify-content: space-between; margin-top: 16px; font-size: .75rem; color: var(--muted); font-style: italic; border-top: 1px solid rgba(0,0,0,.06); padding-top: 8px; }
.note .del { position: absolute; top: 8px; right: 10px; background: none; border: none; cursor: pointer; color: var(--muted); font-size: .9rem; }
.note .del:hover { color: var(--bordeaux); }

/* ===== 设置 ===== */
.log li { font-family: var(--sans); font-size: .8rem; padding: 6px 0; display: flex; gap: 12px; color: var(--muted); border-bottom: 1px solid var(--line); }
.log li:last-child { border: none; }
.log li.ok { color: var(--ink-soft); }
.log li.bad { color: var(--bordeaux); }

/* ===== 弹窗 ===== */
dialog { border: 1px solid var(--gold-soft); padding: 30px; width: min(94vw, 500px); box-shadow: 0 30px 80px rgba(40, 20, 30, .3); background: var(--paper); color: var(--ink); }
dialog::backdrop { background: rgba(43, 34, 38, .45); backdrop-filter: blur(3px); }
dialog form { display: flex; flex-direction: column; gap: 14px; }
dialog h3 { font-size: 1.4rem; letter-spacing: .06em; justify-content: center; }

.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 10px 22px; z-index: 50; font-size: .9rem; letter-spacing: .06em; font-style: italic; box-shadow: 0 10px 30px rgba(0,0,0,.25); }

@media (max-width: 520px) {
  .tabs button { padding: 8px 8px; }
  .tabs button span { font-size: .85rem; letter-spacing: .06em; }
  .tabs button em { display: none; }
  .frame { padding: 28px 22px 24px; }
  .wordmark { font-size: 2.2rem; }
  .together .big { font-size: 3.6rem; }
  .card { padding: 20px 18px; }
  #app { padding: 0 14px 40px; }
}

/* ===== 登录页：对外呈现为普通内部系统，不带任何情侣元素 ===== */
body:not(.in) { background: #eef1f5; }
body:not(.in) .petals, body:not(.in) .grain { display: none; }
.auth-card.corp { font-family: var(--sans); background: #fff; box-shadow: 0 10px 40px -18px rgba(11, 61, 107, .35); padding: 0; max-width: 400px; border-radius: 6px; }
.auth-card.corp .frame { border: none; outline: none; padding: 36px 36px 28px; }
.corp-logo { width: 46px; height: 46px; margin: 0 auto 12px; border-radius: 10px; background: #0b3d6b; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 1.4rem; }
.corp .wordmark { font-family: var(--sans); font-size: 1.5rem; font-weight: 700; color: #0b3d6b; letter-spacing: .02em; }
.corp .tagline { font-size: .8rem; color: #7a8595; letter-spacing: .08em; margin: 4px 0 24px; }
.corp label > span { color: #5b6675; text-transform: none; letter-spacing: .02em; font-size: .8rem; }
.corp input { border: 1px solid #d3dae3; border-radius: 4px; padding: 10px 12px; background: #fff; font-family: var(--sans); font-size: .95rem; }
.corp input:focus { border-color: #0b3d6b; box-shadow: 0 0 0 3px rgba(11, 61, 107, .12); }
.corp input.code { font-size: 1.4rem; letter-spacing: .3em; }
.corp .btn { border-radius: 4px; text-transform: none; letter-spacing: .04em; font-size: .9rem; border-color: #0b3d6b; color: #0b3d6b; }
.corp .btn.primary { background: #0b3d6b; color: #fff; }
.corp .btn.primary:hover { background: #082d50; }
.corp .hint { color: #3b4552; }
.corp .hint b { font-size: 1rem; letter-spacing: .02em; color: #0b3d6b; }
.corp .err { color: #c0392b; font-style: normal; }
.corp .switch, .corp .switch a { color: #7a8595; font-size: .8rem; border: none; }
.corp .backup li { font-family: ui-monospace, Menlo, monospace; }
.corp-foot { margin: 0; padding: 12px; text-align: center; font-size: .7rem; color: #9aa4b1; border-top: 1px solid #edf0f4; }

/* ===== 微信式聊天 ===== */
.bubble { max-width: 82%; align-items: flex-start; gap: 10px; }
.bubble .av { width: 34px; height: 34px; font-size: .95rem; margin-top: 18px; }
.bubble.mine .av { display: grid; background: var(--bordeaux); color: var(--paper); border-color: var(--bordeaux); }
.bubble .col { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bubble.mine .col { align-items: flex-end; }
.bubble .name { font-size: .72rem; color: var(--muted); letter-spacing: .04em; padding: 0 4px; }
.bubble .name .time { font-family: var(--sans); font-size: .65rem; margin: 0 0 0 6px; }
.bubble .body { border-radius: 2px 12px 12px 12px; }
.bubble.mine .body { border-radius: 12px 2px 12px 12px; }

/* ===== 生日仪式 ===== */
.bday-banner { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; background: linear-gradient(90deg, #3b0f1a, #7a2e3b); color: #f3d9a4; font-style: italic; letter-spacing: .08em; box-shadow: var(--shadow); }
.bday-banner a { color: #fff2cc; border-color: #e2c07a; font-size: .85rem; font-style: normal; white-space: nowrap; }
body.bday-open { overflow: hidden; }
.bday { position: fixed; inset: 0; z-index: 100; background: radial-gradient(1200px 800px at 50% 110%, #5a1e2a 0%, #2a0d14 55%, #160609 100%); display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: auto; padding: 24px 16px; box-sizing: border-box; }
.bday canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.bday-card { position: relative; margin: auto; text-align: center; color: #f6e7d2; max-width: 520px; width: 100%; animation: bday-in 1.2s ease both; }
@keyframes bday-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.bday-eyebrow { margin: 0; color: #e2c07a; font-style: italic; letter-spacing: .3em; font-size: .85rem; }
.bday-title { font-size: 2.4rem; font-weight: 400; margin: 10px 0 4px; letter-spacing: .06em; color: #fff7ea; }
.bday-title span { font-style: italic; color: #f3d9a4; }
.bday-sub { margin: 0 0 26px; color: #d9b6b9; letter-spacing: .12em; font-style: italic; }
.cake { position: relative; width: 190px; height: 190px; margin: 0 auto; }
.cake .plate { position: absolute; bottom: 10px; left: 5px; width: 180px; height: 16px; border-radius: 50%; background: #f3d9a4; box-shadow: 0 6px 24px rgba(0,0,0,.4); }
.cake .tier { position: absolute; left: 50%; transform: translateX(-50%); background: linear-gradient(#fff2e8, #f2cdd0); border-radius: 8px 8px 4px 4px; box-shadow: inset 0 -10px 0 #e8b4b8, 0 4px 12px rgba(0,0,0,.25); }
.cake .t1 { bottom: 24px; width: 150px; height: 56px; }
.cake .t2 { bottom: 78px; width: 104px; height: 46px; }
.cake .t1::after, .cake .t2::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 14px; background: repeating-radial-gradient(circle at 10px 0, #fff9f2 0 8px, transparent 9px 14px); border-radius: 8px 8px 0 0; }
.cake .candle { position: absolute; bottom: 122px; left: 50%; width: 10px; height: 44px; margin-left: -5px; background: repeating-linear-gradient(-45deg, #fff 0 5px, #e8b4b8 5px 10px); border-radius: 3px; }
.cake .flame { position: absolute; bottom: 164px; left: 50%; width: 16px; height: 26px; margin-left: -8px; background: radial-gradient(circle at 50% 80%, #fff7c2 0%, #ffcf5a 45%, #ff7a3d 75%, transparent 78%); border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; transform-origin: 50% 100%; animation: flicker .35s ease-in-out infinite alternate; filter: drop-shadow(0 0 14px rgba(255, 200, 90, .9)); transition: opacity .5s, transform .5s; }
@keyframes flicker { from { transform: scaleX(1) rotate(-3deg); } to { transform: scaleX(.85) rotate(4deg) translateY(-1px); } }
.cake.out .flame { opacity: 0; transform: scale(.2) translateY(-30px); }
.cake.out .candle::after { content: ''; position: absolute; top: -26px; left: 2px; width: 6px; height: 26px; background: linear-gradient(to top, rgba(255,255,255,.5), transparent); border-radius: 50%; animation: smoke 2.4s ease-out forwards; }
@keyframes smoke { from { opacity: .8; transform: translateY(0) scaleX(1); } to { opacity: 0; transform: translateY(-50px) scaleX(2.5); } }
.bday-hint { margin: 20px 0 12px; color: #d9b6b9; font-style: italic; letter-spacing: .1em; }
.btn.gold { background: #e2c07a; border-color: #e2c07a; color: #3b0f1a; font-weight: 600; }
.btn.gold:hover { background: #f3d9a4; border-color: #f3d9a4; color: #3b0f1a; }
.btn.ghost { background: transparent; border-color: #e2c07a; color: #f3d9a4; margin-top: 22px; }
.btn.ghost:hover { background: rgba(226, 192, 122, .15); color: #fff7ea; }
.bday-letter { margin: 26px auto 0; padding: 26px 28px; max-width: 460px; text-align: left; white-space: pre-wrap; line-height: 1.9; font-size: 1.08rem; color: #fff7ea; background: rgba(255, 247, 234, .06); border: 1px solid rgba(226, 192, 122, .45); position: relative; }
.bday-letter::before { content: '❦'; position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: #2f0e17; padding: 0 10px; color: #e2c07a; }
@media (max-width: 480px) { .bday-title { font-size: 1.9rem; } .cake { transform: scale(.85); margin-bottom: -20px; } .bday-letter { padding: 20px 18px; font-size: 1rem; } }
