/* The first day's memo (src/memo.js), from the user's mock-up of 2026-10-31 (design/camp/ui/mockups/first-day-memo.png):
   pinned beside the clock (01), folded to a disc with a tag (02; a phone starts folded), and the gift card once all is
   done (03). The card is the user's blank (scripts/camp/build-memo.py: its pin lifted off and set back on as a picture
   of its own) drawn as a border-image, 112 px of each side kept (the frame's corners, the paper's turned corners), the
   rest stretched, so the small memo and the larger gift card share it; --b is the corners' size. Type as on the
   notice board: Jua and Gowun Dodum in Korean (SS Jua, SS Dodum: styles/board.css), Crimson Text in English. */
.memo,.memo-gift{--m-ink:#3a1d0c;--m-text:#4b2c17;--m-soft:#7b5b40;--m-rule:rgba(128,88,50,.24);--m-green:#5a7b37;--m-green-d:#44622a;
  --m-amber:#efa23a;--m-display:"Crimson Text",Georgia,serif;--m-dw:700;--m-body:"Crimson Text",Georgia,serif;--m-bs:16.5px}
html[lang="ko"] .memo,html[lang="ko"] .memo-gift{--m-display:"SS Jua","Jua","Apple SD Gothic Neo","Malgun Gothic",sans-serif;--m-dw:400;
  --m-body:"SS Dodum","Gowun Dodum","Apple SD Gothic Neo","Malgun Gothic",sans-serif;--m-bs:15.5px}
.memo button,.memo-gift button{font:inherit;color:inherit;-webkit-tap-highlight-color:transparent}

/* ---- beside the clock: the memo hangs left of the plaque, its top at the plaque's ---- */
.hud .memo{position:absolute;right:calc(100% + 12px);top:0;transition:opacity .5s ease}
.memo.gone{opacity:0;pointer-events:none}
.memo-card{--b:26px;position:absolute;right:0;top:0;box-sizing:border-box;width:306px;padding:0 1px;border:solid transparent;border-width:var(--b);
  border-image:url(../assets/camp/ui/memo/card.webp) 112 fill / var(--b) stretch;color:var(--m-text);text-align:left;
  filter:drop-shadow(0 8px 14px rgba(0,0,0,.36)) drop-shadow(0 2px 3px rgba(0,0,0,.3));transform-origin:86% 6%;
  transition:opacity .28s ease,transform .32s cubic-bezier(.2,1.1,.4,1),visibility 0s}
.memo-pin{position:absolute;left:50%;top:calc(var(--b) * -.8062);width:calc(var(--b) * .8393);height:calc(var(--b) * .866);transform:translate(-50%,-50%);
  background:url(../assets/camp/ui/memo/pin.webp) center / 100% 100% no-repeat;filter:drop-shadow(0 2px 1.5px rgba(48,22,6,.55));pointer-events:none}
.memo-head{display:flex;align-items:center;gap:9px;padding:0 0 9px;border-bottom:1.5px solid var(--m-rule)}
.memo-title{flex:1;min-width:0;margin:0;font:var(--m-dw) 23px/1.15 var(--m-display);color:var(--m-ink);letter-spacing:.01em;white-space:nowrap}
.memo-n{font:600 16px/1 "Crimson Text",Georgia,serif;color:var(--m-soft);letter-spacing:.06em;font-variant-numeric:tabular-nums;white-space:nowrap}
/* (the mock-up's amber dot, a fold with a bar across it) */
.memo-fold{position:relative;flex:none;width:19px;height:19px;padding:0;border:1.5px solid #c47c20;border-radius:50%;cursor:pointer;
  background:radial-gradient(circle at 35% 30%,#ffd07a,#ef9f32 70%);box-shadow:0 1px 2px rgba(80,40,8,.35);transition:transform .15s ease,filter .15s ease}
.memo-fold::after{content:"";position:absolute;left:4px;right:4px;top:calc(50% - 1px);height:2px;border-radius:1px;background:#fff8ea;opacity:.9}
.memo-fold:hover{transform:scale(1.12);filter:brightness(1.06)}
.memo-fold:focus-visible,.memo-key:focus-visible,.memo-giftbtn:focus-visible,.memo-tag:focus-visible{outline:2px solid #c47c20;outline-offset:2px}
.memo-list{list-style:none;margin:0;padding:2px 0 0}
.memo-it{display:flex;align-items:center;gap:10px;min-height:36px;padding:2px 1px;border-bottom:1px solid var(--m-rule);font:400 var(--m-bs)/1.25 var(--m-body);color:var(--m-text)}
.memo-txt{flex:1;min-width:0}
/* (no box: the user, 2026-11-01; a green tick drawn in beside the line once it is done, the lines in place either way) */
.memo-check{position:relative;flex:none;width:20px;height:20px}
.memo-check svg{position:absolute;inset:0;width:20px;height:20px;fill:none;stroke:var(--m-green-d);stroke-width:3;stroke-linecap:round;stroke-linejoin:round;
  stroke-dasharray:1;stroke-dashoffset:1;filter:drop-shadow(0 1px 0 rgba(255,255,255,.5))}
.memo-it.done .memo-check svg{stroke-dashoffset:0}
.memo-it.fresh .memo-check{animation:memo-pop .5s cubic-bezier(.3,1.7,.5,1)}
.memo-it.fresh .memo-check svg{animation:memo-tick .45s ease .1s both}
.memo-it.fresh .memo-txt{animation:memo-glow 1.4s ease}
@keyframes memo-pop{0%{transform:scale(.55)}100%{transform:scale(1)}}
@keyframes memo-tick{from{stroke-dashoffset:1}to{stroke-dashoffset:0}}
@keyframes memo-glow{0%,100%{color:var(--m-text)}30%{color:#2f5a14}}
/* the full screen line's keys (a button: what the settings' switch does) */
.memo-key{flex:none;height:23px;min-width:32px;box-sizing:border-box;padding:0 6px;border:1.5px solid #b99c7a;border-bottom-width:3px;border-radius:6px;cursor:pointer;
  background:linear-gradient(#fdf6e9,#efe1c8);font:700 12px/1 "Asap",system-ui,sans-serif !important;letter-spacing:.03em;color:#5a3a22 !important;transition:transform .12s ease,filter .12s ease}
.memo-key.ico{display:grid;place-items:center;padding:0 6px}
.memo-key.ico svg{width:14px;height:14px}
.memo-key:hover{filter:brightness(1.04);transform:translateY(-1px)}
.memo-key:active{transform:translateY(1px);border-bottom-width:2px}
.memo-foot{display:flex;align-items:center;gap:9px;padding:11px 1px 0;font:400 14px/1.3 var(--m-body);color:#5d3c24}
html[lang="ko"] .memo-foot{font-size:13.5px}
.memo-gift-ico{flex:none;width:21px;height:21px;color:#8c5a2d}
.memo-gift-ico svg,.memo-giftbtn svg{display:block;width:100%;height:100%}
.memo-giftbtn{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;height:38px;margin:0;border:2px solid #b8741f;border-radius:9px;cursor:pointer;
  background:linear-gradient(#ffd27a,#f4a738);box-shadow:inset 0 1px 0 rgba(255,255,255,.55),0 2px 0 #a9661b;font:var(--m-dw) 17px/1 var(--m-display) !important;color:var(--m-ink) !important;
  animation:memo-breathe 2.6s ease-in-out infinite}
.memo-giftbtn svg{width:19px;height:19px;flex:none}
.memo-giftbtn:hover{filter:brightness(1.05)}
@keyframes memo-breathe{0%,100%{box-shadow:inset 0 1px 0 rgba(255,255,255,.55),0 2px 0 #a9661b}50%{box-shadow:inset 0 1px 0 rgba(255,255,255,.55),0 2px 0 #a9661b,0 0 12px rgba(255,186,80,.65)}}

/* ---- folded: the disc in the clock's row (the friends and settings discs' size) and its tag under it ---- */
.memo .memo-disc{display:none;position:absolute;right:0;top:10.5px;width:66px;height:66px;background-image:url(../assets/camp/ui/round-memo.webp)}
.memo.folded .memo-disc{display:block}
.memo-disc.nod{animation:memo-nod .55s ease}
@keyframes memo-nod{0%,100%{transform:none}35%{transform:scale(1.12) rotate(-6deg)}70%{transform:scale(.97) rotate(3deg)}}
.memo-tag{display:none;position:absolute;right:0;top:88px;padding:6px 12px 7px;border:1.5px solid #9d6c3c;border-radius:9px;cursor:pointer;
  background:linear-gradient(#4b2d18,#2f1b0e);box-shadow:0 3px 8px rgba(0,0,0,.42);white-space:nowrap;font:400 15px/1 var(--m-body) !important;color:#f6e2bd !important}
.memo-tag::before{content:"";position:absolute;right:28px;top:-6px;width:9px;height:9px;background:#4b2d18;border-left:1.5px solid #9d6c3c;border-top:1.5px solid #9d6c3c;transform:rotate(45deg)}
.memo-tag-n{font-family:"Crimson Text",Georgia,serif;font-weight:600;letter-spacing:.04em}
.memo.all .memo-tag{border-color:#c9973f;color:#ffe2a6 !important}
.memo.folded .memo-tag{display:block}
.memo.folded .memo-card{opacity:0;visibility:hidden;transform:scale(.5) translateY(-10px);pointer-events:none;transition:opacity .22s ease,transform .25s ease,visibility 0s .25s}
/* out of the way while a panel, the settings or the friends card is open on that side */
body.panel-open .memo-card,body:has(#settings:not([hidden])) .memo-card,body:has(#friends:not([hidden])) .memo-card{opacity:0;visibility:hidden;pointer-events:none}

/* ---- the gift (03): the same card, larger, over a shade ---- */
.memo-gift{position:fixed;inset:0;z-index:40;display:grid;place-items:center;box-sizing:border-box;padding:24px 12px;overflow-y:auto;background:rgba(12,7,3,.56);
  opacity:0;transition:opacity .35s ease}
.memo-gift.on{opacity:1}
.mg-card{--b:38px;position:relative;box-sizing:border-box;width:min(492px,100%);padding:0 6px 2px;border:solid transparent;border-width:var(--b);
  border-image:url(../assets/camp/ui/memo/card.webp) 112 fill / var(--b) stretch;color:var(--m-text);text-align:center;
  filter:drop-shadow(0 18px 32px rgba(0,0,0,.5));transform:translateY(16px) scale(.96);transition:transform .5s cubic-bezier(.2,1.2,.4,1)}
.memo-gift.on .mg-card{transform:none}
.mg-card .memo-head{padding-bottom:12px;text-align:left}
.mg-card .memo-title{font-size:31px}
.mg-card .memo-n{font-size:21px}
.mg-ok{display:grid;place-items:center;flex:none;width:31px;height:31px;border-radius:50%;background:var(--m-green);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(40,50,10,.35)}
.mg-ok svg,.mg-tick svg,.mg-take svg{width:20px;height:20px;fill:none;stroke:#fffaf0;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.mg-lead{margin:18px 0 5px;font:var(--m-dw) 23px/1.25 var(--m-display);color:var(--m-ink)}
.mg-sub{margin:0 0 18px;font:400 16.5px/1.4 var(--m-body);color:var(--m-soft)}
.mg-picks{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.mg-pick{position:relative;display:flex;flex-direction:column;align-items:center;gap:9px;box-sizing:border-box;padding:16px 10px 13px;border:2px solid #e2cda9;border-radius:12px;cursor:pointer;
  background:rgba(255,251,242,.55);transition:border-color .2s ease,background-color .2s ease,box-shadow .2s ease,transform .15s ease}
.mg-pick:hover{background:rgba(255,248,232,.85);transform:translateY(-1px)}
.mg-pick img{display:block;width:100%;max-width:156px;height:auto;filter:drop-shadow(0 4px 5px rgba(60,30,10,.2));user-select:none;-webkit-user-select:none}
.mg-pick.on{border-color:var(--m-amber);background:#fff0d2;box-shadow:0 0 0 2px var(--m-amber),0 6px 16px rgba(170,95,20,.2)}
.mg-pick:focus-visible{outline:2px solid #b8741f;outline-offset:3px}
.mg-name{font:var(--m-dw) 19px/1 var(--m-display);color:var(--m-ink)}
.mg-tick{position:absolute;top:-11px;right:-11px;display:none;place-items:center;width:32px;height:32px;box-sizing:border-box;border:2px solid #fff3dc;border-radius:50%;
  background:radial-gradient(circle at 35% 30%,#f6b555,#d5801f 75%);box-shadow:0 2px 4px rgba(110,55,10,.35)}
.mg-pick.on .mg-tick{display:grid}
.mg-take{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;height:56px;margin:20px 0 4px;border:2px solid #b8741f;border-radius:11px;cursor:pointer;
  background:linear-gradient(#ffd47e,#f4a634);box-shadow:inset 0 1px 0 rgba(255,255,255,.6),0 3px 0 #a9661b,0 7px 14px rgba(120,60,10,.25);
  font:var(--m-dw) 21px/1 var(--m-display) !important;color:var(--m-ink) !important;transition:filter .15s ease,transform .12s ease}
.mg-take:hover{filter:brightness(1.05)}
.mg-take:active{transform:translateY(2px);box-shadow:inset 0 1px 0 rgba(255,255,255,.6),0 1px 0 #a9661b}
.mg-take:focus-visible{outline:2px solid #8a4f10;outline-offset:3px}
.mg-take svg{stroke:var(--m-ink)}
.memo-gift.taken .mg-take{background:linear-gradient(#a6c76f,#77a043);border-color:#557a2c;box-shadow:inset 0 1px 0 rgba(255,255,255,.45),0 3px 0 #4a6a24}
.mg-later{display:inline-block;margin:4px 0 0;padding:8px 12px 2px;border:0;background:none;cursor:pointer;font:400 14.5px/1 var(--m-body) !important;color:var(--m-soft) !important;
  text-decoration:underline;text-decoration-color:transparent;text-underline-offset:3px;transition:text-decoration-color .15s ease}
.mg-later:hover{text-decoration-color:currentColor}
.memo-gift.taken .mg-later{visibility:hidden}

@media (prefers-reduced-motion:reduce){
  .memo-card,.mg-card,.memo-gift{transition:none}
  .memo-it.fresh .memo-check,.memo-it.fresh .memo-check svg,.memo-it.fresh .memo-txt,.memo-disc.nod,.memo-giftbtn{animation:none}
}

/* ---- a phone: the disc at the discs' size; open, the memo drops below the clock's row ---- */
@media (max-width:760px){
  .hud .memo{right:calc(100% + 8px)}
  .memo .memo-disc{top:5px;width:46px;height:46px}
  .memo-tag{top:60px;padding:5px 9px 6px;font-size:13.5px !important}
  .memo-tag::before{right:18px}
  .memo-card{position:fixed;top:calc(var(--safe-t) + 82px);right:12px;width:min(286px,calc(100vw - 24px));transform-origin:80% 0}
  .mg-card{--b:30px;padding:0 2px}
  .mg-card .memo-title{font-size:25px}
  .mg-lead{font-size:20px;margin-top:14px}
  .mg-sub{font-size:15px;margin-bottom:14px}
  .mg-picks{gap:10px}
  .mg-take{height:50px;font-size:19px !important}
}
