/* ============================================================================
   PONTINHOS — "caderneta de bar"
   A leaf of squared paper on the same graphite desk as the rest of Cavalo
   Manco. Points are pen strokes: four sides and a diagonal close a group of
   five, the way scores get counted on a napkin here. Names are handwritten
   (Caveat), totals are placar numerals (Big Shoulders), labels are the house
   mono. Loaded only on the Pontinhos pages.
   ========================================================================== */

.pt {
  --pen: var(--pen-grafite);          /* each team overrides this inline */
  --font-num: "Big Shoulders Display", var(--font-mono), sans-serif;
  --sheet-grid:
    linear-gradient(var(--pt-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--pt-grid) 1px, transparent 1px);
}

.pt .pt-accent { color: var(--pt-blue-lite); }
.pt .kicker { color: var(--pt-blue-lite); }

/* every control says where the keyboard is */
.pt button:focus-visible, .pt a:focus-visible, .pt input:focus-visible {
  outline: 2px solid var(--pt-blue); outline-offset: 2px;
}

/* ---- buttons -------------------------------------------------------------- */
.pt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  min-height: 44px;
  padding: .6em 1em;
  font-family: var(--font-mono); font-size: .76rem; font-weight: 500;
  letter-spacing: .07em; text-transform: uppercase;
  color: #efe4c8;
  background: transparent;
  border: none; border-radius: 3px;
  box-shadow: inset 0 0 0 1.5px rgba(248, 240, 221, .3);
  cursor: pointer;
  transition: background .15s ease, box-shadow .15s ease, transform .1s ease, opacity .15s ease;
}
.pt-btn:hover { background: rgba(248, 240, 221, .09); box-shadow: inset 0 0 0 1.5px rgba(248, 240, 221, .55); }
.pt-btn:active { transform: translateY(1px); }
.pt-btn:disabled { opacity: .35; cursor: default; }
.pt-btn:disabled:hover { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(248, 240, 221, .3); }
.pt-btn--go { background: var(--pt-blue-lite); color: #11212c; box-shadow: none; }
.pt-btn--go:hover { background: #8cbfe8; box-shadow: none; }
.pt-btn--lg { font-size: .88rem; padding: .85em 1.5em; }
.pt-btn[hidden] { display: none; }   /* the class's display would beat [hidden] */
.pt-btn:focus-visible { outline: 2px solid var(--pt-blue-lite); outline-offset: 2px; }

/* ---- page frame ----------------------------------------------------------- */
.ptwrap {
  width: min(720px, 100% - 1.6rem);
  margin-inline: auto;
  padding: clamp(1.1rem, 4vw, 2.4rem) 0 2.5rem;
}
.ptwrap--wide { width: min(720px, 100% - 1.6rem); }

.pt-actions {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .5rem .7rem;
  margin-bottom: .9rem;
  color: #e7d6b6;
}
.pt-actions .brand { font-size: 1.35rem; flex: none; }
.pt-actions .right { display: flex; align-items: center; gap: .7rem; }
.pt-actions form { margin: 0; }

.pt-acct {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .03em;
  color: #c2b491; text-decoration: underline; text-underline-offset: 3px;
  background: none; border: none; padding: .2em 0; cursor: pointer; white-space: nowrap;
}
.pt-acct:hover { color: #f4ead2; }
.pt-acct--saved {
  color: var(--olive); text-decoration: none; cursor: default;
  max-width: 55vw; overflow: hidden; text-overflow: ellipsis;
}
.pt-acct-form { margin: 0; }

.pt-icon {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; min-height: 40px; padding: .4em;
  background: none; border: none; color: #ddcdab; cursor: pointer;
  transition: color .15s ease, transform .1s ease;
}
.pt-icon:hover { color: #f6edd6; }
.pt-icon:active { transform: scale(.92); }

/* ---- the sheet ------------------------------------------------------------ */
.sheet {
  position: relative;
  padding: clamp(1rem, 3.5vw, 1.7rem) clamp(.85rem, 3vw, 1.5rem) clamp(1.1rem, 3vw, 1.5rem);
  border-radius: 2px;
  color: var(--pt-ink);
  background-color: var(--pt-sheet);
  background-image: var(--sheet-grid);
  background-size: 26px 26px;
  box-shadow: var(--lift);
}

.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .35rem .8rem;
  padding-bottom: .6rem;
  border-bottom: 2px solid rgba(35, 44, 55, .3);
}
.sheet-title {
  flex: 1 1 12ch; min-width: 0;
  font-family: var(--font-hand); font-size: clamp(1.55rem, 5.5vw, 2.1rem); line-height: 1.1;
  color: var(--pt-ink);
  background: transparent; border: none; outline: none;
  padding: .1rem 0;
}
.sheet-title::placeholder { color: var(--pt-faint); }
.sheet-title:focus { box-shadow: 0 2px 0 var(--pt-blue); }
.sheet-title--static { display: block; }

.sheet-meta { display: flex; align-items: center; gap: .5rem; flex: none; }
.round-chip, .goal-chip {
  font-family: var(--font-mono); font-size: .64rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--pt-ink-soft);
}
.goal-chip {
  background: none; border: none; cursor: pointer;
  padding: .45em .1em;
  text-decoration: underline dashed; text-underline-offset: 4px;
  text-decoration-color: var(--pt-rule);
}
.goal-chip:hover { color: var(--pt-blue); }
.sheet-more {
  background: none; border: none; cursor: pointer;
  font-size: 1.1rem; line-height: 1; letter-spacing: .1em;
  color: var(--pt-ink-soft); padding: .3rem .2rem; min-height: 36px;
}
.sheet-more:hover { color: var(--pt-ink); }

/* ---- teams: each column is one big target -------------------------------- */
.teams {
  display: grid;
  grid-template-columns: repeat(var(--cols, 2), 1fr);
  min-height: 13rem;
}
.teams[hidden] { display: none; }    /* same trap: display:grid outranks [hidden] */
.teams[data-count="1"] { --cols: 1; }
.teams--many { gap: .6rem; padding-top: .6rem; }
/* a phone holds two columns and no more; a desk can spread out */
@media (min-width: 621px) {
  .teams[data-count="3"] { --cols: 3; }
  .teams[data-count="4"], .teams[data-count="5"], .teams[data-count="6"],
  .teams[data-count="7"], .teams[data-count="8"] { --cols: 4; }
}

.team { position: relative; display: flex; }
/* the pen line down the middle of the sheet, the way a truco pad is split */
.team + .team::before {
  content: "";
  position: absolute; left: 0; top: .5rem; bottom: .5rem; width: 2px;
  background: linear-gradient(180deg, transparent, rgba(35, 44, 55, .32) 10%, rgba(35, 44, 55, .32) 90%, transparent);
  transform: rotate(.35deg);
}
.teams--many .team + .team::before { display: none; }
.teams--many .team { box-shadow: inset 0 0 0 1.5px rgba(35, 44, 55, .13); border-radius: 3px; }

.team-hit {
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
  width: 100%; min-height: 11.5rem;
  padding: 1rem .5rem 1.2rem;
  background: none; border: none; border-radius: 3px;
  font: inherit; color: inherit; text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .18s ease;
}
.team-hit:hover { background: rgba(35, 44, 55, .035); }
.team-hit:active { background: rgba(35, 44, 55, .07); }
.team-hit:focus-visible { outline: 2px solid var(--pen); outline-offset: -4px; }

.team-head { display: flex; align-items: center; gap: .4rem; max-width: 100%; }
.team-head .avatar { width: 1.6rem; height: 1.6rem; font-size: .95rem; flex: none; margin: 0; }
.team-name {
  font-family: var(--font-hand); font-size: clamp(1.15rem, 4.4vw, 1.5rem); line-height: 1.15;
  color: var(--pt-ink);
  overflow-wrap: break-word; min-width: 0;
}
/* rodadas ganhas, as dots beside the name */
.team-wins { display: flex; gap: .2rem; align-items: center; flex: none; }
.pip { width: .4rem; height: .4rem; border-radius: 50%; background: var(--pen); opacity: .8; }
.pip-more { font-family: var(--font-mono); font-size: .6rem; color: var(--pt-ink-soft); }

/* the total closes the column, under a short sum rule — a ledger, not a widget */
.team-score { position: relative; margin-top: auto; padding-top: .5rem; }
.team-score::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 2.8rem; height: 2px; background: var(--pen); opacity: .45;
}
.team-num {
  font-family: var(--font-num); font-weight: 700;
  font-size: clamp(2.6rem, 12vw, 3.9rem); line-height: .9;
  font-variant-numeric: tabular-nums;
  color: var(--pen);
  display: block;
}
.team-hit.is-hit .team-num { animation: pt-bump .32s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pt-bump { 0% { transform: scale(1); } 45% { transform: scale(1.11); } 100% { transform: scale(1); } }

.risks {
  display: flex; flex-wrap: wrap; align-content: flex-start; justify-content: center;
  gap: .45rem;
  width: 100%; flex: 1;
  margin-top: .7rem;
  color: var(--pen);
}
.risks .risco { width: 34px; height: 34px; }
@media (min-width: 621px) { .risks .risco { width: 38px; height: 38px; } }
/* only the strokes that were just drawn draw themselves */
.risks .risco path.is-new {
  stroke-dasharray: 100; stroke-dashoffset: 100;
  animation: risco-ink .34s cubic-bezier(.4, .1, .3, 1) forwards;
}
@keyframes risco-ink { to { stroke-dashoffset: 0; } }
.risks-more {
  align-self: center;
  font-family: var(--font-mono); font-size: .68rem; color: var(--pt-ink-soft);
}

/* the written column, for games scored in chunks: each hand noted by hand */
.ledger {
  display: flex; flex-direction: column; align-items: center; gap: .1rem;
  width: 100%; flex: 1; margin-top: .6rem;
  font-family: var(--font-hand); font-size: 1.3rem; line-height: 1.2;
  color: var(--pen);
}
.ledger-n.minus { opacity: .65; }
.ledger-more {
  font-family: var(--font-mono); font-size: .58rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--pt-faint); margin-bottom: .2rem;
}

.team-tap {
  font-family: var(--font-mono); font-size: .56rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--pt-faint);
}

/* the per-team menu. It gets a faint disc so it reads as a control sitting on
   its own column, not as part of the line dividing the two */
.team-more {
  position: absolute; top: .35rem; right: .55rem; z-index: 2;
  min-width: 38px; min-height: 38px; border-radius: 50%;
  background: rgba(255, 255, 255, .42); border: none; cursor: pointer;
  font-size: .95rem; line-height: 1; letter-spacing: .08em;
  color: var(--pt-faint);
}
.team-more:hover { color: var(--pt-ink); background: #fff; }

/* ===========================================================================
   CADERNETA — the buraco ledger: totals up top, then every partida by day
   ========================================================================= */
.caderneta[hidden] { display: none; }

.cad-totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
  gap: .4rem 1rem;
  padding: 1rem 0 .9rem;
  border-bottom: 2px solid rgba(35, 44, 55, .3);
}
.cad-team {
  display: flex; flex-direction: column; gap: .1rem;
  cursor: pointer; border-radius: 4px; padding: .2rem .3rem;
}
.cad-team:hover { background: rgba(255, 255, 255, .35); }
.cad-team-name {
  display: flex; align-items: center; gap: .35rem;
  font-family: var(--font-hand); font-size: 1.25rem; color: var(--pt-ink);
}
.cad-team-name .avatar { width: 1.4rem; height: 1.4rem; font-size: .85rem; margin: 0; }
.cad-team-total {
  font-family: var(--font-num); font-weight: 700; font-size: clamp(2.2rem, 9vw, 3rem);
  line-height: .95; color: var(--pen); font-variant-numeric: tabular-nums;
}
.cad-team-sub {
  font-family: var(--font-mono); font-size: .6rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--pt-faint);
}
.cad-diff {
  grid-column: 1 / -1;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .04em;
  color: var(--pt-ink-soft); padding-top: .2rem;
}
.cad-diff b { color: var(--pen); font-weight: 600; }

.cad-day + .cad-day { margin-top: 1.4rem; }
.cad-day-title {
  display: flex; align-items: baseline; justify-content: space-between; gap: .8rem;
  margin: 1.1rem 0 .4rem;
  font-family: var(--font-hand); font-weight: 400; font-size: 1.2rem;
  color: var(--pt-ink);
}
.cad-day-title span {
  font-family: var(--font-mono); font-size: .6rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--pt-faint);
}

.cad-table { width: 100%; border-collapse: collapse; }
.cad-table th, .cad-table td {
  padding: .42rem .3rem;
  text-align: right;
  font-family: var(--font-num); font-weight: 700; font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
  color: var(--pen);
}
.cad-table th {
  font-family: var(--font-mono); font-weight: 500; font-size: .64rem;
  letter-spacing: .14em; text-transform: uppercase;
  padding-bottom: .3rem;
  border-bottom: 1.5px solid rgba(35, 44, 55, .25);
}
.cad-table .cad-n {
  width: 2.4rem; text-align: left;
  font-family: var(--font-mono); font-weight: 400; font-size: .68rem;
  letter-spacing: .06em; color: var(--pt-faint);
}
.cad-table tbody tr { cursor: pointer; }
.cad-table tbody tr:hover { background: rgba(255, 255, 255, .4); }
.cad-table tbody tr + tr td { border-top: 1px dotted rgba(35, 44, 55, .18); }
.cad-table tbody tr.is-pending td { opacity: .55; }
.cad-table .cad-blank { color: var(--pt-faint); font-family: var(--font-body); font-size: .95rem; }
.cad-table tfoot td {
  border-top: 2px solid rgba(35, 44, 55, .3);
  font-size: 1.05rem;
  padding-top: .45rem;
}
.cad-table tfoot .cad-n { font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; }

.cad-empty { color: var(--pt-ink-soft); padding: 1.6rem .2rem .6rem; }
.cad-empty[hidden] { display: none; }

/* writing a partida down: one line per team */
.entry-rows { display: flex; flex-direction: column; gap: .7rem; margin: .8rem 0 .2rem; }
.entry-row { display: flex; align-items: center; gap: .8rem; }
.entry-team {
  flex: 1 1 auto; display: flex; align-items: center; gap: .4rem;
  font-family: var(--font-hand); font-size: 1.3rem; color: var(--pt-ink);
}
.entry-team .avatar { width: 1.5rem; height: 1.5rem; font-size: .9rem; margin: 0; }
.entry-input {
  flex: 0 0 7rem; text-align: right;
  font-family: var(--font-num); font-weight: 700; font-size: 1.5rem;
  color: var(--pen);
}

/* ---- somebody got there --------------------------------------------------- */
.sheet-win {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .6rem 1rem;
  margin: -.2rem 0 .9rem;
  padding: .7rem .9rem;
  border: 2px solid var(--pt-ink);
  border-radius: 3px;
  background: rgba(255, 255, 255, .45);
}
.sheet-win[hidden] { display: none; }
.sheet-win-text { font-family: var(--font-hand); font-size: 1.35rem; line-height: 1.15; }
.sheet-win-acts { display: flex; align-items: center; gap: .8rem; }
.sheet-win .pt-btn--go { background: var(--pt-blue); color: #fff; }
.sheet-win .linkish { color: var(--pt-ink-soft); font-family: var(--font-mono); font-size: .7rem; }

/* ---- what just happened: a margin note at the foot of the sheet ----------- */
.ticker {
  display: flex; gap: .55rem; align-items: baseline;
  margin-top: .9rem; padding-top: .7rem;
  border-top: 1.5px dashed rgba(35, 44, 55, .22);
  white-space: nowrap; overflow-x: auto; scrollbar-width: none;
  font-family: var(--font-mono); font-size: .68rem;
  color: var(--pt-faint);
}
.ticker[hidden] { display: none; }
.ticker::-webkit-scrollbar { display: none; }
.ticker-label { letter-spacing: .12em; text-transform: uppercase; font-size: .6rem; flex: none; }
.ticker .lance { color: var(--pt-ink-soft); flex: none; }
.ticker .lance b { color: var(--pen); font-weight: 600; }

/* ---- the action bar (fixed on phones, and never inside the sheet) --------- */
.pt-bar {
  display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap;
  margin-top: 1rem;
}

/* ---- overlays: novo time, meta -------------------------------------------- */
.pt-overlay {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  padding: 1.2rem;
  background: rgba(14, 18, 24, .62);
}
.pt-overlay[hidden] { display: none; }
.pt-modal {
  width: min(420px, 100%); max-height: 88vh; overflow-y: auto;
  padding: 1.4rem 1.4rem 1.5rem;
  border-radius: 14px;
  color: var(--pt-ink);
  background-color: var(--pt-sheet);
  background-image: var(--sheet-grid);
  background-size: 22px 22px;
  box-shadow: var(--lift);
}
.pt-modal-title { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; margin: 0 0 .3rem; }
.pt-modal-note { color: var(--pt-ink-soft); font-size: .88rem; margin: 0 0 1rem; }
.pt-field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: 1rem; }
.pt-label {
  font-family: var(--font-mono); font-size: .62rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--pt-ink-soft);
}
.pt-input {
  font-family: var(--font-body); font-size: 16px;
  color: var(--pt-ink); background: rgba(255, 255, 255, .5);
  border: none; border-bottom: 2px solid var(--pt-rule);
  padding: .5rem .1rem; outline: none; width: 100%;
}
.pt-input:focus { border-bottom-color: var(--pt-blue); }
.pt-modal-acts { display: flex; align-items: center; gap: .8rem; margin-top: 1.2rem; }
.pt-modal-acts .spacer { flex: 1; }
.pt-modal .pt-btn { color: var(--pt-ink); box-shadow: inset 0 0 0 1.5px rgba(35, 44, 55, .3); }
.pt-modal .pt-btn:hover { background: rgba(35, 44, 55, .06); box-shadow: inset 0 0 0 1.5px rgba(35, 44, 55, .55); }
.pt-modal .pt-btn--go { background: var(--pt-blue); color: #fff; box-shadow: none; }
.pt-modal .pt-btn--go:hover { background: #255d90; }
.pt-modal .linkish {
  background: none; border: none; cursor: pointer; padding: .5em .2em;
  font-family: var(--font-mono); font-size: .72rem; color: var(--pt-ink-soft);
  text-decoration: underline; text-underline-offset: 3px;
}
.pt-modal .linkish:hover { color: var(--pt-ink); }
.pt-modal .linkish.danger { color: var(--pen-vermelha); }

/* the toast belongs to the sheet's world here, not the receipt's */
.pt .toast { background: var(--pt-ink); color: var(--pt-sheet-2); }

/* the shared apelido picker arrives dressed as a receipt; here it's a folha */
.pt .identity-modal {
  color: var(--pt-ink);
  background-color: var(--pt-sheet);
  background-image: var(--sheet-grid);
  background-size: 22px 22px;
}
.pt .identity-title { color: var(--pt-ink); }
.pt .modal-label, .pt .identity-note { color: var(--pt-ink-soft); }
.pt .identity-name {
  color: var(--pt-ink); background: rgba(255, 255, 255, .6); border-color: var(--pt-rule);
}
.pt .identity-name:focus { border-color: var(--pt-blue); }
.pt .identity-modal .btn--stamp { --bg: var(--pt-blue); --fg: #fff; }
.pt .identity-modal .btn--stamp:hover { --bg: #255d90; }
.pt .identity-modal .animal.sel { box-shadow: 0 0 0 2.5px var(--pt-sheet), 0 0 0 4.5px var(--pt-ink); }
.pt .identity-modal .linkish:hover { color: var(--pt-ink); }

.pt-modal .animal.sel { box-shadow: 0 0 0 2.5px var(--pt-sheet), 0 0 0 4.5px var(--pt-ink); }

.pen-row { display: flex; flex-wrap: wrap; gap: .55rem; margin: .4rem 0 1.1rem; }
.pen {
  width: 2.3rem; height: 2.3rem; border-radius: 50%;
  border: none; cursor: pointer; padding: 0;
  background: var(--ink-color);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .5) inset;
  transition: transform .12s ease;
}
.pen.sel { transform: scale(1.12); box-shadow: 0 0 0 2px rgba(255, 255, 255, .6) inset, 0 0 0 2.5px var(--pt-ink); }
.pt-modal .animal-grid { margin: .4rem 0 .2rem; }

.goal-presets { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 1.1rem; }
.goal-preset {
  font-family: var(--font-mono); font-size: .78rem;
  padding: .5em .9em; min-height: 40px;
  color: var(--pt-ink); background: rgba(255, 255, 255, .5);
  border: none; box-shadow: inset 0 0 0 1.5px var(--pt-rule); border-radius: 3px;
  cursor: pointer;
}
.goal-preset.sel { background: var(--pt-blue); color: #fff; box-shadow: none; }

/* ---- the history: what changed, and who changed it ------------------------ */
.pt-modal--tall { max-height: 86vh; display: flex; flex-direction: column; }
.pt-modal--tall .history { flex: 1; overflow-y: auto; min-height: 6rem; }

.history { margin-top: .6rem; color: var(--pt-ink-soft); font-size: .9rem; }
.history-day {
  position: sticky; top: 0;
  padding: .7rem 0 .3rem;
  background: linear-gradient(var(--pt-sheet) 70%, transparent);
  font-family: var(--font-mono); font-size: .6rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--pt-faint);
}
.history-row {
  display: grid; grid-template-columns: 2.9rem 1.5rem 1fr; align-items: start; gap: .5rem;
  padding: .45rem 0;
}
.history-row + .history-row { border-top: 1px dotted rgba(35, 44, 55, .16); }
.history-row .avatar { width: 1.5rem; height: 1.5rem; font-size: .9rem; margin: 0; }
.history-when {
  font-family: var(--font-mono); font-size: .7rem; color: var(--pt-faint);
  padding-top: .15rem; font-variant-numeric: tabular-nums;
}
.history-said { line-height: 1.4; }
.history-said b { color: var(--pt-ink); font-weight: 600; }

/* ---- popover menus (team ⋯ and the sheet ⋯) ------------------------------- */
.pt-menu {
  position: absolute; z-index: 9500;
  min-width: 12rem;
  padding: .3rem;
  border-radius: 10px;
  color: var(--pt-ink);
  background-color: var(--pt-sheet-2);
  box-shadow: var(--lift);
}
.pt-menu-item {
  display: flex; align-items: center; gap: .6rem; width: 100%;
  padding: .6rem .65rem;
  font-family: var(--font-body); font-size: .92rem; text-align: left;
  color: inherit; background: none; border: none; border-radius: 6px; cursor: pointer;
}
.pt-menu-item:hover { background: rgba(35, 44, 55, .07); }
.pt-menu-item.danger { color: var(--pen-vermelha); }
.pt-menu-sep { height: 1px; margin: .25rem .4rem; background: rgba(35, 44, 55, .12); }
.pt-menu-label {
  padding: .5rem .65rem .2rem;
  font-family: var(--font-mono); font-size: .6rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--pt-ink-soft);
}
.pt-quick { display: flex; gap: .35rem; padding: .2rem .3rem .45rem; }
.pt-quick button {
  flex: 1; min-height: 44px;
  font-family: var(--font-num); font-weight: 700; font-size: 1.25rem;
  color: var(--pt-ink); background: rgba(255, 255, 255, .55);
  border: none; box-shadow: inset 0 0 0 1.5px var(--pt-rule); border-radius: 6px;
  cursor: pointer;
}
.pt-quick button:hover { background: #fff; }
.pt-quick button.minus { color: var(--pen-vermelha); }

/* ---- "meus placares" ------------------------------------------------------ */
.pt-mine { list-style: none; margin: .2rem 0 1.4rem; padding: 0; }
.pt-mine li + li { border-top: 1px dashed var(--pt-rule); }
.pt-mine-item {
  display: grid; gap: .2rem;
  padding: .9rem .2rem;
  text-decoration: none; color: var(--pt-ink);
}
.pt-mine-item:hover { background: rgba(255, 255, 255, .35); }
.pt-mine-name { font-family: var(--font-hand); font-size: 1.35rem; }
.pt-mine-score { display: flex; flex-wrap: wrap; gap: .8rem; font-size: .9rem; color: var(--pt-ink-soft); }
.pt-mine-team b { font-family: var(--font-num); font-size: 1.15rem; color: var(--pen); }
.pt-mine-meta { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .1em; color: var(--pt-faint); text-transform: uppercase; }
.pt-empty { color: var(--pt-ink-soft); padding: 1.4rem .2rem; }
.pt-mine-cta { margin-top: .6rem; }

/* ===========================================================================
   LANDING
   ========================================================================= */
.pt-landing { background: var(--pt-sheet-2); color: var(--pt-ink); }
.pt-landing .panel--dark .kicker { color: var(--pt-blue-lite); }
.pt-landing .topbar-links .pt-btn { min-height: 38px; }

.pt-hero {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.5rem, 5vw, 3.5rem);
  align-items: center; width: 100%;
  padding-block: clamp(1.5rem, 5vw, 3rem);
}
.pt-hero-copy .kicker { display: block; margin-bottom: 1.1rem; }
.pt-hero-copy h1 {
  margin: 0;
  font-size: clamp(2.3rem, 6.4vw, 4rem);
  color: #fbeecb;
}
.pt-hero-copy h1 em { font-style: italic; color: var(--pt-blue-lite); }
.pt-hero-copy .lede {
  margin: 1.2rem 0 0; max-width: 46ch;
  color: #c3b596; font-size: clamp(1rem, 2.2vw, 1.1rem); line-height: 1.65;
}
.pt-hero-sub { margin: .9rem 0 0; max-width: 46ch; color: #9d9077; font-size: .95rem; line-height: 1.6; }
.pt-hero-cta { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; margin-top: 1.8rem; }
.pt-hero-cta form { margin: 0; }
.pt-hero-link {
  font-family: var(--font-mono); font-size: .76rem; letter-spacing: .06em;
  color: #b9ab8c; text-underline-offset: 4px;
}
.pt-hero-link:hover { color: #f0e6cf; }

.pt-hero-prop { display: flex; justify-content: center; }
.sheet--demo {
  width: min(23rem, 100%);
  pointer-events: none;
  transform: rotate(1.6deg);
}
.sheet--demo .teams { min-height: 0; }
.sheet--demo .team { flex-direction: column; align-items: center; gap: .3rem; padding: 1rem .5rem .4rem; }
.sheet--demo .team-head { justify-content: center; }
.sheet--demo .team-num { font-size: 3.2rem; }
.sheet--demo .risks { margin-top: .6rem; }

/* the demo draws itself once, group by group */
.sheet--demo .risco path, .mini-risks .risco path {
  stroke-dasharray: 100; stroke-dashoffset: 100;
  animation: risco-ink .5s cubic-bezier(.4, .1, .3, 1) forwards;
  animation-delay: var(--d, 0s);
}
.sheet--demo .risco path:nth-child(2), .mini-risks .risco path:nth-child(2) { animation-delay: calc(var(--d, 0s) + .05s); }
.sheet--demo .risco path:nth-child(3), .mini-risks .risco path:nth-child(3) { animation-delay: calc(var(--d, 0s) + .1s); }
.sheet--demo .risco path:nth-child(4), .mini-risks .risco path:nth-child(4) { animation-delay: calc(var(--d, 0s) + .15s); }
.sheet--demo .risco path:nth-child(5), .mini-risks .risco path:nth-child(5) { animation-delay: calc(var(--d, 0s) + .22s); }

/* the games this is for, said out loud */
.games-strip {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.4rem;
  padding: 1.4rem clamp(1rem, 4vw, 2rem);
  background: var(--pt-sheet);
  border-bottom: 1px solid var(--pt-rule);
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--pt-ink-soft);
}
.games-strip span::after { content: " ·"; color: var(--pt-faint); }
.games-strip span:last-child::after { content: ""; }

.pt-landing .section-head h2 { color: var(--pt-ink); }
.pt-landing .section-head p { color: var(--pt-ink-soft); }
.pt-landing .kicker { color: var(--pt-blue); }
.pt-landing .step {
  border-radius: 3px;
  color: var(--pt-ink);
  background-color: var(--pt-sheet);
  background-image: var(--sheet-grid);
  background-size: 22px 22px;
  box-shadow: var(--lift-sm);
}
.pt-landing .step .num {
  font-family: var(--font-mono); font-size: .62rem; letter-spacing: .22em;
  text-transform: uppercase; color: var(--pt-blue);
}
.pt-landing .step h3 { color: var(--pt-ink); }
.pt-landing .step p { color: var(--pt-ink-soft); }

.pt-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem 2rem; }
.pt-note {
  display: flex; flex-direction: column; gap: .25rem;
  padding-left: 1rem;
  border-left: 2px solid var(--pt-rule);
}
.pt-note b { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.pt-note span { color: var(--pt-ink-soft); font-size: .95rem; line-height: 1.55; }
.pt-cta-center { display: flex; justify-content: center; margin-top: clamp(2rem, 5vw, 3rem); }

/* ===========================================================================
   PHONES — the table is where this app actually lives
   ========================================================================= */
@media (max-width: 620px) {
  .ptwrap { padding-bottom: calc(5.2rem + env(safe-area-inset-bottom)); }

  /* the bar sits on the glass at the bottom, outside the sheet, so nothing
     clips it and every tap lands */
  .pt-bar {
    position: fixed; inset: auto 0 0 0; z-index: 300;
    justify-content: space-between; flex-wrap: nowrap; gap: .4rem;
    margin: 0;
    padding: .55rem .7rem calc(.55rem + env(safe-area-inset-bottom));
    background: rgba(24, 26, 38, .93);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, .09);
  }
  .pt-bar .pt-btn { flex: 1; padding: .6em .4em; font-size: .68rem; letter-spacing: .04em; }
  .pt .toast { bottom: calc(5.6rem + env(safe-area-inset-bottom)); }

  .pt-overlay { align-items: flex-end; padding: 0; }
  .pt-modal {
    width: 100%; border-radius: 16px 16px 0 0;
    padding-bottom: calc(1.4rem + env(safe-area-inset-bottom));
    animation: sheet-up .28s cubic-bezier(.2, .8, .2, 1);
  }
  .pt-menu.is-sheet {
    position: fixed; inset: auto 0 0 0; z-index: 9600;
    min-width: 0; border-radius: 18px 18px 0 0;
    padding: .6rem .7rem calc(1rem + env(safe-area-inset-bottom));
    animation: sheet-up .28s cubic-bezier(.2, .8, .2, 1);
  }
  .pt-menu.is-sheet .pt-menu-item { padding: .8rem .7rem; }

  .pt-hero { grid-template-columns: 1fr; }
  .pt-hero-prop { order: -1; }
  .sheet--demo { width: min(20rem, 100%); }
  .sheet--demo .team-num { font-size: 2.6rem; }
  .pt-notes { grid-template-columns: 1fr; }
  .games-strip { gap: .4rem 1rem; font-size: .62rem; letter-spacing: .12em; }
}

@media (max-width: 860px) {
  .pt-landing .steps { grid-template-columns: 1fr; }
}
