/* BARI wishlist event — same world as the homepage: hanji paper, black ink, one red seal.
   Tokens, ink-swipe buttons and the seal-press motion are taken from bari.relugames.com. */
@font-face { font-family: "Prata"; src: url(assets/fonts/prata.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "EB Garamond"; font-weight: 400 600; font-display: swap; src: url(assets/fonts/eb-normal-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "EB Garamond"; font-weight: 400 600; font-display: swap; src: url(assets/fonts/eb-normal-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "EB Garamond"; font-weight: 400 600; font-display: swap; src: url(assets/fonts/eb-normal-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "BrushKo"; src: url(assets/fonts/brush-ko.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "BrushJa"; src: url(assets/fonts/brush-ja.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "BrushTw"; src: url(assets/fonts/brush-tw.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "BrushCn"; src: url(assets/fonts/brush-cn.woff2) format("woff2"); font-display: swap; }

:root {
  --paper: #ece5d6; --paper-deep: #ddd3bf; --ink: #161412; --ink-soft: #3a3530; --ash: #776e63; --seal: #b2221e;
  /* default = Latin / Cyrillic languages (en fr it de es ru pt-BR); each CJK language swaps in its own below */
  --f-brush: "Prata", "Noto Serif", Georgia, serif;
  --f-body: "EB Garamond", Georgia, "Times New Roman", serif;     /* the same pairing as bari.relugames.com: Prata + EB Garamond */
  --f-ui: "EB Garamond", Georgia, "Times New Roman", serif;
  --ease-brush: cubic-bezier(.62, .02, .32, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --bar-h: 58px;
}
html[lang="ko"] { --f-brush: "BrushKo", "Song Myung", "Noto Serif KR", serif; --f-body: "Noto Serif KR", "Nanum Myeongjo", "AppleMyungjo", "Batang", serif; --f-ui: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif; }
html[lang="ja"] { --f-brush: "BrushJa", "Yu Mincho", "Hiragino Mincho ProN", serif; --f-body: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif; --f-ui: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif; }
html[lang="zh-CN"] { --f-brush: "BrushCn", "Songti SC", "SimSun", serif; --f-body: "Noto Serif SC", "Songti SC", "SimSun", serif; --f-ui: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
html[lang="zh-TW"] { --f-brush: "BrushTw", "Songti TC", "PMingLiU", serif; --f-body: "Noto Serif TC", "Songti TC", "PMingLiU", serif; --f-ui: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif; }
html[lang="ko"] body { word-break: keep-all; }
/* EB Garamond runs small for UI text, so the Latin/Cyrillic languages are scaled up a little; the CJK faces keep their sizes */
html:not(:lang(ko)):not(:lang(ja)):not(:lang(zh)) { font-size: 106%; }
html:not(:lang(ko)):not(:lang(ja)):not(:lang(zh)) .btn { font-size: 1.08rem; letter-spacing: .04em; }
html:not(:lang(ko)):not(:lang(ja)):not(:lang(zh)) .task__name { font-size: 1.15rem; }
html:not(:lang(ko)):not(:lang(ja)):not(:lang(zh)) .task__desc, html:not(:lang(ko)):not(:lang(ja)):not(:lang(zh)) .consent { font-size: 1rem; }
/* headings: even line breaks everywhere; the Japanese brush face has very wide kana, so it is set tighter and a bit smaller */
.hero__title, .hero__tag, .sec h2, .win h2, .enso, .modal h3 { text-wrap: balance; }
html[lang="ja"] .hero__title { font-size: clamp(1.55rem, 6.4vw, 2.2rem); letter-spacing: -.04em; }
html[lang="ja"] .hero__tag, html[lang="ja"] .sec h2, html[lang="ja"] .win h2, html[lang="ja"] .modal h3, html[lang="ja"] .enso, html[lang="ja"] .plate b, html[lang="ja"] .prize .pgame { letter-spacing: -.04em; }
html[lang="ja"] .sec h2 { font-size: 1.4rem; }   /* Korean breaks at spaces; Chinese/Japanese must break anywhere */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0; color: var(--ink); overflow-x: clip; overflow-wrap: break-word;
  background: var(--paper) url(assets/img/hanji.webp) repeat; background-size: 768px;
  font: 400 1rem/1.65 var(--f-ui); -webkit-font-smoothing: antialiased;
}
body.has-dock main { padding-bottom: 150px; }
button { font: inherit; color: inherit; }
img { display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.brush { font-family: var(--f-brush); font-weight: 400; }

/* ── top bar ───────────────────────────────────────────────── */
.bar {
  position: sticky; top: 0; z-index: 20; height: var(--bar-h);
  display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(14px, 4vw, 32px);
  background: var(--paper) url(assets/img/hanji.webp) 0 0 / 768px repeat;
  border-bottom: 1px solid rgba(22, 20, 18, .12);
}
.bar__right { display: flex; align-items: center; gap: clamp(10px, 2.6vw, 22px); }
.bar__home { font: 500 .85rem/1 var(--f-ui); letter-spacing: .04em; color: var(--ink); text-decoration: none; padding: .55rem .2rem; border-bottom: 1px solid rgba(22, 20, 18, .35); }
.bar__home:hover { border-color: var(--seal); color: var(--seal); }
.lang { position: relative; }
.lang__btn { display: flex; align-items: center; gap: .45rem; padding: .55rem .4rem; border: 0; background: none; cursor: pointer; font: 500 .85rem/1 var(--f-ui); letter-spacing: .04em; color: var(--ink); }
.lang__btn svg { width: 16px; height: 16px; }
.lang__list {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 190px; margin: 0; padding: .5rem; list-style: none;
  background: var(--paper) url(assets/img/hanji.webp); background-size: 768px; border: 1px solid rgba(22, 20, 18, .14);
  box-shadow: 0 18px 40px -18px rgba(22, 20, 18, .45); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: .25s var(--ease-out);
}
.lang.is-open .lang__list { opacity: 1; visibility: visible; transform: none; }
.lang__list button { width: 100%; text-align: left; padding: .5rem .75rem; border: 0; background: none; cursor: pointer; font: 400 .95rem/1.2 system-ui, sans-serif; color: var(--ink); }
.lang__list button:hover, .lang__list button[aria-selected="true"] { background: rgba(22, 20, 18, .07); }
.lang__list button[aria-selected="true"]::before { content: "●"; color: var(--seal); font-size: .55em; margin-right: .6em; vertical-align: .25em; }
.bar__logo img { height: 26px; width: auto; transition: opacity .35s; }
.bar.is-top .bar__logo img { opacity: 0; }
.score { font: 500 .95rem/1 var(--f-ui); display: flex; align-items: center; gap: .35em; white-space: nowrap; }   /* centred on one line with the other bar items; the big number no longer drags the label down */
.score b { font: 400 1.9rem/1 var(--f-brush); color: var(--seal); display: inline-block; min-width: 1.1ch; text-align: right; }
.score b.bump { animation: bump .6s var(--ease-out); }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.6) rotate(-4deg); } 100% { transform: scale(1); } }

main { max-width: 680px; margin: 0 auto; padding: 0 18px 80px; }

/* ── hero ──────────────────────────────────────────────────── */
.hero { position: relative; text-align: center; padding: 22px 0 6px; isolation: isolate; }
.hero::before { /* a drop of ink that has bled into the paper */
  content: ""; position: absolute; z-index: -1; left: 50%; top: -4%; width: min(960px, 100vw); aspect-ratio: 1; transform: translateX(-50%);
  background: url(assets/img/ink-bloom.webp) center / contain no-repeat; opacity: .10; pointer-events: none;
}
@media (max-width: 560px) { .hero::before { background-image: url(assets/img/ink-bloom-1400.webp); } }
.hero__logo { position: relative; width: min(420px, 78vw); margin: 0 auto; }
.hero__mark { width: 100%; height: auto; }
.hero__seal { position: absolute; width: 9.5%; height: auto; right: -8%; bottom: -4%; transform: rotate(-3deg); }
.hero__seal.intro { animation: press .7s cubic-bezier(.5, 0, .75, 0) .35s both; }
.hero__title { margin: 22px 0 0; font: 400 clamp(1.9rem, 7vw, 2.6rem)/1.2 var(--f-brush); letter-spacing: .02em; }
.hero__tag { margin: 8px 0 0; font: 400 1.15rem/1.5 var(--f-brush); color: var(--ink-soft); letter-spacing: .03em; }
.hero__sub { margin: 4px 0 0; font: 400 .95rem/1.6 var(--f-body); color: var(--ash); }
.prizes { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 20px 0 0; padding: 0; list-style: none; }
.plate {
  padding: 8px 16px 9px; background: #fbf3e4 url(assets/img/paper-1.webp) 0 0 / 866px 568px; border: 1px solid rgba(22, 20, 18, .55); border-radius: 3px;
  box-shadow: 2px 3px 0 rgba(22, 20, 18, .12); text-align: center; line-height: 1.25; transform: rotate(-.8deg);
}
.plate:nth-child(2) { transform: rotate(.7deg); } .plate:nth-child(3) { transform: rotate(-.4deg); }
.glink { color: inherit; text-decoration: none; }
.thumb { display: block; width: 92px; height: auto; border: 1px solid rgba(22, 20, 18, .55); border-radius: 2px; box-shadow: 2px 2px 0 rgba(22, 20, 18, .14); background: var(--paper-deep); transition: transform .35s var(--ease-out); }
.glink:hover .thumb { transform: translateY(-2px) rotate(-1deg); }
.plate .glink { display: block; }
.plate .thumb { margin: 0 auto 6px; }
.task__body > .glink { display: inline-block; margin-bottom: 6px; }
.task__name .glink { text-decoration: underline dotted rgba(22, 20, 18, .45); text-underline-offset: 4px; }
.task__name .glink:hover { text-decoration-color: var(--seal); color: var(--seal); }
.plate b { display: block; font: 400 1.05rem/1.25 var(--f-brush); }
.plate span { font-size: .72rem; color: var(--ash); letter-spacing: .08em; }
.hero::after { /* mist along the bottom edge, as on the homepage */
  content: ""; position: absolute; z-index: -1; left: 50%; width: min(1000px, 100vw); transform: translateX(-50%); bottom: -40px; height: 160px;
  background: url(assets/img/fog-720.webp) center bottom / 100% 100% no-repeat; opacity: .35; pointer-events: none;
}

/* ── buttons: brushed ink slabs ────────────────────────────── */
.btn {
  --h: 52px; position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  height: var(--h); padding: 0 1.9rem; margin: 0; border: 0; background: none; cursor: pointer;
  font: 600 1rem/1 var(--f-ui); letter-spacing: .05em; white-space: nowrap; color: var(--paper); text-decoration: none;
  transition: transform .35s var(--ease-out), color .3s; -webkit-tap-highlight-color: transparent;
}
.btn { --ink-img: url(assets/img/ink-swipe.webp); }
.btn::before {   /* brushed ink slab: one seamless image; its crisp edge and ink rim are baked into the art (scripts/make-brush.py) */
  content: ""; position: absolute; inset: -6px -14px; z-index: -1;
  background: var(--ink-img) center / 100% 100% no-repeat;
  transition: transform .45s var(--ease-brush), filter .3s;
}
.btn:hover { transform: translateY(-2px); }
.btn:hover::before { transform: scaleX(1.06) scaleY(1.08); }
.btn:active { transform: translateY(1px) scale(.97); }
.btn:focus-visible { outline: 2px solid var(--seal); outline-offset: 10px; }
.btn--seal { --ink-img: url(assets/img/ink-swipe-red.webp); }
.btn--sm { --h: 48px; font-weight: 600; }      /* secondary red actions: notify, homepage link */
.btn--lg { --h: 58px; padding: 0 2.4rem; font-size: 1.08rem; }
.btn:disabled { cursor: default; }
.btn:disabled:hover { transform: none; }
.btn:disabled:hover::before { transform: none; }

/* the "next step" button: 완료했어요 */
.btn--call { --h: 56px; padding: 0 2.3rem; font-size: 1.08rem; }
.btn--call .btn__bar { position: absolute; left: 12px; right: 12px; bottom: 9px; height: 3px; border-radius: 2px; background: rgba(236, 229, 214, .28); overflow: hidden; }
.btn--call .btn__bar i { display: block; height: 100%; width: calc(var(--p, 0) * 1%); background: var(--paper); transition: width .5s linear; }
.btn--call.is-wait { filter: saturate(.55) brightness(.92); }
.btn--call.is-ready .btn__bar { display: none; }
.btn--call.is-ready { animation: callBob 1.5s ease-in-out infinite, callIn .6s var(--ease-out) both; }
.btn--call.is-ready::after { /* ink bleeding outward, over and over */
  content: ""; position: absolute; inset: -16px -30px; z-index: -2; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(178, 34, 30, 0) 66%, rgba(178, 34, 30, .62) 82%, rgba(178, 34, 30, 0) 100%);
  animation: callRipple 1.5s ease-out infinite;
}
.btn--call.is-ready:hover { animation-play-state: paused, running; }
@keyframes callBob { 0%, 100% { translate: 0 0; scale: 1; } 45% { translate: 0 -4px; scale: 1.06; } }
@keyframes callRipple { 0% { transform: scale(.7); opacity: .95; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes callIn { 0% { filter: brightness(1.7) saturate(.5); } 100% { filter: none; } }

/* ── cards ─────────────────────────────────────────────────── */
.sec { margin-top: 34px; }
.sec h2 { margin: 0 0 14px; font: 400 1.55rem/1.3 var(--f-brush); letter-spacing: .03em; }
.sec h2::after { content: ""; display: block; width: 3.4em; height: 8px; margin-top: 4px; opacity: .85; background: url(assets/img/ink-swipe.webp) left center / 100% 100% no-repeat; }
.card {
  position: relative; isolation: isolate; margin: 24px 0; padding: 18px 22px; border: 0; background: none; border-radius: 0;
  /* two light shadows follow the torn outline: a thin contact edge and a soft lift */
  filter: drop-shadow(1px 2px 0 rgba(22, 20, 18, .15)) drop-shadow(3px 6px 6px rgba(22, 20, 18, .13));
}
.card::before {   /* the sheet: real mulberry-hanji tile, edge torn and fibrous (SVG filter #torn, defined in index.html) */
  content: ""; position: absolute; inset: -3px -5px; z-index: -1; pointer-events: none;
  background: #fbf3e4 url(assets/img/paper-2.webp) 0 0 / 866px 568px;
  box-shadow: inset 0 0 12px rgba(150, 120, 70, .18);
  filter: url(#torn);
}
.card:nth-of-type(even)::before { background-position: 330px 150px; }   /* neighbouring sheets never show the same flecks */
.card:nth-of-type(odd) { transform: rotate(.28deg); }                   /* a slight tilt, as if laid down by hand */
.card:nth-of-type(even) { transform: rotate(-.34deg); }
.muted { color: var(--ash); font-size: .88rem; }

.task { display: grid; grid-template-columns: 64px 1fr auto; grid-template-areas: "pts body act"; gap: 6px 16px; align-items: center; transition: border-color .3s, box-shadow .3s, background .3s; }
.task__pts { grid-area: pts; width: 60px; height: 60px; border-radius: 50%; display: grid; place-content: center; text-align: center; line-height: 1; border: 2px solid var(--ink); font-family: var(--f-brush); }
.task__pts b { font: 400 1.7rem/1 var(--f-brush); }
.task__pts small { font: 400 .7rem/1 var(--f-ui); margin-top: 2px; }
.task__body { grid-area: body; min-width: 0; }
.task__name { margin: 0; font: 600 1.04rem/1.35 var(--f-ui); }
.task__desc { margin: 2px 0 0; font-size: .84rem; line-height: 1.5; color: var(--ash); }
.tag { display: inline-block; margin-bottom: 4px; padding: 1px 8px 2px; font: 600 .72rem/1.4 var(--f-ui); letter-spacing: .06em; color: var(--paper); background: var(--seal); border-radius: 2px; }
/* design A: the "Most entries" tag is a label stuck on the card's top-right corner, clear of the thumbnail and title.
   (Design B has data-design="b" on <html> and keeps its own layout.) */
html:not([data-design="b"]) .task--main .tag { position: absolute; top: -11px; right: 22px; z-index: 3; margin: 0; padding: 3px 12px 4px; transform: rotate(1.4deg); box-shadow: 1px 2px 0 rgba(22, 20, 18, .22); }
.task__act { grid-area: act; display: flex; flex-direction: column; align-items: center; gap: 4px; padding-right: 14px; }
.task__hint { font-size: .74rem; color: var(--seal); font-weight: 600; text-align: center; }
.task--main { padding: 24px 22px; }
.task--main::before { background: linear-gradient(rgba(255, 236, 228, .5), rgba(255, 236, 228, .5)), #fbf3e4 url(assets/img/paper-1.webp) 0 0 / auto, 866px 568px; box-shadow: inset 0 0 0 3px rgba(178, 34, 30, .55), inset 0 0 14px rgba(178, 34, 30, .16); }
.task--main .task__pts { width: 68px; height: 68px; background: var(--seal); border-color: var(--seal); color: var(--paper); }
.task--main .task__pts b { font-size: 2rem; }
.task--main .task__name { font-size: 1.15rem; }
.task.is-pending::before { background: linear-gradient(rgba(255, 232, 220, .6), rgba(255, 232, 220, .6)), #fbf3e4 url(assets/img/paper-1.webp) 0 0 / auto, 866px 568px; box-shadow: inset 0 0 0 3px rgba(178, 34, 30, .7), inset 0 0 16px rgba(178, 34, 30, .2); }
.task.is-done::before { background: linear-gradient(rgba(236, 229, 214, .55), rgba(236, 229, 214, .55)), #fbf3e4 url(assets/img/paper-2.webp) 0 0 / auto, 866px 568px; }
.task.is-done .task__name, .task.is-done .task__desc { opacity: .7; }
.task.is-done .task__pts { border-color: rgba(22, 20, 18, .35); color: var(--ash); background: none; }
.task--main.is-done .task__pts { background: none; }
.task--main.is-done::before { box-shadow: inset 0 0 0 2px rgba(178, 34, 30, .3), inset 0 0 12px rgba(150, 120, 70, .18); }
.task.flash { animation: flash 1.2s ease-out 2; }
@keyframes flash {
  0% { filter: drop-shadow(1px 2px 0 rgba(22, 20, 18, .15)) drop-shadow(3px 6px 6px rgba(22, 20, 18, .13)) drop-shadow(0 0 0 rgba(178, 34, 30, .8)); }
  100% { filter: drop-shadow(1px 2px 0 rgba(22, 20, 18, .15)) drop-shadow(3px 6px 6px rgba(22, 20, 18, .13)) drop-shadow(0 0 22px rgba(178, 34, 30, 0)); }
}

/* the completed seal, pressed like the 낙관 on the homepage */
.stamp { display: grid; place-items: center; align-content: center; gap: 2px; width: 62px; height: 62px; border: 3px solid var(--seal); border-radius: 6px; color: var(--seal); transform: rotate(-3deg); font: 400 1.35rem/1 var(--f-brush); opacity: .92; }
.stamp .s-long { font-size: 1rem; }
/* Latin/Cyrillic words are wider than two CJK characters, so the seal text is smaller there */
html:not(:lang(ko)):not(:lang(ja)):not(:lang(zh)) .stamp > span { font-size: 1.02rem; }
html:not(:lang(ko)):not(:lang(ja)):not(:lang(zh)) .stamp .s-long { font-size: .8rem; }
.stamp small { font: 600 .68rem/1 var(--f-ui); letter-spacing: .02em; }
.just .stamp, .stamp.press { animation: press .55s cubic-bezier(.5, 0, .75, 0) both; }
@keyframes press {
  0% { opacity: 0; transform: rotate(-9deg) scale(1.8); }
  70% { opacity: 1; transform: rotate(-2.5deg) scale(.94); }
  100% { opacity: .92; transform: rotate(-3deg) scale(1); }
}
.just { animation: settle .5s var(--ease-out) .5s; }
@keyframes settle { 0% { translate: 0 0; } 40% { translate: 0 3px; } 100% { translate: 0 0; } }

/* ── sign-in card ──────────────────────────────────────────── */
.login p { margin: 0 0 12px; font: 400 1.02rem/1.6 var(--f-body); }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: .9rem; line-height: 1.55; padding: 10px 12px; margin: 0 -12px; border-radius: 4px; border: 2px solid transparent; cursor: pointer; }
.consent input { flex: none; width: 22px; height: 22px; margin-top: 1px; accent-color: var(--seal); cursor: pointer; }
.consent.nudge { border-color: var(--seal); background: rgba(178, 34, 30, .07); animation: nudge .55s var(--ease-out) 2; }
details { font-size: .8rem; color: var(--ash); margin: 4px 0 0 34px; }
summary { cursor: pointer; }
.providers { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px 22px; margin: 26px 8px 8px; }
.providers .btn { width: 100%; }

/* ── states ────────────────────────────────────────────────── */
.quiet { text-align: center; padding: 14px 0 4px; }
.enso { width: min(460px, 94vw); margin: 0 auto; aspect-ratio: 482 / 491; display: grid; place-content: center; padding: 15% 15.5%; background: url(assets/img/enso.webp) center / contain no-repeat; font: 400 clamp(1.1rem, 4.4vw, 1.4rem)/1.45 var(--f-brush); overflow-wrap: anywhere; }   /* a roomy circle: long dates (English, German, Portuguese) used to spill out of it */
.enso small { display: block; margin-top: 6px; font: 400 .78rem/1.5 var(--f-ui); color: var(--ash); }
.notice { margin: 14px 0; padding: 10px 14px; border-left: 4px solid var(--seal); background: rgba(178, 34, 30, .07); font-size: .9rem; }
.bye { margin-top: 40px; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.bye--small { margin-top: 14px; }
.link { border: 0; background: none; cursor: pointer; color: var(--ash); text-decoration: underline; text-underline-offset: 3px; font-size: .84rem; padding: 6px 8px; }
.link:hover { color: var(--ink); }
.notify-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ── results ───────────────────────────────────────────────── */
.win h2 { font-size: 2rem; }
.prize {
  position: relative; isolation: isolate; display: block; width: calc(100% - 28px); margin: 30px auto; padding: 26px 26px 24px; text-align: left; cursor: pointer;
  border: 0; background: none; color: var(--paper); -webkit-tap-highlight-color: transparent;
}
.prize::before {
  content: ""; position: absolute; inset: -10px -16px; z-index: -1; background: url(assets/img/ink-swipe.webp) center / 100% 100% no-repeat;
  transition: transform .5s var(--ease-brush);
}
.prize:hover::before { transform: scaleX(1.025) scaleY(1.06); }
.prize.is-open::before { inset: -22px -22px; }
.prize:active { transform: scale(.985); }
.prize:not(.is-open) { animation: callBob 2.4s ease-in-out infinite; }
.prize .phead { display: flex; gap: 14px; align-items: center; padding-right: calc(11% + 62px); }
.prize .thumb { border-color: var(--paper); box-shadow: none; flex: none; width: 84px; }
.prize .pgame { display: block; font: 400 1.55rem/1.25 var(--f-brush); letter-spacing: .02em; }
.prize .pkind { display: block; margin-top: 2px; font-size: .78rem; letter-spacing: .12em; opacity: .75; }
.prize .hint { display: inline-block; margin-top: 14px; padding: 6px 16px; border: 1.5px solid var(--paper); border-radius: 99px; font: 600 .95rem/1.3 var(--f-ui); letter-spacing: .04em; }
.prize:not(.is-open) .hint { animation: hintGlow 1.6s ease-in-out infinite; }
@keyframes hintGlow { 0%, 100% { background: transparent; color: var(--paper); } 50% { background: var(--paper); color: var(--ink); } }
.prize .stamp { position: absolute; top: 14px; right: 11%; width: 56px; height: 56px; font-size: 1.2rem; color: #e9564f; border-color: #e9564f; }
.prize code {
  display: block; margin-top: 16px; padding: 14px 16px; background: var(--paper) url(assets/img/hanji.webp) 0 0 / 768px; color: var(--ink); border-radius: 3px;
  font: 700 1.2rem/1.35 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .06em; word-break: break-all; overflow-wrap: anywhere; user-select: all; cursor: text;
  animation: unroll .55s var(--ease-out) both; transform-origin: top;
}
@keyframes unroll { 0% { opacity: 0; transform: scaleY(.2); } 100% { opacity: 1; transform: none; } }
.prize .after { display: block; margin-top: 10px; font-size: .82rem; line-height: 1.55; opacity: .88; }

/* ── dock: the loud "완료했어요" bar when you come back ──────── */
#dock { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; padding: 0 12px calc(12px + env(safe-area-inset-bottom)); pointer-events: none; display: flex; justify-content: center; }
#dock:empty { display: none; }
.dock__in {
  pointer-events: auto; width: min(620px, 100%); display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 26px 14px 18px; border-radius: 10px; color: var(--paper);
  background: rgba(22, 20, 18, .97); box-shadow: 0 14px 40px rgba(22, 20, 18, .45), 0 0 0 1px rgba(236, 229, 214, .12) inset;
  animation: dockIn .55s var(--ease-out) both;
}
.dock__txt { min-width: 0; display: grid; gap: 1px; line-height: 1.4; }
.dock__txt b { font: 400 1.25rem/1.3 var(--f-brush); letter-spacing: .03em; }
.dock__txt span { font-size: .8rem; opacity: .85; }
.dock__txt em { font-style: normal; font-size: .78rem; color: #e9564f; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock__in .btn { flex: none; }
.dock__in.nudge { animation: dockIn .55s var(--ease-out) both, nudge .6s var(--ease-out) .1s 2; }
@keyframes dockIn { 0% { transform: translateY(130%); } 100% { transform: none; } }
@keyframes nudge { 0%, 100% { translate: 0 0; } 20% { translate: -9px 0; } 40% { translate: 8px 0; } 60% { translate: -5px 0; } 80% { translate: 3px 0; } }

/* ── toast + modal ─────────────────────────────────────────── */
#toast {
  position: fixed; z-index: 60; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 12px);
  width: max-content; max-width: min(92vw, 520px); padding: 11px 20px; border-radius: 4px; background: var(--ink); color: var(--paper);
  font-size: .92rem; text-align: center; opacity: 0; pointer-events: none; transition: opacity .25s, transform .35s var(--ease-out);
  box-shadow: 0 8px 24px rgba(22, 20, 18, .35); border-left: 4px solid var(--seal);
}
#toast.on { opacity: 1; transform: translate(-50%, 0); }
body.has-dock #toast { bottom: 124px; }
.overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(22, 20, 18, .55); animation: fade .25s both; }
@keyframes fade { from { opacity: 0; } }
.modal {
  width: min(440px, 100%); padding: 26px 24px 22px; border: 1.5px solid var(--ink); border-radius: 4px;
  background: #fbf3e4 url(assets/img/paper-1.webp) 0 0 / 866px 568px; box-shadow: 6px 8px 0 rgba(22, 20, 18, .25);
  animation: rise .45s var(--ease-out) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.modal h3 { margin: 0 0 8px; font: 400 1.5rem/1.3 var(--f-brush); }
.modal p { margin: 0 0 10px; font-size: .9rem; }
.modal input[type=email] { width: 100%; margin: 6px 0; padding: 11px 12px; font: inherit; color: var(--ink); background: rgba(255, 251, 240, .75); border: 1px solid rgba(22, 20, 18, .45); border-radius: 3px; }
.modal input[type=email]:focus { outline: 2px solid var(--seal); outline-offset: 1px; }
.warn { margin: 10px 0; padding: 9px 12px; font-size: .84rem; line-height: 1.5; color: #6e130f; background: rgba(178, 34, 30, .09); border-left: 4px solid var(--seal); }
.err { min-height: 1.3em; color: var(--seal); font-size: .84rem; font-weight: 600; }
.modal .row { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; margin-top: 14px; padding: 0 10px; }

@media (max-width: 560px) { .bar__home { display: none; } }
/* narrow phones: the globe alone is enough (its label is still announced to screen readers), so long score labels fit */
@media (max-width: 440px) { #lang-label { display: none; } .bar__right { gap: 8px; } .score { font-size: .88rem; } .score b { font-size: 1.7rem; } }
@media (max-width: 520px) {
  .task { grid-template-columns: 56px 1fr; grid-template-areas: "pts body" "act act"; }
  .task__pts { width: 54px; height: 54px; }
  .task--main .task__pts { width: 60px; height: 60px; }
  .task__act { flex-direction: row; justify-content: flex-end; padding-right: 14px; margin-top: 8px; gap: 12px; }
  .task__act .btn { flex: 1; max-width: 280px; }
  .task.is-done { grid-template-columns: 56px 1fr auto; grid-template-areas: "pts body act"; }
  .task.is-done .task__act { margin-top: 0; padding-right: 4px; }
  .dock__in { padding: 12px 22px 12px 14px; gap: 10px; }
  .dock__txt b { font-size: 1.1rem; }
  .btn--call { padding: 0 1.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .btn--call.is-ready::after { opacity: .5; transform: scale(1.2); }
}

/* the entry coin: inline before the section heading and the entries counter */
.coin { display: inline-block; width: 1.05em; height: 1.05em; margin: 0 .4em 0 0; vertical-align: -.14em; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .35)); }
.sec h2 .coin { width: .95em; height: .95em; }

/* the coin goes in front of the number like a price tag: [coin]10 (in every language; a language with a unit word keeps it under the number) */
.task__pts.is-coin b { display: inline-flex; align-items: center; gap: .13em; }
.task__pts.is-coin .coin { width: .6em; height: .6em; margin: 0; vertical-align: baseline; filter: none; }
.score .coin { width: 1.05em; height: 1.05em; margin: 0 .08em 0 .1em; vertical-align: -.17em; }
.score b + .coin { display: none; }

/* one line under the heading that says what the coin picture stands for (only for languages whose unit is the coin) */
.coin-legend { margin: -4px 0 16px; font-size: 1.05rem; font-weight: 600; letter-spacing: .02em; }
.coin-legend .coin { width: 1.25em; height: 1.25em; margin-right: .35em; vertical-align: -.25em; filter: none; }

.score .coin { align-self: center; vertical-align: baseline; margin-top: 0; }

/* section headings live inside the paper they introduce: the sign-in card, and the top of the main task card */
.card__title, .task__title { margin: 0; font: 400 1.5rem/1.3 var(--f-brush); letter-spacing: .03em; }
.card__title { margin-bottom: 10px; }
.task__title .coin { width: .95em; height: .95em; margin: 0 .4em 0 0; vertical-align: -.12em; filter: none; }
.task__head { grid-area: head; margin: 0 0 4px; }
.task__head .coin-legend { margin: 2px 0 0; font-size: 1rem; }
.task--main, .task--main.is-done { grid-template-areas: "head head head" "pts body act"; }
@media (max-width: 520px) { .task--main { grid-template-areas: "head head" "pts body" "act act"; } }
@media (max-width: 520px) { .task--main.is-done { grid-template-areas: "head head head" "pts body act"; } }
html[lang="ja"] .task__title, html[lang="ja"] .card__title { letter-spacing: -.04em; }

/* the schedule: three dates inside the headline paper (shown in the visitor's own time zone) */
.sched { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin: 14px auto 0; padding: 10px 4px 0; max-width: 720px; border-top: 1px solid rgba(22, 20, 18, .22); }
.sched__i { text-align: center; min-width: 0; }
.sched dt { font: 600 .72rem/1.3 var(--f-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--ash); }
.sched dd { margin: 1px 0 0; font: 500 .86rem/1.35 var(--f-ui); color: var(--ink); }
.sched time { white-space: normal; }
@media (max-width: 520px) { .sched { gap: 8px 16px; padding-top: 8px; } .sched__i { flex: 1 1 140px; } }

/* schedule: one date under another (label left, date right), easier to read than three columns side by side */
.sched { display: grid; grid-template-columns: auto auto; justify-content: center; align-items: baseline; gap: 5px 16px; }
.sched__i { display: contents; }
.sched dt { text-align: right; }
.sched dd { margin: 0; text-align: left; }
.sched time { white-space: normal; }

/* the entries counter: a soft rose-paper tag under the headline card instead of small text in the top bar */
.bar__right .score { display: none; }
.score-slot { display: flex; justify-content: center; margin: 22px auto 0; }
.score-slot .score:empty { display: none; }
.score-slot .score { display: inline-flex; align-items: center; gap: .5em; padding: 10px 26px 12px; border-radius: 6px; font: 600 1.05rem/1 var(--f-ui); color: #6b3f34; background: #f1d9cd; border: 1px solid #dcb2a2; box-shadow: 0 0 0 3px rgba(255, 244, 236, .55) inset, 0 5px 14px rgba(0, 0, 0, .18); letter-spacing: .02em; }
.score-slot .score b { font: 400 2.6rem/1 var(--f-brush); color: #b4574a; min-width: 1.1ch; }
.score-slot .score .coin { width: 1.6em; height: 1.6em; }
@media (max-width: 440px) { .score-slot .score { font-size: .95rem; padding: 9px 20px 11px; } .score-slot .score b { font-size: 2.2rem; } }

/* a notice that points at the pressed button: bigger and longer than the bottom toast */
.bubble { position: absolute; z-index: 70; width: min(360px, calc(100vw - 24px)); padding: 16px 20px 17px; border-radius: 6px; background: var(--ink); color: var(--paper); font-size: 1.05rem; line-height: 1.55; text-align: left; border-left: 5px solid var(--seal); box-shadow: 0 12px 32px rgba(22, 20, 18, .45); animation: bubble-in .28s var(--ease-out) both; }
.bubble::after { content: ""; position: absolute; left: var(--ax, 50%); width: 14px; height: 14px; background: var(--ink); transform: translateX(-50%) rotate(45deg); }
.bubble--up::after { bottom: -7px; }
.bubble--down::after { top: -7px; }
@keyframes bubble-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .bubble { animation: none; } }
