/* Зимова ніч із гірляндою вгорі; бажання — паперові бирки на нитках у сітці.
   Свідомо одна (темна) тема: це святкова «вітрина», а не робочий інструмент. */
@font-face { font-family: "Marck Script"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/static/fonts/marck-cyr.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Marck Script"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/static/fonts/marck-lat.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 200 1000; font-display: swap;
  src: url(/static/fonts/nunito-cyr.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 200 1000; font-display: swap;
  src: url(/static/fonts/nunito-lat.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212; }

:root {
  --night: #0b1a24;
  --night-2: #12293a;
  --frost: #eaf2f5;
  --frost-dim: #a3b9c4;
  --gold: #f2c14e;
  --berry: #d8435b;
  --pine: #3f8a64;
  --paper: #f8f2e7;
  --paper-2: #efe5d3;
  --ink: #1e2b33;
  --ink-dim: #5d6a70;
  --line: rgba(234, 242, 245, .16);
  --f-display: "Marck Script", "Segoe Script", cursive;
  --f-body: "Nunito", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html { background: var(--night); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: radial-gradient(1200px 500px at 50% -120px, var(--night-2), transparent 70%), var(--night);
  color: var(--frost);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
#snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.wrap {
  position: relative; z-index: 1;
  max-width: 1000px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 0 48px;
}

.garland { display: block; width: 100%; height: 64px; margin-top: 4px; }
.bulb { animation: twinkle 2.6s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

header.hero { text-align: center; padding-block: 8px 28px; display: grid; gap: 10px; justify-items: center; }
.eyebrow { font-weight: 700; letter-spacing: .18em; text-transform: uppercase; font-size: 12px; color: var(--gold); }
h1 {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(52px, 11vw, 96px); line-height: 1; margin: 0;
  text-wrap: balance; text-shadow: 0 0 28px rgba(242, 193, 78, .25);
}
.lede { max-width: 52ch; margin: 0; color: var(--frost-dim); text-wrap: balance; }
.countdown { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; justify-content: center; }
.cd { min-width: 74px; padding: 10px 12px 8px; border: 1px solid var(--line); border-radius: 12px; background: rgba(18, 41, 58, .6); }
.cd b { display: block; font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.cd span { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--frost-dim); }
.cd-label { font-size: 13px; color: var(--frost-dim); }

.bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-block: 8px 20px; }
.stats { color: var(--frost-dim); font-size: 14px; font-variant-numeric: tabular-nums; }
.stats b { color: var(--frost); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; color: var(--frost-dim); font: inherit; font-size: 14px; font-weight: 700; padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--frost); color: var(--night); }

.note { border: 1px dashed var(--line); border-radius: 12px; padding: 12px 16px; color: var(--frost-dim); font-size: 14px; margin-bottom: 20px; }
.note b { color: var(--gold); font-weight: 700; }

details.add { border: 1px solid var(--line); border-radius: 14px; background: rgba(18, 41, 58, .55); margin-bottom: 24px; }
details.add summary { cursor: pointer; padding: 14px 18px; font-weight: 800; list-style: none; display: flex; align-items: center; gap: 10px; }
details.add summary::-webkit-details-marker { display: none; }
details.add summary::before { content: "+"; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--gold); color: var(--night); font-weight: 800; }
details.add[open] summary::before { content: "–"; }
form.addform { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; padding: 4px 18px 18px; }
.f { display: grid; gap: 4px; min-width: 0; }
.f label, .login label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--frost-dim); }
.f input, .f select, .login input {
  font: inherit; color: var(--frost); background: var(--night); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 11px; width: 100%; min-width: 0;
}
.f-title { grid-column: span 4; } .f-price { grid-column: span 1; } .f-prio { grid-column: span 1; }
.f-link { grid-column: span 3; } .f-note { grid-column: span 3; }
.addform .actions { grid-column: 1 / -1; display: flex; gap: 12px; align-items: center; }
@media (max-width: 640px) {
  form.addform { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .f-title, .f-link, .f-note { grid-column: 1 / -1; }
  .f-price, .f-prio { grid-column: span 1; }
}

.btn { font: inherit; font-weight: 800; font-size: 14px; border: 0; cursor: pointer; border-radius: 999px; padding: 9px 16px; background: var(--gold); color: var(--night); }
.btn:hover { filter: brightness(1.07); }
.btn.berry { background: var(--berry); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink-dim); border: 1px solid rgba(30, 43, 51, .2); }
.btn:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 34px 22px; }
.hang { position: relative; padding-top: 26px; transform-origin: 50% 0; transition: transform .4s cubic-bezier(.3, 1.6, .5, 1); filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .35)); min-width: 0; }
.hang:nth-child(3n+1) { transform: rotate(-1.4deg); }
.hang:nth-child(3n+2) { transform: rotate(1deg); }
.hang:nth-child(3n) { transform: rotate(-.4deg); }
.hang:hover { transform: rotate(0deg); }
.hang::before { content: ""; position: absolute; top: 0; left: 50%; width: 2px; height: 34px; margin-left: -1px; background: var(--gold); opacity: .8; }
.tag {
  position: relative; background: var(--paper); color: var(--ink);
  clip-path: polygon(16% 0, 84% 0, 100% 34px, 100% 100%, 0 100%, 0 34px);
  border-radius: 0 0 12px 12px;
  padding: 40px 20px 18px; display: grid; gap: 10px; min-height: 210px; align-content: start;
}
.tag::before { content: ""; position: absolute; top: 12px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--night); box-shadow: 0 0 0 3px var(--gold); }
.tag .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.stars { color: var(--berry); letter-spacing: 2px; font-size: 15px; }
.stars .dim { color: rgba(30, 43, 51, .2); }
.prio-txt { font-size: 12px; font-weight: 700; color: var(--ink-dim); }
.tag h3 { margin: 0; font-size: 20px; line-height: 1.25; font-weight: 800; text-wrap: balance; overflow-wrap: anywhere; }
.tag p { margin: 0; color: var(--ink-dim); font-size: 14.5px; overflow-wrap: anywhere; }
.price { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 17px; }
.price small { font-weight: 600; color: var(--ink-dim); font-size: 13px; }
.tag a.link { color: #1f6f8b; font-weight: 700; font-size: 14px; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: auto; padding-top: 8px; border-top: 1px dashed rgba(30, 43, 51, .18); }
.foot .msg { font-size: 13.5px; color: var(--ink-dim); flex: 1 1 140px; min-width: 0; }
.foot .msg.mine { color: var(--pine); font-weight: 800; }
.tag.reserved { background: var(--paper-2); }
.tag.reserved h3, .tag.reserved .price { opacity: .55; }
.stamp {
  display: inline-block; transform: rotate(6deg);
  border: 2px solid var(--berry); color: var(--berry); border-radius: 8px;
  font-weight: 800; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; padding: 3px 8px; background: rgba(248, 242, 231, .7);
}
.tag.mine-res .stamp { border-color: var(--pine); color: var(--pine); }

.empty { text-align: center; color: var(--frost-dim); border: 1px dashed var(--line); border-radius: 14px; padding: 36px 20px; display: grid; gap: 6px; justify-items: center; }
.empty strong { font-family: var(--f-display); font-weight: 400; font-size: 34px; color: var(--frost); }

footer { margin-top: 48px; text-align: center; color: var(--frost-dim); font-size: 13px; display: grid; gap: 10px; justify-items: center; }
footer p { margin: 0; }
.linkbtn { background: none; border: 0; color: var(--frost-dim); font: inherit; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; opacity: .7; }
.login { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; justify-content: center; text-align: left; }
.login label { width: 100%; text-align: center; }
.login input { width: 220px; max-width: 100%; }

.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  background: var(--frost); color: var(--night); font-weight: 700; padding: 10px 18px; border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4); z-index: 20; max-width: calc(100% - 32px); text-align: center;
}
@media (prefers-reduced-motion: reduce) {
  .bulb { animation: none; }
  .hang { transition: none; }
}
