:root {
  --purple: #9d5cf5;
  --orange: #f5a623;
  --green: #00e63c;
  --ink: #000000;
  --triangle: #ffffff;
  --page-bg: #efefef;

  --c-title: #ffffff;
  --c-badge: #000000;
  --c-label: #ffffff;
  --c-value: #ffffff;
  --c-unit: #c9c9c9;
  --c-lines: #ffffff;

  --title-font: 'Montserrat';
  --title-weight: 900;
  --text-font: 'Inter';
  --label-weight: 700;
  --value-weight: 500;
  --unit-weight: 400;

  --title-size: 56;
  --badge-size: 30;
  --label-size: 11;
  --value-size: 15;
  --unit-size: 10.5;
  --icon-size: 64;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  padding: 56px 24px 96px;
  background: var(--page-bg);
  color: #000;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.stage {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
}

/* Page background: colour on <body>, optional image / GIF / video on top of it. */
.site-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.site-bg[hidden] { display: none; }

.site-bg img,
.site-bg video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* "Без рамок": no light margins or shadow — the poster runs edge to edge. */
body.layout-full { padding: 0; }
body.layout-full .stage { min-height: 100vh; min-height: 100dvh; }
body.layout-full .poster {
  min-height: 100vh;
  min-height: 100dvh;
  background: transparent;
  box-shadow: none;
}

/* "На один экран": no frames and no scrolling — the whole poster fits the viewport.
   The picture block absorbs the leftover height; spacing shrinks on short screens. */
html.layout-fit, body.layout-fit { height: 100%; overflow: hidden; }
body.layout-fit { padding: 0; height: 100vh; height: 100dvh; }
body.layout-fit .stage { height: 100%; }
body.layout-fit .poster {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: clamp(12px, 4vh, 44px) clamp(16px, 5vw, 44px) clamp(10px, 3.5vh, 40px);
  background: transparent;
  box-shadow: none;
}
body.layout-fit .collage {
  flex: 1 1 0;
  min-height: 48px;
  aspect-ratio: auto;
}
body.layout-fit .title-row { flex: 0 0 auto; margin-top: clamp(8px, 3.2vh, 34px); }
body.layout-fit .poster-title { font-size: min(calc(var(--title-size) * 1px), calc(var(--title-size) * .15vw), calc(var(--title-size) * .1vh)); }
body.layout-fit .edit-btn { width: clamp(52px, 10vh, 92px); height: clamp(52px, 10vh, 92px); }
body.layout-fit .rule-row { flex: 0 0 auto; margin-top: clamp(6px, 2.6vh, 30px); }
body.layout-fit .meters { flex: 0 0 auto; margin-top: clamp(8px, 2.4vh, 26px); }
body.layout-fit .meter { gap: clamp(4px, 1vh, 10px); }
body.layout-fit .foot { flex: 0 0 auto; margin-top: clamp(6px, 2vh, 22px); }
body.layout-fit .copy-icon { width: min(calc(var(--icon-size) * 1px), 9vh); }
/* "На один экран, медиа сверху": same as above, but the picture touches the top edge. */
body.layout-fit-top .poster { padding-top: 0; }
/* "На один экран, без полей": same as "медиа сверху", but no side gaps — content runs to the page edges. */
body.layout-fit-edge .stage { max-width: none; }
body.layout-fit-edge .poster { padding-left: 0; padding-right: 0; }

/* ---------------------------------------------------------------- poster */

.poster {
  position: relative;
  background: var(--ink);
  color: #fff;
  padding: 44px 44px 40px;
  box-shadow: 0 40px 70px -28px rgba(0, 0, 0, .55), 0 1px 0 rgba(0, 0, 0, .08);
  /* No faux bold/italic: the same font file renders Latin and Cyrillic identically. */
  font-synthesis: none;
}

.collage {
  position: relative;
  aspect-ratio: 600 / 480;
  overflow: hidden;
  background: var(--ink);
}

.collage svg.art {
  display: block;
  width: 100%;
  height: 100%;
}

.media-layer {
  position: absolute;
  inset: 0;
}

.media-layer img,
.media-layer video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.drop-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--title-font), sans-serif;
  font-weight: var(--title-weight);
  font-size: 15px;
  letter-spacing: .12em;
  color: var(--green);
  background: rgba(0, 0, 0, .78);
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease;
}

.collage.is-drag .drop-hint { opacity: 1; }

.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 34px;
}

.poster-title {
  margin: 0;
  min-width: 0;
  font-family: var(--title-font), sans-serif;
  font-weight: var(--title-weight);
  font-size: min(calc(var(--title-size) * 1px), calc(var(--title-size) * .15vw));
  line-height: .92;
  letter-spacing: -.015em;
  text-transform: uppercase;
  white-space: pre-line;
  overflow-wrap: anywhere;
  color: var(--c-title);
  outline: none;
}

.edit-btn {
  flex: 0 0 auto;
  width: 92px;
  height: 92px;
  border: 0;
  border-radius: 50%;
  background: var(--green);
  color: var(--c-badge);
  font-family: var(--title-font), sans-serif;
  font-weight: var(--title-weight);
  font-size: calc(var(--badge-size) * 1px);
  letter-spacing: -.02em;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}

.edit-btn:hover { transform: scale(1.06) rotate(-4deg); }
.edit-btn:active { transform: scale(.96); }
.edit-btn:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }

.rule-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 30px;
  color: var(--c-lines);
}

.dots {
  font-size: 15px;
  letter-spacing: 7px;
  line-height: 1;
  padding-left: 2px;
}

.rule {
  flex: 1 1 auto;
  height: 1px;
  background: var(--c-lines);
}

.plus {
  font-size: 20px;
  line-height: 1;
  font-weight: 400;
  color: var(--c-lines);
}

/* ---------------------------------------------------------------- meters */

.meters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 26px;
  font-family: var(--text-font), sans-serif;
}

.meter {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 2px 0 4px;
  cursor: copy;
}

.meter::after {
  content: '';
  position: absolute;
  inset: -6px -6px -6px -6px;
  border: 1px solid var(--green);
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease;
}

.meter:hover::after { opacity: .45; }

.meter.is-copied::after {
  opacity: 1;
  background: color-mix(in srgb, var(--green) 14%, transparent);
  animation: copied .6s ease;
}

@keyframes copied {
  0% { transform: scale(.96); }
  60% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.meter h2 {
  margin: 0;
  min-height: 2.5em;
  font-family: inherit;
  font-size: calc(var(--label-size) * 1px);
  font-weight: var(--label-weight);
  line-height: 1.25;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: var(--c-label);
  overflow-wrap: anywhere;
  outline: none;
}

.reading {
  width: 100%;
  min-width: 0;
  padding: 6px 0 7px;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--c-lines) 45%, transparent);
  border-radius: 0;
  background: transparent;
  color: var(--c-value);
  font-family: inherit;
  font-size: calc(var(--value-size) * 1px);
  font-weight: var(--value-weight);
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
  cursor: copy;
  transition: border-color .15s ease;
}

/* Normal view: readings are display-only. Taps go to the column (copy), never into the field. */
.poster:not(.is-editing) .reading {
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  caret-color: transparent;
}

.reading::placeholder { color: color-mix(in srgb, var(--c-value) 28%, transparent); }

.reading:focus { outline: none; }

.poster.is-editing .reading { cursor: text; }

.poster.is-editing .reading {
  outline: 1px dashed color-mix(in srgb, var(--green) 55%, transparent);
  outline-offset: 3px;
}

.poster.is-editing .reading:focus {
  outline: 2px solid var(--green);
  border-bottom-color: var(--green);
  background: color-mix(in srgb, var(--green) 8%, transparent);
}

.meter .unit {
  margin: 0;
  font-size: calc(var(--unit-size) * 1px);
  font-weight: var(--unit-weight);
  line-height: 1.55;
  color: var(--c-unit);
  outline: none;
}

.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 22px;
}

.copy-hint {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--c-unit);
  font-family: var(--text-font), sans-serif;
  font-weight: var(--unit-weight);
  font-size: calc(var(--unit-size) * 1px);
  line-height: 1.4;
  text-align: left;
  cursor: copy;
  outline: none;
}

.copy-hint:hover { color: var(--c-label); }
.copy-hint.is-copied { color: var(--c-label); }

/* copy-all icon */

.copy-icon {
  flex: 0 0 auto;
  align-self: flex-end;
  display: block;
  width: calc(var(--icon-size) * 1px);
  margin: 0 -4px -6px 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: copy;
  -webkit-tap-highlight-color: transparent;
  transition: transform .18s ease;
}

.copy-icon svg { display: block; width: 100%; height: auto; overflow: visible; }
.copy-icon:hover { transform: translateY(-2px) rotate(-3deg); }
.copy-icon:active { transform: scale(.92); }
.copy-icon:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
.copy-icon.is-copied { animation: icon-pop .45s cubic-bezier(.2, 1.4, .4, 1); }

@keyframes icon-pop {
  0% { transform: scale(.86); }
  100% { transform: scale(1); }
}

/* The arrow rests low, slides up, holds, then slides back down (1.5 s loop). */
.doc-arrow {
  animation: doc-arrow 1.5s infinite;
}

@keyframes doc-arrow {
  0%, 18% { transform: translateY(36px); animation-timing-function: cubic-bezier(.45, 0, .3, 1); }
  40%, 67% { transform: translateY(0); animation-timing-function: cubic-bezier(.45, 0, .4, 1); }
  100% { transform: translateY(36px); }
}

/* inline editing */

.poster.is-editing [data-field] {
  outline: 1px dashed color-mix(in srgb, var(--green) 55%, transparent);
  outline-offset: 3px;
  cursor: text;
}

.poster.is-editing [data-field]:focus {
  outline: 2px solid var(--green);
  background: color-mix(in srgb, var(--green) 8%, transparent);
}

.poster.is-editing .meter { cursor: default; }
.poster.is-editing .meter::after { display: none; }

/* ----------------------------------------------------------------- toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 90;
  padding: 14px 18px;
  max-width: calc(100% - 32px);
  background: var(--green);
  color: #000;
  border: 2px solid #000;
  box-shadow: 4px 4px 0 #000;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .02em;
  white-space: pre-line;
  transform: translate(-50%, 24px);
  opacity: 0;
  pointer-events: none;
  transition: transform .22s cubic-bezier(.2, .8, .2, 1), opacity .22s ease;
}

.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }
.toast.is-error { background: #ff5a5a; }

/* ----------------------------------------------------------- login window */

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(10, 10, 10, .55);
  backdrop-filter: blur(3px);
  animation: fade-in .18s ease;
}

.login-overlay[hidden] { display: none; }

@keyframes fade-in { from { opacity: 0; } }

.win {
  --win-blue: #4343f2;
  --win-lime: #d7fca2;
  --win-orange: #ff5b1f;
  --win-ink: #1b1b2a;

  width: min(520px, 100%);
  border: 2px solid var(--win-ink);
  border-radius: 30px;
  overflow: hidden;
  background: var(--win-lime);
  box-shadow: -5px 6px 0 var(--win-ink);
  font-family: 'Montserrat', sans-serif;
  animation: pop-in .26s cubic-bezier(.2, 1.3, .4, 1);
}

@keyframes pop-in { from { transform: translateY(14px) scale(.96); opacity: 0; } }

.win.is-shake { animation: shake .4s ease; }

@keyframes shake {
  20%, 60% { transform: translateX(-9px); }
  40%, 80% { transform: translateX(9px); }
}

.win-bar {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  padding: 10px 18px;
  background: var(--win-blue);
  border-bottom: 2px solid var(--win-ink);
}

.win-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1.5px solid var(--win-ink);
  border-radius: 9px;
  background: #fff;
  color: var(--win-ink);
}

.win-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

button.win-btn { cursor: pointer; transition: transform .12s ease, background .12s ease; }
button.win-btn:hover { background: var(--win-orange); }
button.win-btn:active { transform: translateY(1px); }

.win-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 34px 44px 36px;
}

.win-title {
  margin: 0 0 14px;
  text-align: center;
  font-size: clamp(46px, 13vw, 76px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.01em;
  color: var(--win-blue);
  -webkit-text-stroke: 1.5px var(--win-ink);
  paint-order: stroke fill;
}

.pill-wrap { position: relative; }

.pill {
  display: block;
  width: 100%;
  height: 56px;
  padding: 0 64px 0 26px;
  border: 1.5px solid var(--win-ink);
  border-radius: 999px;
  background: var(--win-orange);
  color: var(--win-ink);
  font-family: 'Montserrat', sans-serif;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: .08em;
}

.pill::placeholder { color: var(--win-ink); opacity: 1; }

.pill:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--win-lime), 0 0 0 5px var(--win-ink);
}

.pill-eye {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--win-ink);
  transform: translateY(-50%);
  cursor: pointer;
}

.pill-eye svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }
.pill-eye[aria-pressed="true"] { background: rgba(0, 0, 0, .12); }

.pill-submit {
  padding: 0 26px;
  background: var(--win-blue);
  color: #fff;
  font-size: 18px;
  letter-spacing: .12em;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
  box-shadow: -3px 4px 0 var(--win-ink);
}

.pill-submit:hover { transform: translate(1px, -1px); box-shadow: -4px 5px 0 var(--win-ink); }
.pill-submit:active { transform: translate(-2px, 3px); box-shadow: 0 0 0 var(--win-ink); }
.pill-submit:disabled { opacity: .7; cursor: progress; }

.win-error {
  min-height: 1.2em;
  margin: 0;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  color: #c4200c;
}

/* ---------------------------------------------------------------- editor */

.editor {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 60;
  width: min(400px, 100%);
  height: 100%;
  padding: 22px 22px 40px;
  background: #0a0a0a;
  color: #fff;
  border-left: 2px solid var(--green);
  overflow-y: auto;
  transform: translateX(102%);
  visibility: hidden;
  transition: transform .28s cubic-bezier(.2, .8, .2, 1), visibility .28s;
}

.editor.is-open {
  transform: translateX(0);
  visibility: visible;
}

.editor-head {
  position: sticky;
  top: -22px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -22px -22px 0;
  padding: 22px 22px 16px;
  background: #0a0a0a;
  border-bottom: 1px solid #262626;
}

.editor-head h2 {
  margin: 0;
  flex: 1 1 auto;
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 16px;
  letter-spacing: .04em;
}

.save-status {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #777;
}

.save-status.is-ok { color: var(--green); }
.save-status.is-error { color: #ff5a5a; }

.close-btn {
  width: 34px;
  height: 34px;
  border: 1px solid #333;
  background: transparent;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.close-btn:hover { background: var(--green); color: #000; border-color: var(--green); }

.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 0;
  border-bottom: 1px solid #1c1c1c;
}

.group-title {
  margin: 0 0 4px;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
}

.field-group label,
.size-row label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #9a9a9a;
}

.field-group input[type="text"],
.field-group textarea,
.field-group select {
  width: 100%;
  padding: 10px 12px;
  background: #000;
  border: 1px solid #2e2e2e;
  border-radius: 0;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.45;
  resize: vertical;
}

.field-group select { cursor: pointer; }

.field-group input:focus,
.field-group textarea:focus,
.field-group select:focus {
  outline: none;
  border-color: var(--green);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
}

.segmented label {
  position: relative;
  cursor: pointer;
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented span {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 11px 12px;
  border: 1px solid #333;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.segmented small {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .02em;
  text-transform: none;
  color: #8a8a8a;
}

.segmented label:hover span { border-color: #fff; }
.segmented input:checked + span { background: var(--green); border-color: var(--green); color: #000; }
.segmented input:checked + span small { color: #0b3d17; }
.segmented input:focus-visible + span { outline: 2px solid #fff; outline-offset: 2px; }

.meter-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 4px 0 6px;
}

.meter-fields > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.meter-fields input + input { color: #b5b5b5 !important; }
.meter-fields input.reading-field { color: #fff !important; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.meter-fields input.reading-field::placeholder { color: #555; }

.size-row {
  display: grid;
  grid-template-columns: 92px 1fr 44px;
  align-items: center;
  gap: 10px;
}

.size-row input[type="range"] { width: 100%; accent-color: var(--green); }

.size-row output {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: #fff;
}

.hex-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hex-row {
  display: grid;
  grid-template-columns: 40px 96px 1fr;
  align-items: center;
  gap: 10px;
}

.hex-row input[type="color"] {
  width: 40px;
  height: 36px;
  padding: 0;
  border: 1px solid #2e2e2e;
  background: transparent;
  cursor: pointer;
}

.hex-row input[type="color"]::-webkit-color-swatch-wrapper { padding: 3px; }
.hex-row input[type="color"]::-webkit-color-swatch { border: 0; }

.field-group .hex-row input[type="text"] {
  padding: 8px 10px;
  font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace;
  font-size: 13px;
  text-transform: uppercase;
}

.field-group .hex-row input.is-invalid { border-color: #ff5a5a; }

.hex-row span {
  font-size: 11px;
  color: #bdbdbd;
}

.font-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.font-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #262626;
}

.font-list .font-sample {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 15px;
}

.font-list .font-sample small {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  color: #8a8a8a;
}

.font-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  padding: 3px 5px;
  border: 1px solid currentColor;
  color: var(--green);
}

.font-badge.is-missing { color: var(--orange); }

.font-del {
  width: 26px;
  height: 26px;
  border: 1px solid #333;
  background: none;
  color: #fff;
  cursor: pointer;
}

.font-del:hover { border-color: #ff5a5a; color: #ff5a5a; }

.file-btn,
.ghost-btn,
.danger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 14px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  border: 0;
  transition: transform .12s ease, background .15s ease, color .15s ease;
}

.field-group .file-btn {
  background: var(--green);
  color: #000;
  font-size: 11px;
  letter-spacing: .08em;
}

.file-btn:hover { transform: translateY(-1px); }
.file-btn.is-busy { opacity: .6; pointer-events: none; }

.ghost-btn {
  background: transparent;
  color: #fff;
  border: 1px solid #333;
}

.ghost-btn:hover { border-color: #fff; }

.danger-btn {
  margin-top: 22px;
  background: transparent;
  color: #ff5a5a;
  border: 1px solid #ff5a5a;
}

.danger-btn:hover { background: #ff5a5a; color: #000; }

.logout-btn { margin: 10px 0 14px; }

.hint {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
  color: #777;
}

.hint.warn { color: var(--orange); }

/* ---------------------------------------------------------------- mobile */

@media (max-width: 560px) {
  body { padding: 24px 12px 64px; }
  .poster { padding: 24px 22px 26px; }
  .edit-btn { width: 68px; height: 68px; font-size: calc(var(--badge-size) * .74px); }
  .meters { grid-template-columns: 1fr 1fr; gap: 22px 18px; }
  body.layout-fit { padding: 0; }
  body.layout-fit .meters { gap: clamp(8px, 2vh, 22px) 18px; }
  body.layout-fit .meter h2 { min-height: 0; }
  .copy-icon { width: calc(var(--icon-size) * .9px); }
  .win-body { padding: 26px 22px 28px; }
  .win-bar { gap: 10px; }
  .win-btn { width: 32px; height: 32px; }
  .pill { font-size: 18px; height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .doc-arrow { transform: translateY(18px); }
}
