:root {
  --bg: #f6f3ee;
  --card: #fffdf9;
  --ink: #1b1a18;
  --soft: rgba(27, 26, 24, 0.56);
  --line: rgba(27, 26, 24, 0.1);
  --accent: #e2502f;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 10px 12px;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; outline: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.tw { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; width: min(348px, 100%); padding: 18px 16px 16px; border-radius: 26px; background: var(--card); box-shadow: inset 0 0 0 1.500px var(--line), 0 30px 44px -30px rgba(60, 40, 20, 0.45); }
.tw__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 0 2px; font-size: 12.500px; line-height: 16px; font-weight: 660; color: var(--soft); }
.tw__tag { color: var(--accent); font-weight: 720; }
.tw__votes { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tw__votes b { font-weight: 720; color: var(--ink); }
.tw__ask { padding: 0 2px; font-size: 18px; line-height: 23px; font-weight: 740; letter-spacing: -0.015em; }

.tw__ends { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; padding: 4px 2px 0; }
.tw__end { display: grid; gap: 1px; }
.tw__end[data-end="1"] { text-align: right; }
.tw__end b { font-size: 30px; line-height: 32px; font-weight: 760; font-stretch: 92%; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--ink); transition: color 0.35s; }
.tw__end i { font-style: normal; font-size: 12px; line-height: 15px; font-weight: 640; color: var(--soft); }
.tw__end.is-ahead b { color: var(--accent); }

.tw__rope { display: block; width: 100%; height: 40px; overflow: visible; }
.tw__rope .mid { stroke: rgba(27, 26, 24, 0.28); stroke-width: 1.500; stroke-dasharray: 2 4; stroke-linecap: round; }
.tw__rope .half { fill: none; stroke: rgba(27, 26, 24, 0.3); stroke-width: 3; stroke-linecap: round; transition: stroke 0.35s; }
.tw__rope .half.is-ahead { stroke: var(--accent); }
.tw__rope .post { fill: var(--ink); }
.tw__rope .knot { fill: var(--card); stroke: var(--ink); stroke-width: 3; }

.tw__btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tw__btn { display: flex; justify-content: center; align-items: center; height: 44px; padding: 0 8px; border-radius: 22px; font-size: 14px; font-weight: 720; white-space: nowrap; box-shadow: inset 0 0 0 1.500px rgba(27, 26, 24, 0.2); transition: background-color 0.3s, color 0.3s, box-shadow 0.3s; }
.tw__btn svg { display: block; flex: none; width: 0; height: 15px; margin-right: 0; fill: none; stroke: currentColor; stroke-width: 2.200; stroke-linecap: round; stroke-linejoin: round; transition: width 0.3s, margin-right 0.3s; }
.tw__btn path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.tw__btn[aria-pressed="true"] { background: var(--ink); color: #ffffff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 12px 16px -10px rgba(27, 26, 24, 0.7); }
.tw__btn[aria-pressed="true"] svg { width: 15px; margin-right: 5px; }
.tw__btn:focus-visible { box-shadow: inset 0 0 0 1.500px rgba(27, 26, 24, 0.2), 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }

.ghost { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -3px 0 0 -5px; transform-origin: 20% 15%; pointer-events: none; opacity: 0; fill: #1b1a18; stroke: #ffffff; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)); z-index: 6; }

@media (hover: hover) { .tw__btn[aria-pressed="false"]:hover { box-shadow: inset 0 0 0 1.500px var(--ink); } }
@media (max-width: 350px) { .tw { padding: 16px 13px 14px; } .tw__ask { font-size: 17px; } .tw__btn { font-size: 13.500px; } }
@media (prefers-reduced-motion: reduce) { .tw__end b, .tw__rope .half, .tw__btn, .tw__btn svg { transition: none; } }
