:root {
  color-scheme: dark;
  --ink: #101d30;
  --silver: #e8eef5;
  --fine-line: rgb(181 203 225 / .23);
  --cn-serif: "Songti SC","Noto Serif CJK SC","STSong","SimSun",serif;
  --sans: "Inter","PingFang SC","Microsoft YaHei",Arial,sans-serif;
  --scene: url("assets/winter.webp");
  font-family: var(--sans);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--silver);
  background: radial-gradient(ellipse at 55% 18%,#1d2d44 0%,#152338 42%,#101c2d 75%,#0d1828 100%);
}
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; font: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible, iframe:focus-visible { outline: 2px solid #71b4e2; outline-offset: 5px; }
button { touch-action: manipulation; }
[hidden] { display: none !important; }
.definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon,.stamp-snow,.post-waves,.soundwave { fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.icon { width: 21px; height: 21px; flex: none; }
.layout { width: min(1240px, 89.4%); margin: 0 auto; padding: clamp(15px,4vh,46px) 0 30px; }
.masthead { display: flex; align-items: center; justify-content: space-between; padding: 0 2px clamp(18px,3.9vh,36px); }
.brand { display: flex; gap: 13px; align-items: center; font: 500 1.28rem/1 var(--cn-serif); letter-spacing: .13em; }
.brand-icon { position: relative; display: grid; width: 33px; height: 33px; place-items: center; transform: rotate(-9deg); }
.brand-icon .icon { width: 32px; height: 32px; stroke-width: 1.12; }
.brand-icon i { position: absolute; top: -3px; right: -3px; font: 12px Georgia,serif; background: #18273b; }
.brand-divider { height: 16px; width: 1px; background: #77889c; opacity: .55; }
.wordmark { font: italic 1.13rem Georgia,"Times New Roman",serif; letter-spacing: .005em; color: #bbc9d9; }
.snow-control { background: transparent; border: 1px solid #54647a; border-radius: 25px; min-height: 38px; display: flex; align-items: center; gap: 8px; padding: 5px 13px; color: #d5dfeb; font-size: .875rem; }
.snow-control .icon { width: 16px; height: 16px; }
.snow-control i { width: 5px; height: 5px; border-radius: 50%; border: 1px solid #bcd8ef; }
.snow-control[aria-pressed="true"] i { background: #bcd8ef; box-shadow: 0 0 7px #9ec5e8; }
.snow-control:disabled { opacity: .57; cursor: default; }
.postcard {
  isolation: isolate; position: relative; overflow: hidden;
  min-height: clamp(470px, 70svh, 720px);
  border: 1px solid #75869a; border-radius: 5px;
  box-shadow: 0 17px 48px rgb(0 8 19 / .28);
  background: #183454;
}
.scene,.snowfall,.frame { position: absolute; pointer-events:none; }
.scene { inset: 0; z-index: -2; background-image: linear-gradient(90deg,rgb(8 25 49 / .40),transparent 54%),var(--scene); background-size: cover; background-position: center,center 61%; }
.frame { z-index: 3; inset: 11px; border: 1px solid rgb(225 235 244 / .48); }
.frame i { position: absolute; width: 5px; height: 5px; background: #e4e9ed; transform: rotate(45deg); opacity: .83; }
.frame i:nth-child(1) { left:-3px; top:-3px; } .frame i:nth-child(2) { right:-3px; top:-3px; }
.frame i:nth-child(3) { left:-3px; bottom:-3px; } .frame i:nth-child(4) { right:-3px; bottom:-3px; }
.snowfall { inset: 0; overflow: hidden; z-index: -1; }
.snowfall i { position: absolute; width: var(--s); height: var(--s); left: var(--x); top: -6%; border-radius: 50%; background: #f2f7ff; opacity: 0; animation: fall var(--speed) linear var(--delay) infinite; }
@keyframes fall { 0% { opacity: 0; transform: translate(0,0); } 10% { opacity: .61; } 85% { opacity:.4; } 100% { opacity:0; transform:translate(26px,77vh); } }
.cover { min-height: inherit; position: relative; margin: 0; padding: clamp(43px,6vh,77px) 7.6%; display:flex; flex-direction: column; align-items:flex-start; justify-content:center; }
.edition { display: flex; gap: 12px; align-items: center; color: #dde7f3; font-size: .76rem; letter-spacing: .22em; font-weight: 500; }
.edition span { width: 37px; height: 1px; background: #cedeed; }
.age { position: relative; width:max-content; display: flex; align-items: flex-start; color: #e6e9e9; margin-top: clamp(16px,2.7vh,32px); }
.age > span { font-family: "Baskerville","Times New Roman",serif; font-weight:400; font-size:clamp(10.2rem, min(16.7vw,27svh),16.1rem); letter-spacing: -.098em; line-height: .79; margin-left: -.095em; padding-right: .065em; }
.age em { font: italic clamp(1.5rem,2.7vw,2.7rem)/1 Georgia,serif; color: #d8e2ed; padding-left: .2em; margin-top: .25em; }
.age-star { position: absolute; color: #e1edf6; width: clamp(14px,1.6vw,22px); height: auto; right: -6px; bottom: 19%; }
h1 { font: 400 clamp(2.15rem,3.42vw,3.2rem)/1.38 var(--cn-serif); letter-spacing: .13em; margin: clamp(17px,2.5vh,28px) 0 0; text-shadow: 0 1px 4px #183754; }
.date-line { margin: 8px 0 0; font-size: clamp(.95rem,1.13vw,1.125rem); letter-spacing: .14em; color: #e0e9f4; text-shadow: 0 1px 4px #112941; }
.date-line span { padding: 0 .32em; }
.open-letter { display: inline-flex; align-items: center; justify-content: center; gap: 12px; margin-top: clamp(24px,4.6vh,48px); padding: 0 27px; min-height: 48px; border: 1px solid #fff; border-radius: 99px; background:#e9eff3; color: #1b324a; font-size: 1rem; letter-spacing: .1em; box-shadow: 0 3px 13px #0e294237; transition: background .16s, transform .16s; }
.open-letter:hover { background: #fff; transform: translateY(-2px); }
.open-letter .icon { width:19px; height:19px; }
.stamp { position: absolute; top: clamp(27px,4.2vw,59px); right: clamp(32px,4.5vw,66px); width:98px; height:111px; z-index:1; pointer-events:none; }
.stamp-stock { position:absolute; inset:0; padding:6px; color:#394d60; background: #d4d9da; transform: rotate(8deg); mask: linear-gradient(#000 0 0) center/calc(100% - 6px) calc(100% - 6px) no-repeat,radial-gradient(circle at 3px 3px,transparent 2px,#000 2.5px) 0 0/6px 6px; }
.stamp-ink { width:100%; height:100%; border:1px solid #74899a; box-shadow: inset 0 0 0 2px #ccd4d7,inset 0 0 0 3px #8298a9; display:flex; flex-direction:column; align-items:center; justify-content:space-around; padding:5px 0; background:repeating-linear-gradient(130deg,#d8dede 0 2px,#c6d1d5 2px 3px); }
.stamp-ink span {font: 600 8px/1 Arial,sans-serif;letter-spacing:.11em; }
.stamp-ink small {font: 600 10px/1 Georgia,serif;letter-spacing:.13em; }
.stamp-snow {width:42px; height:42px; stroke-width:.95; }
.cancelmark { position:absolute; left:-42px; bottom:-9px; width:64px; height:64px; display:flex; align-items:center; justify-content:center; flex-direction:column; gap:2px; border:3px double currentColor; border-radius:50%; color:#b5c4d0; transform:rotate(-18deg); opacity:.76; text-shadow:0 1px 2px #143557; }
.cancelmark b,.cancelmark small {font:8px/1.2 Arial,sans-serif;letter-spacing:.13em;}
.cancelmark span {font:italic 13px/1.2 Georgia,serif;border-block:1px solid currentColor;padding:2px 0;}
.post-waves {position:absolute; color:#b9c9d4; opacity:.66; width:54px; left:11px; bottom:-3px; transform:rotate(-16deg); stroke-width:1; }
.under-card { display:flex; justify-content:space-between; align-items:center; margin-top: clamp(16px,2.9vh,30px); padding:0 3px; }
.soundtrack { display:flex; align-items:center; gap:13px; text-align:left; border:0; padding:3px 8px 3px 0; background:transparent; border-radius:5px; }
.record { display:grid; place-items:center; width:44px; height:44px; border-radius:50%; border:1px solid #8495a5; background:repeating-radial-gradient(circle,transparent 0 2px,#70809569 2.5px,#162232 3.5px),conic-gradient(from 5deg,#263344,#8595a164,#1d2e3e 25%,#273f53 55%,#afb6bd7a 68%,#263344 84%); }
.record i { display:grid; place-items:center; border-radius:50%; width:13px; height:13px; background:#b5c2ce; }
.record i::after {content:"";width:3px;height:3px;border-radius:50%;background:#293a4b; }
.track-text { display:flex; flex-direction:column; gap:4px; }
.track-kicker {font-size:.75rem; letter-spacing:.12em; color:#aabbce;}
.track-name {font-size:1rem; letter-spacing:.045em; color:#e1e8f0;}
.artist {font-size:.875rem; margin-left:10px; color:#b5c4d4;}
.soundwave {width:36px;height:20px; margin-left:6px; color:#94aac1; stroke-width:1.65;}
.soundtrack:hover .track-name { text-decoration:underline; text-underline-offset:4px; }
.delivery-date {display:flex;align-items:center;gap:12px;color:#b6c4d2;}
.delivery-date span:first-child {font-size:.72rem;letter-spacing:.2em;}
.delivery-rule {width:34px;height:1px;background:#667a8e;}
.delivery-date b {font:italic 2rem/1 Georgia,serif;}
.reader { position:relative; overflow:hidden; padding:clamp(32px,4.5vw,61px) clamp(20px,5vw,72px); }
.reading .scene { background-image:linear-gradient(rgb(9 28 51 / .22),rgb(9 28 51 / .32)),var(--scene); }
.reading .stamp {display:none;}
.paper {position:relative; z-index:1; width:min(100%,690px); margin:auto; padding:clamp(25px,4.2vw,57px) clamp(24px,5.1vw,69px) 30px; color:#24384a; border:1px solid #f5f9fc; background:linear-gradient(116deg,#edf2f3,#f5f7f6 62%,#e7edef); box-shadow:0 12px 36px #07192c57; color-scheme:light;}
.reader.arriving .paper {animation: unseal .9s cubic-bezier(.22,.7,.16,1) both;}
@keyframes unseal {from{opacity:.1;transform:translateY(150px) rotate(1deg);} to{opacity:1;transform:translateY(0) rotate(0);}}
.envelope-pocket {display:none;}
.reader.arriving .envelope-pocket {display:block; position:absolute; z-index:2; width:min(80%,736px); height:200px; top:190px; left:50%; background:linear-gradient(145deg,#b9cad6 49.6%,#d5e0e6 50%) left/51% 100% no-repeat,linear-gradient(215deg,#bdcdda 49.6%,#d2dde5 50%) right/51% 100% no-repeat; clip-path:polygon(0 0,50% 48%,100% 0,100% 100%,0 100%); animation:pocket .92s ease-in both; pointer-events:none; }
@keyframes pocket {0%,15%{opacity:1;transform:translate(-50%,0);} 100%{opacity:0;transform:translate(-50%,260px);}}
.paper-top,.player-caption {display:flex;align-items:center;justify-content:space-between;gap:12px;}
.paper-top {padding-bottom:12px; border-bottom:1px solid #bcc9d1;}
.paper-top > span {font: .76rem/1.3 Georgia,serif;letter-spacing:.19em;color:#475d71;}
.close-letter {display:flex;align-items:center;gap:3px; min-height:36px; border:0; background:transparent; color:#415a71; font-size:.875rem; padding:2px 0 2px 7px;}
.close-letter .icon {width:14px;height:14px;}
.paper-date {margin:22px 0 6px;font-size:.85rem;letter-spacing:.1em;color:#566b7d;}
h2 {font:500 clamp(1.65rem,3vw,2.65rem)/1.5 var(--cn-serif);letter-spacing:.055em;margin:2px 0 20px;}
h2:focus {outline:none;}
.player-area {margin:0 0 24px;}
.player-caption {margin-bottom:8px;color:#4c6273;font-size:.875rem;letter-spacing:.06em;}
.player-caption > span {display:flex;align-items:center;gap:6px;}
.player-caption .icon {width:15px;height:15px;}
.player-caption a {color:#425d77;text-decoration:underline;text-underline-offset:3px;}
.cover-audio-hint {position:absolute;bottom:21px;left:7.6%;display:flex;align-items:center;gap:7px;margin:0;padding:6px 12px;border-radius:20px;background:#10243adb;color:#e9f2f7;font-size:.84rem;}
.cover-audio-hint .icon {width:15px;height:15px;}
.letter-music {border:1px solid #a4b6c1;border-radius:22px;padding:6px 15px;min-height:38px;background:transparent;color:#354e62;font-size:.875rem;}
#birthday-music {display:block;width:min(32vw,270px);height:36px;margin:0 auto 0 20px;color-scheme:dark;}
@media (max-width:700px) {
  .under-card {flex-wrap:wrap;row-gap:10px;}
  #birthday-music {order:1;width:100%;height:36px;margin:0;}
  .cover-audio-hint {left:9%;}
}
.letter-copy {font: 400 clamp(1.06rem,1.5vw,1.19rem)/1.94 var(--cn-serif); letter-spacing:.035em;}

/* A small printed score and keyboard share the winter postcard's paper and ink. */
.postcard:has(.piano-gate:not([hidden])) .stamp { display: none; }
.piano-gate {
  position: relative;
  display: grid;
  align-content: center;
  min-height: inherit;
  padding: clamp(26px, 4vw, 54px) clamp(18px, 5vw, 72px);
}
.piano-card {
  width: min(100%, 560px);
  margin-inline: auto;
  padding: clamp(20px, 3vw, 35px) clamp(22px, 3.8vw, 48px) 20px;
  border: 1px solid #f3f7f7;
  color-scheme: light;
  color: #253d54;
  background: linear-gradient(130deg,#e9f0f2,#f5f6f2 60%,#e0e8ed);
  box-shadow: 0 10px 32px #0b1c3552, inset 0 0 0 4px #edf2f3, inset 0 0 0 5px #b7c6ce;
}
.piano-top,.piano-score-tools { display: flex; align-items: center; justify-content: space-between; }
.piano-top { border-bottom: 1px solid #b1c2cb; margin-bottom: 16px; }
.piano-insignia.icon { width: 23px; height: 23px; margin-left: 2px; color: #61778a; }
.piano-back,.piano-demo {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; border: 0; padding: 3px 1px; background: transparent; color: #3b546a; font-size: .875rem;
}
.piano-back .icon { width: 14px; height: 14px; }
.piano-demo .icon { width: 16px; height: 16px; }
.piano-demo:hover,.piano-back:hover { text-decoration: underline; text-underline-offset: 4px; }
.piano-demo:disabled { cursor: default; opacity: .65; }
#piano-title { margin: 0 0 6px; font-size: clamp(1.65rem, 2.5vw, 2.15rem); }
.piano-instructions { margin: 0; color: #536a7b; font-size: .975rem; line-height: 1.65; }
.piano-score {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px;
  margin-top: 21px;
}
.score-phrase {
  display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); align-items: end; position: relative;
  padding: 0 2px; height: 58px;
  background: repeating-linear-gradient(to bottom,#8b9ca381 0 1px,transparent 1px 5px) left 9px / 100% 21px no-repeat;
}
.score-phrase > * {
  --rise: 0px; --note-ink: #4a6274;
  position: relative; text-align: center; min-width: 0;
  padding: 2px 0; border-radius: 3px; color: #43586b;
  font: 600 .82rem/1.3 Georgia,"Times New Roman",serif;
}
.score-phrase > :nth-child(3) { --rise: 2.5px; }
.score-phrase:first-child > :nth-child(5),
.score-phrase:nth-child(2) > :nth-child(6) { --rise: 7.5px; }
.score-phrase:first-child > :nth-child(6) { --rise: 5px; }
.score-phrase:nth-child(2) > :nth-child(5) { --rise: 10px; }
.score-phrase > *::before,.score-phrase > *::after {
  content: ""; position: absolute; left: 50%; pointer-events: none; background: var(--note-ink);
}
.score-phrase > *::before {
  bottom: calc(25px + var(--rise)); width: 8px; height: 5.5px;
  border-radius: 55%; transform: translateX(-50%) rotate(-20deg);
}
.score-phrase > *::after { bottom: calc(28px + var(--rise)); margin-left: 2.8px; width: 1.2px; height: 13px; }
.score-phrase > [data-state="current"] { --note-ink: #134f7b; background: #204c71; color: #fff; }
.score-phrase > [data-state="done"] { --note-ink: #587784; color: #466374; background: #d5e3e5; }
.piano-score-tools { min-height: 43px; }
.piano-count { color: #516a7d; font: .87rem/1.4 Georgia,"Times New Roman",serif; font-variant-numeric: tabular-nums; letter-spacing: .12em; }
.piano-instrument {
  padding: 8px 7px 7px; border: 1px solid #344b5f; border-radius: 6px;
  border-top: 3px solid #576d80; background: linear-gradient(170deg,#314557,#172a3d);
  box-shadow: 0 5px 8px #243d511a, inset 0 1px #b9c3c9;
}
.piano-keys { position: relative; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 2px; }
.piano-key {
  position: relative; cursor: pointer; font-family: Georgia,"Times New Roman",serif; user-select: none;
  -webkit-user-select: none; transition: background .1s, box-shadow .1s, transform .1s;
}
.piano-white {
  height: clamp(108px, 15vh, 143px); display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 1px;
  padding: 0 0 7px; border: 0; border-radius: 1px 1px 4px 4px; color: #384e60;
  background: linear-gradient(#c7d2da,#f2f3ed 27%,#f9faf6 85%,#d8dfe1);
  box-shadow: inset 0 -4px #afb9bc, inset 1px 0 #ffffff;
}
.piano-white span { font-size: 1.13rem; font-weight: 500; }
.piano-white small { font: .75rem/1.4 var(--sans); color: #546e7f; }
.piano-white.is-next {
  color: #163b59; background: linear-gradient(#8eb4c7,#c7e8f0 40%,#b1d6e4 93%); box-shadow: inset 0 -4px #648da3, inset 0 0 0 2px #54849c;
}
.piano-white.is-next::before {
  content: ""; position: absolute; bottom: 51px; width: 7px; height: 7px; border-radius: 50%; background: #275b79;
}
.piano-black {
  position: absolute; z-index: 2; top: 0; transform: translateX(-50%);
  width: 11%; height: 57%; padding: 0; border: 1px solid #172634; border-radius: 1px 1px 4px 4px;
  background: linear-gradient(90deg,#1d2c3b,#3a4b59 20%,#253745 80%,#192938);
  box-shadow: inset 0 -4px #273644,0 2px 3px #0f253f70;
}
.piano-black[data-note="Cs"] { left: 20%; }
.piano-black[data-note="Ds"] { left: 40%; }
.piano-black[data-note="Fs"] { left: 80%; }
.piano-white:is(:active,.is-pressed) {
  transform: translateY(2px); color: #143d55; background: #99c7d7; box-shadow: inset 0 -1px #698c9e;
}
.piano-black:is(:active,.is-pressed) { transform: translate(-50%,2px); background: #486779; }
.piano-key:focus-visible { outline: 2px solid #23749c; outline-offset: -3px; }
.piano-status {
  min-height: 1.55em; margin: 14px 0 0; text-align: center; color: #4b6275;
  font-size: .875rem; line-height: 1.55;
}
@media (max-width: 600px) {
  .piano-gate { padding: 24px 14px; }
  .piano-card { padding: 14px clamp(12px,4.8vw,26px) 20px; }
  .piano-top { margin-bottom: 15px; }
  .piano-score { grid-template-columns: 1fr; gap: 5px; margin-top: 16px; }
  .score-phrase { height: 53px; background-position-y: 4px; }
  .piano-white { height: 107px; }
}
@media (max-width: 360px) {
  .piano-gate { padding: 18px 10px; }
  .piano-card { padding-inline: 10px; }
  .piano-instrument { padding-inline: 4px; }
}
.letter-copy p {margin:0 0 1em;text-indent:2em;}
.signature {margin:1em 0 0;text-align:right;font:italic 1.5rem/1.4 Georgia,serif;}
.paper-end {display:flex;align-items:center;justify-content:center;gap:12px;margin-top:22px;color:#6c8191;}
.paper-end i {width:34px;height:1px;background:#aebec8;}
.paper-end .icon {width:16px;height:16px;}
@media (min-width:1580px){.layout{padding-top:6vh;}}
@media (max-width:700px){
  .layout{width:calc(100% - 30px);padding:18px 0 24px;}
  .masthead{padding:0 3px 17px;}
  .brand{gap:9px;font-size:1.08rem;}
  .brand-icon{width:27px;height:28px;}.brand-icon .icon{width:27px;height:27px;}
  .wordmark{font-size:.93rem;}
  .snow-control{min-height:36px;padding:4px 10px;font-size:.82rem;}
  .postcard{min-height:clamp(525px,73svh,680px);}
  .cover{padding:65px 9% 68px;justify-content:flex-start;}
  .scene{background-position:center,64% center;background-image:linear-gradient(90deg,rgb(7 28 52 / .34),transparent 88%),var(--scene);}
  .frame{inset:8px;}
  .stamp{width:56px;height:66px;right:27px;top:25px;}
  .stamp-stock{padding:4px;}.stamp-ink{padding:3px 0;}.stamp-ink span{font-size:5px;}.stamp-ink small{font-size:6px;}.stamp-snow{width:25px;height:25px;}
  .cancelmark{width:37px;height:37px;left:-21px;bottom:-6px;border-width:2px;gap:0;}.cancelmark b,.cancelmark small{font-size:5px;}.cancelmark span{font-size:8px;padding:1px 0;}.post-waves{width:31px;left:9px;}
  .edition{font-size:.67rem;letter-spacing:.16em;gap:8px;}.edition span{width:20px;}
  .age{margin-top:35px;}.age > span{font-size:clamp(9.8rem,40vw,12.5rem);}.age em{font-size:1.65rem;}.age-star{width:13px;}
  h1{font-size:clamp(1.95rem,7.4vw,2.5rem);margin-top:21px;}
  .date-line{margin-top:8px;font-size:.91rem;letter-spacing:.06em;}.open-letter{margin-top:29px;min-height:46px;padding:0 21px;font-size:.94rem;}
  .under-card{padding:0 2px;margin-top:16px;}.soundtrack{gap:9px;}.record{width:38px;height:38px;}.track-text{gap:3px;}.soundwave{width:25px;margin-left:3px;}
  .delivery-date{gap:6px;}.delivery-rule{width:15px;}.delivery-date b{font-size:1.65rem;}.delivery-date span:first-child{letter-spacing:.08em;font-size:.65rem;}
  .reader{padding:21px 13px;}.paper{padding:15px clamp(15px,4.8vw,27px) 22px;}.paper-date{margin-top:16px;}
  h2{margin-bottom:14px;}.letter-copy{line-height:1.88;letter-spacing:.015em;}
}
@media (max-width:360px){
  .brand-divider,.wordmark,.soundwave,.delivery-rule{display:none;}.cover{padding-left:8%;}.edition{font-size:.63rem;}.stamp{right:20px;width:46px;height:55px;}
  .reader{padding:14px 9px;}.paper{padding:14px 13px;}.delivery-date{gap:4px;}
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none !important;transition:none !important;scroll-behavior:auto !important;}
  .snowfall,.reader.arriving .envelope-pocket{display:none !important;}
}
