/* Moș Gerilă Secret, ediția de familie (Miercurea Ciuc).
   70% Crăciun, 30% broșură de cooperativă: hârtie îngălbenită, tipar offset
   decolorat, logo scris de mână, dungi, ștampile, decupaje și beton. */

:root {
  --bg: #e7dcc4;
  --card: #f1e8d4;
  --card-2: #e8ddc4;
  --ink: #2b2721;
  --muted: #6b6253;
  --line: #cfc0a0;
  --border: #2b2721;
  --shadow: rgba(43, 39, 33, .5);
  --red: #a4473a;
  --red-2: #8e3a2f;
  --red-soft: #ead3c4;
  --green: #4e6047;
  --green-2: #415239;
  --green-soft: #dadcc6;
  --blue: #5b7d86;
  --blue-soft: #d4dbd5;
  --mustard: #b98d3e;
  --mustard-soft: #ecdcb6;
  --orange: #b7683f;
  --violet-ink: #5b5a8c;
  --cream: #f3ead6;
  --paper: #f3ebd8;     /* physical paper things: calendar, tickets, documents */
  --paper-ink: #2b2721;

  --font-script: "Yellowtail", "Brush Script MT", cursive;
  --font-display: "Unbounded", "Arial Black", sans-serif;
  --font-cond: "Sofia Sans Extra Condensed", "Arial Narrow", sans-serif;
  --font-body: "Sofia Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-type: "Courier Prime", "Courier New", monospace;

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .22 0 0 0 0 .1 0 0 0 .85 -.42'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23g)'/%3E%3C/svg%3E");
  --halftone: radial-gradient(circle at 1.5px 1.5px, rgba(0, 0, 0, .16) 1.1px, transparent 1.6px);
  --guilloche: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='18'%3E%3Cg fill='none' stroke='%23f3ead6' stroke-opacity='.32' stroke-width='1.1'%3E%3Cpath d='M0 9 Q11 0 22 9 T44 9'/%3E%3Cpath d='M0 9 Q11 18 22 9 T44 9'/%3E%3C/g%3E%3C/svg%3E");
  --stripes: linear-gradient(to bottom, var(--red) 0 33%, var(--mustard) 33% 66%, var(--green) 66% 100%);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1e1f21;
    --card: #27282a;
    --card-2: #2f3032;
    --ink: #e8dfcb;
    --muted: #a49d8f;
    --line: #3d3e40;
    --border: #0f1011;
    --shadow: rgba(0, 0, 0, .55);
    --red: #c46b5c;
    --red-2: #d07d6f;
    --red-soft: #3a2a27;
    --green: #6e8162;
    --green-2: #7f9273;
    --green-soft: #2b3129;
    --blue: #86a3aa;
    --blue-soft: #283235;
    --mustard: #cfa75c;
    --mustard-soft: #3a3324;
    --violet-ink: #a3a2d6;
    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .95 0 0 0 0 .9 0 0 0 0 .8 0 0 0 .8 -.45'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23g)'/%3E%3C/svg%3E");
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }

body {
  background-color: var(--bg);
  background-image: var(--grain);
  color: var(--ink);
  font: 17px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.wrap { position: relative; max-width: 720px; margin: 0 auto; padding: 18px 16px 70px; }
::selection { background: var(--mustard-soft); }

/* ---------- type ---------- */

h1, h2 { font-family: var(--font-display); margin: 0; line-height: 1.04; }
h1 {
  font-size: clamp(30px, 7.6vw, 54px);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-shadow: 2px 2px 0 color-mix(in srgb, var(--red) 22%, transparent);
}
h1.long { font-size: clamp(22px, 6.2vw, 36px); }
h1 em { font-style: normal; color: var(--red); }
h2 { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 6px; }
h3 { font-family: var(--font-body); font-size: 19px; font-weight: 800; margin: 0; }

.eyebrow {
  font-family: var(--font-cond);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 8px;
}
.lead { font-size: 19px; color: var(--muted); margin: 14px 0 0; max-width: 34em; }
.type { font-family: var(--font-type); }

/* ---------- header ---------- */

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 10px; }
.brand { display: inline-flex; align-items: baseline; gap: 8px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand .logo {
  font-family: var(--font-script);
  font-size: 36px;
  line-height: 1;
  color: var(--red);
  text-shadow: 1.5px 1.5px 0 color-mix(in srgb, var(--mustard) 35%, transparent);
}
.brand .edition { font-family: var(--font-cond); font-weight: 800; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stripes { height: 9px; background: var(--stripes); margin: 0 0 28px; border-radius: 2px; }
@media (max-width: 420px) { .brand .edition { display: none; } .brand .logo { font-size: 32px; } }

/* Rubber stamps */
.pill {
  display: inline-block;
  font-family: var(--font-cond);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .05em;
  text-transform: uppercase;
  line-height: 1.2;
  padding: 2px 8px;
  border: 2.5px solid currentColor;
  border-radius: 4px;
  color: var(--green);
  transform: rotate(-3deg);
  white-space: nowrap;
}
.pill.red { color: var(--red); }
.pill.gold { color: var(--mustard); }
.pill.blue { color: var(--blue); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill:not(.red):not(.gold):not(.blue) { color: var(--green-2); } }

.hero { position: relative; margin: 0 0 30px; }

/* ---------- cards ---------- */

.card {
  position: relative;
  background-color: var(--card);
  background-image: var(--grain);
  border: 2px solid var(--border);
  border-radius: 4px;
  box-shadow: 4px 4px 0 var(--shadow);
  padding: 22px;
  margin: 0 0 26px;
}
.card > .sub { color: var(--muted); margin: 0 0 18px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.section-head h2 { margin: 0; }

/* The party: a green tourism-office poster with halftone dots. */
.event-card {
  background-color: var(--green);
  background-image: var(--halftone), var(--grain);
  background-size: 5px 5px, 180px 180px;
  color: var(--cream);
  padding-top: 32px;
  overflow: hidden;
}
.event-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 9px; background: var(--stripes); }
.event-card .eyebrow { color: var(--mustard); }
.event-card h2 { color: var(--cream); font-size: 26px; }
.event-layout { display: grid; grid-template-columns: 1fr 210px; gap: 22px; align-items: start; margin-top: 18px; }
@media (max-width: 600px) { .event-layout { grid-template-columns: 1fr; } }
.facts { display: grid; grid-template-columns: 1fr; gap: 14px; }
.fact .k { font-family: var(--font-cond); font-weight: 800; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--mustard); }
.fact .v { font-size: 19px; font-weight: 800; line-height: 1.25; margin-top: 1px; }
.fact .n { font-size: 15px; opacity: .85; margin-top: 2px; white-space: pre-line; }
.event-foot {
  margin: 22px -22px -22px;
  padding: 9px 22px;
  background: rgba(0, 0, 0, .22);
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--cream) 80%, transparent);
}

/* ---------- tear-off calendar ---------- */

.tearcal { position: relative; width: 210px; max-width: 100%; margin: 0 auto 8px; color: var(--paper-ink); }
.tc-binding {
  position: relative;
  height: 24px;
  background: var(--red);
  border: 2px solid #2b2721;
  border-radius: 6px 6px 0 0;
  z-index: 3;
}
.tc-binding::before, .tc-binding::after {
  content: "";
  position: absolute;
  top: -9px;
  width: 9px; height: 18px;
  border-radius: 6px;
  background: #c9ced3;
  border: 2px solid #2b2721;
}
.tc-binding::before { left: 44px; }
.tc-binding::after { right: 44px; }
.tc-stack { position: relative; }
.tc-page {
  position: relative;
  background-color: var(--paper);
  background-image: var(--grain);
  border: 2px solid #2b2721;
  border-top: 0;
  padding: 10px 14px 12px;
  text-align: center;
  z-index: 2;
}
.tc-stack::after {
  /* the pages still left underneath */
  content: "";
  position: absolute;
  left: 3px; right: -4px; bottom: -6px; height: 20px;
  background: #e3d8bf;
  border: 2px solid #2b2721;
  border-top: 0;
  box-shadow: 0 3px 0 -1px #dacfb4, 0 3px 0 1px #2b2721;
  z-index: 1;
}
.tc-date { font-family: var(--font-cond); font-weight: 800; font-size: 15px; letter-spacing: .05em; text-transform: uppercase; color: #a4473a; border-bottom: 1.5px dashed rgba(31, 35, 48, .4); padding-bottom: 6px; }
.tc-num { font-family: var(--font-display); font-weight: 900; font-size: 84px; line-height: .95; margin: 8px 0 0; letter-spacing: -0.04em; }
.tc-label { font-family: var(--font-cond); font-weight: 800; font-size: 16px; letter-spacing: .04em; text-transform: uppercase; }
.tc-time { font-family: var(--font-type); font-size: 13px; margin-top: 4px; }
.tc-tip { font-family: var(--font-type); font-size: 12.5px; line-height: 1.35; text-align: left; border-top: 1.5px dashed rgba(31, 35, 48, .4); margin-top: 9px; padding-top: 7px; }
.tc-tip b { color: #a4473a; }
.tc-page.tearing { position: absolute; inset: 0; z-index: 4; animation: tear-off 1.15s .55s cubic-bezier(.55, 0, .8, .2) forwards; transform-origin: 4% 0; }
@keyframes tear-off {
  0% { transform: none; opacity: 1; }
  22% { transform: rotate(-5deg); }
  100% { transform: translate(-30px, 150%) rotate(-28deg); opacity: 0; }
}

/* ---------- forms ---------- */

label.field { display: block; margin: 0 0 16px; }
label.field > span, .field-label { display: block; font-weight: 800; font-size: 15px; margin-bottom: 6px; }
label.field > small, .field small { display: block; color: var(--muted); font-size: 14px; margin-top: 5px; }
input[type="text"], input[type="email"], input[type="date"], input[type="time"], input[type="number"], select, textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--card-2);
  border: 2px solid var(--border);
  border-radius: 4px;
  padding: 10px 12px;
  outline: none;
}
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 3px var(--mustard); }
::placeholder { color: var(--muted); opacity: .8; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .row { grid-template-columns: 1fr; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-cond);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: .03em;
  text-transform: uppercase;
  line-height: 1.1;
  padding: 10px 18px;
  border-radius: 4px;
  border: 2px solid var(--border);
  background: var(--green);
  color: var(--cream);
  box-shadow: 3px 3px 0 var(--shadow);
  cursor: pointer;
  text-decoration: none;
  transition: transform .06s, box-shadow .06s, background-color .15s;
}
.btn:hover { background: var(--green-2); }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--shadow); }
.btn:focus-visible { outline: 3px solid var(--mustard); outline-offset: 2px; }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn.red { background: var(--red); }
.btn.red:hover { background: var(--red-2); }
.btn.ghost { background: var(--card); color: var(--ink); }
.btn.ghost:hover { background: var(--card-2); }
.btn.small { font-size: 16px; padding: 6px 11px; box-shadow: 2px 2px 0 var(--shadow); }
.btn.block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.linkbox { display: flex; gap: 8px; }
.linkbox input { font-family: var(--font-type); font-size: 13px; }
@media (max-width: 520px) { .linkbox { flex-direction: column; } }

/* ---------- notices ---------- */

.notice { border-radius: 4px; padding: 13px 15px; background: var(--mustard-soft); border: 2px dashed var(--border); margin: 0 0 16px; }
.notice.green { background: var(--green-soft); }
.notice.red { background: var(--red-soft); }
.notice strong { display: block; font-family: var(--font-cond); font-weight: 800; font-size: 19px; letter-spacing: .02em; text-transform: uppercase; margin-bottom: 2px; }
.error { color: var(--red); font-weight: 700; margin: 10px 0 0; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.hidden { display: none !important; }

/* ---------- Loz în plic (lottery envelope) ---------- */

.loz {
  position: relative;
  height: 300px;
  border: 2px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background-color: var(--paper);
  background-image: var(--grain);
  color: var(--paper-ink);
  isolation: isolate;
}
.loz .inside {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 22px;
  text-align: center;
  opacity: 0;
  transition: opacity .4s .7s;
}
.loz.open .inside { opacity: 1; }
.loz .win {
  font-family: var(--font-cond); font-weight: 900; font-size: 22px; letter-spacing: .08em;
  color: #5b5a8c; border: 3px solid currentColor; border-radius: 4px; padding: 0 10px;
  transform: rotate(-5deg); margin-bottom: 12px;
}
.loz .to { font-family: var(--font-cond); font-weight: 800; font-size: 17px; letter-spacing: .06em; text-transform: uppercase; }
.loz .to::before, .loz .to::after { content: "\2605"; color: #a4473a; margin: 0 .5em; }
.loz .name { font-family: var(--font-display); font-weight: 800; font-size: clamp(34px, 10vw, 56px); line-height: 1.05; color: #a4473a; margin: 6px 0 10px; word-break: break-word; }
.loz .details { font-family: var(--font-type); font-size: 14px; }

.loz-cover { position: absolute; inset: 0; display: block; width: 100%; padding: 0; margin: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
div.loz-cover { cursor: default; }
.loz-cover:focus-visible { outline: 3px solid var(--mustard); outline-offset: -6px; }
.loz-body {
  position: absolute; left: 0; right: 0; top: 48px; bottom: 0;
  background-color: #a4473a;
  background-image: var(--guilloche), var(--grain);
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
  transition: transform .85s .3s cubic-bezier(.6, 0, .3, 1);
}
.loz-panel {
  background: #f3ead6;
  color: #2b2721;
  border: 3px double #2b2721;
  border-radius: 3px;
  padding: 14px 16px;
  text-align: center;
  max-width: 330px;
  width: 100%;
  box-shadow: 0 0 0 5px #f3ead6, 0 0 0 7px #4e6047;
}
.loz-panel .series { font-family: var(--font-cond); font-weight: 800; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: #4e6047; }
.loz-panel .brand-line { font-family: var(--font-display); font-weight: 800; font-size: clamp(17px, 5vw, 22px); line-height: 1.1; color: #a4473a; margin: 4px 0; }
.loz-panel .claim { font-family: var(--font-script); font-size: 24px; color: #2b2721; line-height: 1.1; }
.loz-panel .serial { font-family: var(--font-type); font-size: 12px; margin-top: 6px; }
.loz-strip {
  position: absolute; left: 0; right: 0; top: 0; height: 48px;
  background: #c49a4a;
  border-bottom: 3px dashed #2b2721;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-cond); font-weight: 900; font-size: 19px; letter-spacing: .06em; text-transform: uppercase;
  color: #2b2721;
  transition: transform .55s cubic-bezier(.5, 0, .7, .4), opacity .55s;
  z-index: 2;
}
.loz.open .loz-strip { transform: translate(-8%, -150%) rotate(-9deg); opacity: 0; }
.loz.open .loz-body { transform: translateY(108%) rotate(2deg); }
.loz.open .loz-cover { pointer-events: none; }

/* ---------- chat ---------- */

.thread { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; max-height: 360px; overflow-y: auto; padding: 2px; }
.bubble { max-width: 82%; padding: 8px 12px; border-radius: 10px; white-space: pre-wrap; word-wrap: break-word; border: 2px solid var(--border); }
.bubble .who { display: block; font-family: var(--font-cond); font-weight: 800; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.bubble.mine { align-self: flex-end; background: var(--green); color: var(--cream); border-bottom-right-radius: 2px; }
.bubble.theirs { align-self: flex-start; background: var(--card-2); border-bottom-left-radius: 2px; }
.empty-thread { color: var(--muted); font-style: italic; margin: 12px 0; }
.composer { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { min-height: 48px; height: 48px; }

/* ---------- lists ---------- */

.list { display: flex; flex-direction: column; gap: 10px; }
.item { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; border: 2px solid var(--border); background: var(--card-2); border-radius: 4px; padding: 11px 13px; }
.item .main { min-width: 0; flex: 1; }
.item .title { font-weight: 800; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.item .meta { font-size: 14px; color: var(--muted); }
.item .quote { font-family: var(--font-type); font-size: 14px; margin-top: 3px; }
.item .side { display: flex; gap: 6px; align-items: center; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 520px) { .item { flex-direction: column; } .item .side { justify-content: flex-start; } }

.names { display: flex; flex-wrap: wrap; gap: 8px; }
.names span { font-family: var(--font-cond); font-weight: 800; font-size: 19px; letter-spacing: .02em; padding: 3px 11px; border: 2px solid var(--border); border-radius: 3px; background: var(--card-2); }
.names span:nth-child(4n + 1) { background: var(--mustard-soft); }
.names span:nth-child(4n + 2) { background: var(--blue-soft); }
.names span:nth-child(4n + 3) { background: var(--green-soft); }
.names span:nth-child(4n + 4) { background: var(--red-soft); }
.out-list { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 8px; }
.out-list li { font-size: 15px; }
.out-list b { font-family: var(--font-cond); font-weight: 800; font-size: 18px; letter-spacing: .02em; margin-right: 6px; }
.out-list span { font-family: var(--font-type); font-size: 14px; color: var(--muted); }

/* ---------- proces-verbal ---------- */

.pv {
  position: relative;
  background-color: var(--paper);
  background-image: repeating-linear-gradient(to bottom, transparent 0 25px, rgba(43, 140, 179, .18) 25px 26px), var(--grain);
  color: var(--paper-ink);
  font-family: var(--font-type);
  font-size: 15px;
  line-height: 26px;
  border: 1.5px solid #cdbf9f;
  border-left: 3px double rgba(210, 56, 44, .5);
  padding: 20px 20px 26px 26px;
  margin: 6px 0 18px;
  overflow: hidden;
}
.pv-head { text-align: center; margin-bottom: 10px; }
.pv-title { font-weight: 700; font-size: 22px; letter-spacing: .22em; }
.pv p { margin: 0 0 12px; }
.pv-list { margin: 0 0 12px; padding-left: 22px; }
.pv-list li { margin-bottom: 2px; }
.pv-line-item { display: flex; align-items: baseline; gap: 6px; }
.pv-dots { flex: 1 1 20px; border-bottom: 2px dotted rgba(31, 35, 48, .45); transform: translateY(-5px); min-width: 14px; }
.pv-ok { font-weight: 700; white-space: nowrap; color: #4e6047; }
.pv-bad { font-weight: 700; white-space: nowrap; color: #a4473a; }
.pv-sign { margin-top: 18px; max-width: 60%; }
.pv-line { border-bottom: 1.5px solid #2b2721; height: 30px; font-family: var(--font-script); font-size: 26px; line-height: 30px; padding-left: 8px; color: #34508a; }
.pv .stamp { position: absolute; right: 14px; bottom: 14px; width: 132px; color: #9c3b33; transform: rotate(-14deg); opacity: .82; mix-blend-mode: multiply; }
.pv .stamp svg { display: block; width: 100%; height: auto; }
@media (max-width: 520px) { .pv .stamp { width: 104px; right: 6px; bottom: 8px; } .pv-sign { max-width: 58%; } }

details summary { font-family: var(--font-cond); font-weight: 800; font-size: 16px; letter-spacing: .04em; text-transform: uppercase; cursor: pointer; }

footer.foot { margin-top: 36px; text-align: center; }
footer.foot .stripes { margin: 0 0 12px; height: 10px; }
footer.foot .office { font-family: var(--font-cond); font-weight: 800; font-size: 17px; letter-spacing: .08em; text-transform: uppercase; }
footer.foot .made { font-family: var(--font-type); font-size: 13px; color: var(--muted); margin-top: 2px; }

.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 4px; font-weight: 700; font-size: 15px;
  opacity: 0; transition: opacity .25s, transform .25s; z-index: 10; pointer-events: none;
  max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.skeleton { color: var(--muted); text-align: center; padding: 60px 0; font-family: var(--font-type); font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  .loz-strip, .loz-body, .loz .inside, .btn { transition: none; }
  .tc-page.tearing { display: none; }
}

/* ---------- photo cutouts (real vintage photos, torn out and taped on) ---------- */

.card::after { content: ""; display: block; clear: both; }
.cutout {
  position: relative;
  margin: 0;
  transform: rotate(var(--tilt, -3deg));
  filter: drop-shadow(2px 3px 0 rgba(43, 39, 33, .16)) drop-shadow(0 8px 14px rgba(0, 0, 0, .18));
  z-index: 2;
}
.cutout-paper { background-color: #f4ecda; background-image: var(--grain); padding: 9px 9px 0; }
.cutout-img { position: relative; }
.cutout-img img {
  display: block; width: 100%; height: auto;
  filter: sepia(.38) saturate(.72) contrast(.94) brightness(1.03);
}
.cutout-img::after {
  content: ""; position: absolute; inset: 0;
  background-image: var(--grain); mix-blend-mode: multiply; opacity: .9; pointer-events: none;
}
.cutout figcaption {
  font-family: var(--font-script);
  font-size: 21px; line-height: 1.15;
  color: #2b2721;
  padding: 6px 14px 13px;
  text-align: center;
}
.cutout .tape {
  position: absolute; left: 50%; top: -8px;
  width: 60px; height: 18px;
  transform: translateX(-50%) rotate(-4deg);
  background: rgba(238, 228, 200, .82);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
}
.cutout .label {
  position: absolute; z-index: 1;
  font-family: var(--font-cond); font-weight: 900;
  letter-spacing: .04em; text-transform: uppercase; line-height: 1;
}
.cutout .label.paper {
  background: #f4ecda; color: #a4473a;
  border: 1.5px solid #2b2721; padding: 5px 6px;
  font-size: clamp(11px, 3vw, 24px); text-align: center;
  transform: rotate(-2deg); box-shadow: 1px 2px 0 rgba(0, 0, 0, .25);
}
.cutout .label.taxi-label {
  background: #f1d06a; color: #2b2721;
  border: 1.5px solid #2b2721; padding: 2px 6px;
  font-size: clamp(9px, 2.4vw, 15px);
  transform: rotate(-6deg);
}

/* The big rooftop sign on the block of flats, sticking out above the cutout. */
.roof-sign {
  position: absolute; z-index: 3;
  left: 8%; right: 14%; top: -42px;
  display: flex; justify-content: center; gap: 3px;
  padding: 0 6px 4px;
  border-bottom: 3px solid #2b2721;
}
.roof-sign::after {
  /* the metal posts holding it up */
  content: ""; position: absolute; left: 4%; right: 4%; bottom: -16px; height: 13px;
  background: repeating-linear-gradient(90deg, #2b2721 0 2.5px, transparent 2.5px 18px);
}
.roof-sign span {
  font-family: var(--font-cond); font-weight: 900;
  font-size: 46px; line-height: 1;
  color: #c4402f;
  -webkit-text-stroke: 1px #6e1f17;
  text-shadow: 0 0 8px rgba(255, 110, 80, .55), 0 0 2px rgba(255, 240, 220, .9);
}

/* Where the cutouts sit */
.hero.with-sticker { padding-right: 270px; min-height: 210px; }
.hero > .cutout.hero { position: absolute; right: -4px; top: 34px; width: 255px; }
.cutout.side { float: right; width: 176px; margin: 6px -10px 12px 18px; }
.cutout.corner { position: absolute; top: -36px; right: -16px; width: 132px; }
.card.has-corner > h2, .card.has-corner > .sub { padding-right: 112px; }
.cutout.foot { width: 250px; margin: 0 auto 22px; }
@media (max-width: 600px) {
  .hero.with-sticker { padding-right: 0; min-height: 0; }
  .hero > .cutout.hero { position: relative; right: auto; top: auto; width: 88%; margin: 54px auto -10px; }
  .roof-sign { top: -36px; }
  .roof-sign span { font-size: 38px; }
  .cutout.side { width: 132px; margin: 4px -8px 10px 12px; }
  .cutout.side figcaption, .cutout.corner figcaption { font-size: 17px; }
  .cutout.corner { width: 108px; top: -30px; }
  .card.has-corner > h2, .card.has-corner > .sub { padding-right: 92px; }
  .cutout.foot { width: 210px; }
}
/* On wider screens the hero photo gets its own column, so the hero grows to fit
   it and the photo never hangs over the next card. */
@media (min-width: 601px) {
  .hero.with-sticker { display: grid; grid-template-columns: minmax(0, 1fr) 255px; grid-template-rows: repeat(5, auto) 1fr; column-gap: 15px; padding-right: 0; min-height: 0; }
  .hero.with-sticker > * { grid-column: 1; }
  .hero.with-sticker > .cutout.hero { grid-column: 2; grid-row: 1 / -1; position: relative; top: auto; right: auto; width: 255px; margin: 34px -4px 0 0; align-self: start; }
}
/* A small cutout tucked into the corner of a notice, with the text wrapping around it. */
.notice.has-photo { display: flow-root; }
.cutout.side.mini { width: 118px; margin: -4px -8px 6px 12px; }
.cutout.side.mini .cutout-paper { padding: 5px 5px 0; }
.cutout.side.mini figcaption { font-size: 14px; line-height: 1.1; padding: 4px 3px 8px; }
.cutout.side.mini .tape { width: 38px; height: 12px; }

.credits { margin-top: 10px; font-size: 12px; color: var(--muted); }
.credits summary { font-family: var(--font-type); font-size: 12px; letter-spacing: 0; text-transform: none; font-weight: 400; }
.credits p { margin: 6px auto 0; max-width: 560px; line-height: 1.5; }
.credits a { color: inherit; }
/* Wide things always go below a floated photo, never squeezed next to it. */
.loz, .thread, .composer, .linkbox, .list, .pv, .notice, .event-layout, .couples { clear: both; }

/* ---------- snow ---------- */
.snow { position: fixed; inset: 0; pointer-events: none; z-index: 20; }

/* ---------- ediția Ciuc ---------- */

/* "How it works", in the hero */
.how { margin: 16px 0 0; padding: 0; list-style: none; counter-reset: how; max-width: 34em; }
.how li { counter-increment: how; position: relative; padding: 0 0 8px 40px; font-size: 17px; line-height: 1.4; }
.how li::before {
  content: counter(how);
  position: absolute; left: 0; top: -1px;
  width: 27px; height: 27px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--red); color: var(--cream);
  border: 2px solid var(--border);
  font-family: var(--font-cond); font-weight: 900; font-size: 16px;
}

/* The roof sign sits on the ice palace (a wide photo) in the footer */
.cutout.foot { width: 330px; margin: 46px auto 22px; }
.cutout.foot .roof-sign { left: 30%; right: 30%; top: -40px; }
.cutout.foot .roof-sign span { font-size: 40px; }
@media (max-width: 600px) {
  .cutout.foot { width: 270px; }
  .cutout.foot .roof-sign { top: -36px; }
  .cutout.foot .roof-sign span { font-size: 34px; }
}

/* The 1972 hockey championship logo, stuck on the event poster like a stamp */
.event-card .cutout.stamp-photo { position: absolute; top: 18px; right: 16px; width: 74px; transform: rotate(7deg); z-index: 2; }
.event-card .cutout.stamp-photo .cutout-paper { padding: 4px; background-color: #f4ecda; }
.event-card .cutout.stamp-photo .tape { width: 34px; height: 11px; top: -5px; }
.event-card > .eyebrow, .event-card > h2 { padding-right: 86px; }
@media (max-width: 520px) { .event-card .cutout.stamp-photo { width: 60px; } .event-card > .eyebrow, .event-card > h2 { padding-right: 70px; } }

/* The thermometer on the balcony: Miercurea Ciuc, live */
.thermo { display: flex; gap: 14px; align-items: stretch; }
.th-tube {
  position: relative; flex-shrink: 0;
  width: 16px; height: 78px; margin: 2px 6px 14px 6px;
  border: 2px solid var(--cream); border-radius: 9px 9px 0 0; border-bottom: 0;
  background: rgba(0, 0, 0, .18);
}
.th-tube::before {
  /* the scale */
  content: ""; position: absolute; right: -10px; top: 6px; bottom: 4px; width: 6px;
  background: repeating-linear-gradient(to bottom, var(--cream) 0 1.5px, transparent 1.5px 9px);
  opacity: .7;
}
.th-mercury {
  position: absolute; left: 3px; right: 3px; bottom: 0; height: 30%;
  background: #d9503f; border-radius: 4px 4px 0 0;
  transition: height 1.4s cubic-bezier(.2, .8, .3, 1);
}
.th-bulb {
  position: absolute; left: 50%; bottom: -16px; transform: translateX(-50%);
  width: 26px; height: 26px; border-radius: 50%;
  background: #d9503f; border: 2px solid var(--cream);
}
.th-text .k { font-family: var(--font-cond); font-weight: 800; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--mustard); }
.th-value { font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 1.05; margin: 2px 0 3px; letter-spacing: -0.02em; }
.th-note { font-size: 15px; opacity: .85; }

/* The family, in couples */
.couples { display: flex; flex-direction: column; gap: 10px; }
.couple { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.couple .amp { font-family: var(--font-script); font-size: 28px; line-height: 1; color: var(--red); padding: 0 2px; }
.member {
  display: inline-flex; flex-direction: column;
  font-family: var(--font-cond); font-weight: 800; font-size: 21px; letter-spacing: .02em; line-height: 1.1;
  padding: 5px 12px 6px; border: 2px solid var(--border); border-radius: 3px; background: var(--card-2);
}
.member em { font-style: normal; font-family: var(--font-type); font-weight: 400; font-size: 12px; letter-spacing: 0; color: var(--muted); }
.member.opened { background: var(--green-soft); }
.member.opened em::before { content: "✓ "; color: var(--green); font-weight: 700; }
.member.me { box-shadow: 3px 3px 0 var(--red); }

/* Tearing the envelope while the server answers */
.loz.pulling .loz-strip { animation: tug .5s ease-in-out infinite; }
@keyframes tug { 50% { transform: translate(-2%, -12%) rotate(-2deg); } }

.opened-at { margin: 18px 0 0; font-family: var(--font-type); font-size: 14px; line-height: 1.45; }
.opened-at .stamp-line {
  display: inline-block; font-family: var(--font-cond); font-weight: 900; font-size: 14px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--violet-ink); border: 2px solid currentColor; border-radius: 3px; padding: 0 6px; transform: rotate(-2deg); margin-right: 4px;
}
.opened-at small { color: var(--muted); font-size: 13px; }
.ask { margin-top: 22px; clear: both; }

.bubble.new { box-shadow: 0 0 0 3px var(--mustard); }
.new-tag {
  display: inline-block; margin-left: 8px; padding: 0 5px; border-radius: 2px;
  background: var(--red); color: var(--cream); font-size: 11px; letter-spacing: .08em; vertical-align: 1px;
}
.composer textarea { min-height: 56px; height: 56px; }
