/* v14: card-width mulligan rows, gap scale, match list, share QR, scorer spacing. */

/* Item 1. Label on its own line. Wide cells put the stepper to the right of the count.
   Narrow cells (two cells across a phone) stack the stepper under the count, still inside the cell. */
.v13-mp{container-type:inline-size;container-name:mull}
.v13-mp .v14-mcell{display:grid;grid-template-areas:"lab lab" "num step";grid-template-columns:minmax(0,1fr) max-content;align-items:center;gap:2px 8px;min-width:0;width:100%;box-sizing:border-box;padding:8px;border:1.5px solid var(--line);border-radius:10px;background:#fff;overflow:visible}
.v13-mp .v14-mcell .cl{grid-area:lab;display:none;position:static;min-width:0}
.v13-mp .v14-mcell .ct{grid-area:num;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:1px}
.v13-mp .v14-mcell .ct b{line-height:1}
.v13-mp .v14-mcell .ct small{white-space:normal;overflow-wrap:anywhere;max-width:100%}
.v13-mp .v14-mcell form.v13-step{grid-area:step;display:grid;width:max-content;max-width:100%;justify-self:end;align-self:center;grid-template-columns:44px 44px}
.v13-mp .v14-mcell .v13-step button{min-width:0;padding:0}
@container mull (max-width:900px){
  .v13-mhd{display:none}
  .v13-mr{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px 12px;align-items:stretch;padding:12px 0}
  .v13-mr .who{grid-column:1/-1}
  .v13-mp .v14-mcell .cl{display:block}
}
@container mull (max-width:460px){
  .v13-mp .v14-mcell{grid-template-areas:"lab" "num" "step";grid-template-columns:minmax(0,1fr);justify-items:stretch}
  .v13-mp .v14-mcell form.v13-step{justify-self:start}
}

/* Item 2. Five pastel steps. Dark text stays on each one. Flat, inside the card. */
.v13-md.v14-g0,.v13-gsum.v14-g0{background:#d9f2df;color:#143d28;border-color:#7eae8c}
.v13-md.v14-g1,.v13-gsum.v14-g1{background:#e7f3c4;color:#2c3b10;border-color:#b5c98a}
.v13-md.v14-g2,.v13-gsum.v14-g2{background:#f8e7b0;color:#4a3408;border-color:#d7c07a}
.v13-md.v14-g3,.v13-gsum.v14-g3{background:#f8d3b0;color:#5c2e0c;border-color:#e0a87a}
.v13-md.v14-g4,.v13-gsum.v14-g4{background:#f6cfc8;color:#6b2218;border-color:#e09a90}
.v13-md.v14-g0 .s,.v13-md.v14-g1 .s,.v13-md.v14-g2 .s,.v13-md.v14-g3 .s,.v13-md.v14-g4 .s,
.v13-gsum.v14-g0,.v13-gsum.v14-g1,.v13-gsum.v14-g2,.v13-gsum.v14-g3,.v13-gsum.v14-g4{color:inherit}
.v14-scale{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:12px 0 0;font:700 12px Inter,sans-serif;color:#3a3428}
.v14-scale i{width:28px;height:14px;border-radius:4px;border:1.5px solid var(--ink);display:block}
.v14-scale i.v14-g0{background:#d9f2df}
.v14-scale i.v14-g1{background:#e7f3c4}
.v14-scale i.v14-g2{background:#f8e7b0}
.v14-scale i.v14-g3{background:#f8d3b0}
.v14-scale i.v14-g4{background:#f6cfc8}

/* Item 3. Finished chip is a flat label. Reopen uses the button shadow. */
.v14-fin{display:inline-flex;align-items:center;min-height:28px;padding:0 10px;border-radius:999px;border:1.5px solid var(--ink);background:var(--y);font:700 12px Inter,sans-serif;box-shadow:none}
.v13-rc>a.btn{display:flex;align-items:center;justify-content:center;text-align:center}

/* Item 4. The link column sets the row height. app.js sizes the QR square to that height.
   A narrow card stacks a fixed 160px QR instead of letting the square widen the row. */
.v14-share{container-type:inline-size;container-name:share;max-width:100%;min-width:0}
.v14-share .invm{display:flex;flex-direction:row;align-items:flex-start;gap:14px;max-width:100%;min-width:0}
.v14-share .v14-qrs{flex:0 0 auto;min-width:0}
.v14-share .v14-scol{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:10px}
.v14-share .v14-scol .lnk,.v14-share .v14-scol .sh{min-width:0;max-width:100%}
.v14-share .v14-scol .lnk .btn{flex:none}
.v14-share .v14-scol .in{flex:1 1 auto;min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere;word-break:break-word}
.v14-share .invm .qr{width:max-content;height:max-content;max-width:100%;box-sizing:border-box;padding:7px}
.v14-share .invm .qr svg{display:block}
@container share (max-width:400px){
  .v14-share .invm{flex-direction:column;align-items:center}
  .v14-share .invm .qr{width:160px;height:160px}
  .v14-share .invm .qr svg{width:100%;height:100%}
  .v14-share .v14-scol{width:100%;align-items:stretch}
}

/* Item 6. One card, flat rows that cannot grow past the board column. */
.v14-mwrap{min-width:0;max-width:100%}
.v14-mcard{box-shadow:var(--sh-card);padding:6px 0 8px;min-width:0;max-width:100%;overflow:hidden}
.matches.v14-mlist{display:flex;flex-direction:column;gap:0;grid-template-columns:none;min-width:0;max-width:100%;width:100%;margin:0}
.v14-match{border:0;border-top:1.5px solid var(--line);border-radius:0;background:transparent;box-shadow:none;min-width:0;max-width:100%;width:100%;overflow:visible}
.v14-match:first-of-type{border-top:0}
.v14-mrow{display:grid;width:100%;max-width:100%;min-width:0;box-sizing:border-box;grid-template-columns:minmax(0,1fr) max-content minmax(0,1fr);grid-template-areas:"lab lab lab" "a mid b";gap:0;align-items:stretch;padding:0;margin:0;cursor:pointer;list-style:none}
.v14-mrow::-webkit-details-marker{display:none}
.v14-lab{grid-area:lab;padding:8px 12px 0;font:500 11px 'DM Mono',monospace;letter-spacing:.6px;color:#5f5a4f;min-width:0}
.v14-side{display:flex;align-items:center;gap:8px;min-width:0;width:100%;box-sizing:border-box;padding:10px 12px 12px}
.v14-side b{font:700 15px Inter,sans-serif;overflow-wrap:anywhere;min-width:0}
.v14-side.a{grid-area:a}
.v14-side.b{grid-area:b;justify-content:flex-end;text-align:right}
.v14-mid{grid-area:mid;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:8px 10px 12px;text-align:center;background:#fffdf7}
.v14-mid b{font:800 16px/1.15 Fraunces,Georgia,serif;white-space:nowrap}
.v14-mid small{font:500 11px 'DM Mono',monospace;color:#5f5a4f}
.v14-mrow.lead-a .v14-side.a{background:#d7e6f6}
.v14-mrow.lead-b .v14-side.b{background:#f6e4c4}
.v14-final{display:inline-flex;align-items:center;min-height:18px;margin-left:6px;padding:0 6px;border-radius:999px;border:1.5px solid var(--ink);background:var(--y);color:var(--ink);font:700 10px Inter,sans-serif;letter-spacing:0;box-shadow:none}
.v14-detail{padding:0 12px 12px;border-top:1.5px solid var(--line);background:#fffdf7}
.v14-holes{display:flex;flex-wrap:wrap;gap:6px;list-style:none;margin:10px 0 0;padding:0}
.v14-holes li{display:flex;flex-direction:column;align-items:center;min-width:36px;padding:4px 6px;border:1.5px solid var(--line);border-radius:8px;background:#fff}
.v14-holes span{font:500 10px 'DM Mono',monospace;color:#5f5a4f}
.v14-holes b{font:800 13px Inter,sans-serif}
@media(max-width:560px){
  .v14-lab{text-align:center}
  .v14-mid b{font-size:15px}
}

/* Item 7. Shadow-aware space so the toolbar gap matches the gap under the divider. */
body.page-score #strip-legend{padding-top:8px;padding-bottom:calc(8px + 3px)}
body.page-score .kp-pill,body.page-score .card-chip{box-shadow:var(--sh-btn)}
body.page-score .note{margin-top:8px}
body.page-score .sub{padding-bottom:calc(8px + var(--sh-room))}
.v13-rc{padding-bottom:var(--sh-room)}
.k-share .sh{padding-bottom:2px}
