/* SO Rechner: Handy-Version (Seite /so-rechner). Zuerst fürs Handy gebaut, am PC mittig in Handybreite. */
#view:has(> .so-head), main.view:has(> .so-head) { max-width: 560px; margin-inline: auto; }
.so-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(2, 10, 12, .8), rgba(2, 10, 12, .5)); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line); }
.so-head h1 { margin: 0; font-size: clamp(22px, 6vw, 30px); line-height: 1.1; }
.so-head .eyebrow { margin: 0; color: var(--gold); letter-spacing: .16em; text-shadow: 0 0 10px rgba(245, 197, 24, .45); }
:root[data-theme="light"] .so-head { background: rgba(255, 255, 255, .85); }

.so-tabs { position: sticky; top: calc(var(--nav-h, 64px) + env(safe-area-inset-top, 0px)); z-index: 6; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 10px 0; padding: 4px;
  border-radius: 999px; border: 1px solid var(--line); background: rgba(2, 10, 12, .85); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.so-tabs button { min-height: 40px; border: 0; border-radius: 999px; background: none; color: var(--muted); font-weight: 800; font-size: 14px; cursor: pointer; }
.so-tabs button.active { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 14px rgba(0, 248, 255, .45); }
:root[data-theme="light"] .so-tabs { background: rgba(255, 255, 255, .92); }
#so-pane { display: grid; gap: 12px; }

/* Eingabefelder: große Kacheln, Wert gut lesbar */
.so-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.so-field { position: relative; display: grid; justify-items: center; gap: 2px; min-height: 96px; padding: 10px 4px 8px; border-radius: 16px; cursor: pointer;
  border: 1px solid var(--line); background: linear-gradient(180deg, rgba(0, 60, 66, .75), rgba(2, 12, 14, .85)); color: var(--text); transition: border-color .15s, box-shadow .15s, transform .1s; }
.so-field:active { transform: scale(.97); }
.so-field.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 20px rgba(0, 248, 255, .45); }
.so-field img { width: 26px; height: 26px; object-fit: contain; }
.so-label { font-size: 12px; font-weight: 700; color: var(--muted); }
.so-val { font: 800 clamp(19px, 5.4vw, 24px) var(--font-display); font-variant-numeric: tabular-nums; line-height: 1.1; white-space: nowrap; }
.so-val small { font-size: .55em; margin-left: 1px; color: var(--muted); font-weight: 700; }
.so-val i { font: italic 600 13px var(--font); color: var(--muted); opacity: .7; }
.so-field.active .so-val::after { content: ""; display: inline-block; width: 2px; height: .9em; margin-left: 2px; vertical-align: -2px; background: var(--accent); animation: so-blink 1s steps(1) infinite; }
@keyframes so-blink { 50% { opacity: 0; } }

.so-conds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.so-cond { display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 64px; padding: 6px 4px; border-radius: 14px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(2, 12, 14, .82); color: var(--text); font-size: 11.5px; font-weight: 700; text-align: center; line-height: 1.15; }
.so-cond img { width: 26px; height: 26px; object-fit: contain; transition: transform .25s var(--ease-out); }
.so-cond b { font: 800 20px var(--font-display); line-height: 26px; color: var(--gold); }
.so-cond.off { opacity: .45; cursor: default; }
.so-cond:not(.off):active { transform: scale(.97); }
:root[data-theme="light"] .so-field, :root[data-theme="light"] .so-cond { background: rgba(255, 255, 255, .85); }

/* Ergebnis */
.so-sum { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.so-sum b { color: var(--text); font-variant-numeric: tabular-nums; }
.so-results { border-radius: 16px; overflow: hidden; border: 1px solid var(--line-strong); background: rgba(3, 13, 16, .82); box-shadow: var(--glow); }
.so-row { display: grid; grid-template-columns: 1.05fr 1.2fr 1.1fr .9fr 1.1fr; align-items: center; min-height: 42px; padding: 0 10px; border-top: 1px solid rgba(0, 248, 255, .08);
  font-variant-numeric: tabular-nums; font-size: 16px; cursor: pointer; transition: background .15s; }
.so-row > span { text-align: right; }
.so-row > span:first-child { text-align: left; }
.so-row:nth-child(odd):not(.so-th) { background: rgba(0, 248, 255, .035); }
.so-row.hl { background: rgba(245, 197, 24, .2) !important; box-shadow: inset 4px 0 0 var(--gold); }
.so-th { position: sticky; top: 0; min-height: 34px; border-top: 0; cursor: default; background: rgba(0, 248, 255, .1); font: 700 11px var(--font-caps); letter-spacing: .04em; color: var(--accent); text-transform: uppercase; }
.so-club { font-weight: 800; }
.so-b { font-weight: 800; font-size: 17px; }
.so-p { font-weight: 800; color: var(--accent); }
.so-row small { font-size: .7em; margin-left: 1px; color: var(--muted); font-weight: 600; }
.so-p small { color: inherit; }
.so-na { color: var(--muted); opacity: .5; }
.so-step { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.so-step button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(0, 0, 0, .3); color: var(--accent); font-size: 20px; font-weight: 800; line-height: 1; cursor: pointer; }
.so-step button:active { background: var(--accent-soft); }
.so-step b { min-width: 58px; text-align: center; font-size: 14px; }
.so-hint { margin: 0; font-size: 13px; color: #cfeff1; text-align: center; text-shadow: 0 1px 6px rgba(0, 0, 0, .95); }
:root[data-theme="light"] .so-hint { color: var(--muted); text-shadow: none; }
.so-empty { display: grid; justify-items: center; gap: 8px; padding: 22px 16px; text-align: center; border-radius: 16px; border: 1px dashed var(--line-strong); background: rgba(2, 12, 14, .8); }
.so-empty img { width: 48px; height: 48px; opacity: .9; }
.so-empty p { margin: 0; max-width: 34ch; }
:root[data-theme="light"] .so-results, :root[data-theme="light"] .so-empty { background: rgba(255, 255, 255, .9); }

/* Zifferntastatur: unten am Bildschirm, über der Menüleiste */
.so-pad { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; padding: 8px 10px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(2, 12, 14, .97); border-top: 1px solid var(--line-strong); box-shadow: 0 -10px 40px rgba(0, 0, 0, .6), 0 -1px 18px rgba(0, 248, 255, .2);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); animation: so-up .18s var(--ease-out); }
@media (min-width: 900px) { .so-pad { left: 50%; right: auto; width: 440px; transform: translateX(-50%); bottom: 16px; border: 1px solid var(--line-strong); border-radius: 20px; animation: none; } }
@keyframes so-up { from { transform: translateY(100%); } }
.so-pad-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 4px 8px; }
.so-pad-head small { color: var(--muted); margin-left: 6px; }
.so-done { min-height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: none; color: var(--accent); font-weight: 800; cursor: pointer; }
.so-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.so-key { min-height: 54px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .06); color: var(--text);
  font: 700 24px var(--font-display); cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.so-key:active { background: var(--accent-soft); border-color: var(--accent); transform: scale(.97); }
.so-key.fn { background: rgba(0, 248, 255, .08); color: var(--accent); font-size: 21px; }
.so-key.go { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-size: 17px; font-family: var(--font); font-weight: 800; }
.so-key:disabled { opacity: .25; cursor: default; }
main.view.so-padopen, #view.so-padopen, .so-padopen { padding-bottom: 330px; }
:root[data-theme="light"] .so-pad { background: rgba(255, 255, 255, .97); }
:root[data-theme="light"] .so-key { background: #f1f7f7; }

/* Auswahl von unten */
.so-sheet-wrap { position: fixed; inset: 0; z-index: 70; display: grid; align-items: end; justify-items: center; }
.so-sheet-wrap[hidden] { display: none; }
.so-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); backdrop-filter: blur(3px); animation: so-fade .2s; }
@keyframes so-fade { from { opacity: 0; } }
.so-sheet { position: relative; width: min(100%, 560px); max-height: 96vh; max-height: 96dvh; overflow-y: auto; overscroll-behavior: contain; display: grid; gap: 8px; padding: 8px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  border-radius: 22px 22px 0 0; border: 1px solid var(--line-strong); border-bottom: 0; background: #041215; box-shadow: var(--glow-strong); animation: so-up .22s var(--ease-out); }
:root[data-theme="light"] .so-sheet { background: #fff; }
.so-grip { justify-self: center; width: 44px; height: 5px; border-radius: 3px; background: var(--line-strong); margin-bottom: 4px; }
.so-sheet h2 { margin: 0; }
.so-sheet p { margin: 0; }
.so-sub { margin: 4px 0 0; font-size: 13px; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; }
.so-sub small { text-transform: none; letter-spacing: 0; color: var(--muted); font-weight: 600; }
.so-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.so-opts button, .so-temps button, .so-holes button, .so-clubs button { border: 1px solid var(--line); background: rgba(2, 12, 14, .85); color: var(--text); font-weight: 800; cursor: pointer; border-radius: 14px; }
.so-opts button { display: grid; justify-items: center; gap: 4px; min-height: 76px; padding: 8px 4px; font-size: 13px; }
.so-opts img { width: 32px; height: 32px; object-fit: contain; }
.so-opts button:disabled { opacity: .3; cursor: default; }
.so-temps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.so-temps button { min-height: 44px; font-size: 16px; }
.so-opts .on, .so-temps .on, .so-holes .on, .so-clubs .on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 12px rgba(0, 248, 255, .35); color: var(--accent); }
.so-rose { display: grid; justify-items: center; }
.so-rose svg { width: min(100%, 360px); height: auto; }
.so-rose path { fill: #1d3236; stroke: #0c0c0d; stroke-width: 1.75; cursor: pointer; transition: fill .15s; }
.so-rose path:active { fill: #2c5a60; }
.so-rose path.on { fill: var(--accent); filter: drop-shadow(0 0 14px var(--accent)); }
.so-ball { fill: #fff; stroke: var(--accent); stroke-width: 4; }
.so-rose text { fill: #0a1b1d; font: 800 29px var(--font-caps); letter-spacing: .02em; text-anchor: middle; }
.so-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.so-actions .btn { flex: 1; min-height: 48px; }

/* Chipliste, Faktoren, Notizen */
.so-clubs { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.so-clubs button { min-width: 0; min-height: 46px; padding: 0 2px; position: relative; font-size: 15px; }
.so-clubs button[data-c="putter"] { font-size: 12px; letter-spacing: -.02em; }
.so-clubs button.filled::after { content: ""; position: absolute; top: 5px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.so-list { display: grid; gap: 6px; }
.so-line { display: grid; grid-template-columns: 1fr minmax(0, 170px); align-items: center; gap: 10px; min-height: 52px; padding: 4px 6px 4px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(3, 13, 16, .8); font-weight: 700; }
.so-line input { min-height: 44px; text-align: center; font: 700 18px var(--font-display); font-variant-numeric: tabular-nums; }
.so-step.big { gap: 6px; }
.so-step.big input { width: 80px; min-height: 40px; padding: 2px; font-size: 17px; }
.so-seg { width: 100%; }
.so-seg button { min-height: 40px; }
.so-notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.so-course { position: relative; display: grid; padding: 0; overflow: hidden; text-align: left; border-radius: 14px; border: 1px solid var(--line); background: rgba(0, 0, 0, .35); color: var(--text); cursor: pointer; }
.so-course img { width: 100%; aspect-ratio: 360 / 141; object-fit: cover; display: block; }
.so-cname { padding: 8px 10px; font-weight: 800; font-size: 14px; }
.so-count { position: absolute; top: 6px; right: 6px; min-width: 24px; height: 24px; display: grid; place-items: center; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 13px; }
.so-bar { display: flex; align-items: center; gap: 10px; }
.so-bar h2 { margin: 0; font-size: 18px; }
.so-note { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; padding: 10px 12px; text-align: left; border-radius: 14px; border: 1px solid var(--line); background: rgba(3, 13, 16, .8); color: var(--text); cursor: pointer; }
.so-note b { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--accent-soft); border: 1px solid var(--accent); color: var(--accent); font: 800 20px var(--font-display); }
.so-note span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.so-holes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.so-holes button { min-height: 44px; font-size: 16px; }
#so-pane textarea { width: 100%; min-height: 180px; font-size: 16px; }
#so-pane select { min-height: 46px; font-size: 16px; }
:root[data-theme="light"] .so-line, :root[data-theme="light"] .so-note { background: rgba(255, 255, 255, .9); }

@media (max-width: 360px) {
  .so-clubs { gap: 4px; }
  .so-clubs button { font-size: 13px; }
  .so-clubs button[data-c="putter"] { font-size: 10.5px; }
  .so-fields, .so-conds { gap: 6px; }
  .so-row { font-size: 15px; padding: 0 8px; }
  .so-key { min-height: 50px; }
}
@media (prefers-reduced-motion: reduce) { .so-pad, .so-sheet, .so-backdrop { animation: none; } .so-field.active .so-val::after { animation: none; } }
.so-bianca button { border-color: rgba(140, 200, 255, .35); color: #cfe6ff; }
.so-bianca .on { border-color: #8cc8ff; background: rgba(140, 200, 255, .16); box-shadow: 0 0 12px rgba(140, 200, 255, .4); color: #fff; }
:root[data-theme="light"] .so-bianca button { color: #1d4f80; }
.so-over { font-size: 12px; font-weight: 700; color: var(--warn); white-space: nowrap; }
/* Schlagbalken-Grafik aus ShotOnline ist breit statt quadratisch */
.so-field[data-f="angle"] img { width: 44px; height: 26px; object-fit: contain; }

/* Notizen mit Kursbildern */
.so-back { justify-self: start; }
.so-h { margin: 0; }
.so-banner { position: relative; overflow: hidden; border-radius: 16px; border: 1px solid var(--line-strong); box-shadow: var(--glow); }
.so-banner img { display: block; width: 100%; aspect-ratio: 360 / 141; object-fit: cover; }
.so-banner > div { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 14px 10px; background: linear-gradient(transparent, rgba(0, 0, 0, .85)); }
.so-banner h2 { margin: 0; font-size: 20px; color: #fff; text-shadow: 0 1px 6px #000; }
.so-banner span { color: var(--accent); font-weight: 800; font-size: 14px; }
.so-note { grid-template-columns: 86px 1fr; padding: 8px; }
.so-thumb { position: relative; display: block; width: 86px; height: 50px; border-radius: 10px; overflow: hidden; }
.so-thumb img { width: 100%; height: 100%; object-fit: cover; }
.so-note .so-thumb b { position: absolute; inset: auto 4px 4px auto; width: 30px; height: 30px; font-size: 15px; background: rgba(2, 12, 14, .85); }
.so-ntext { white-space: pre-line; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; font-size: 14px; }
.so-picks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.so-pick { position: relative; display: grid; padding: 0; overflow: hidden; border-radius: 12px; border: 2px solid var(--line); background: rgba(2, 12, 14, .85); color: var(--text); cursor: pointer; text-align: center; }
.so-pick img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.so-pick span { padding: 4px 2px 5px; font-size: 11.5px; font-weight: 800; line-height: 1.15; }
.so-pick.on { border-color: var(--accent); box-shadow: 0 0 14px rgba(0, 248, 255, .55); }
.so-pick.on span { color: var(--accent); }
#nt-form { display: grid; gap: 10px; scroll-margin-top: 70px; }
#nt-form[hidden] { display: none; }
.so-empty img[src$="golf.webp"] { filter: invert(1) drop-shadow(0 0 8px rgba(0, 248, 255, .6)); }

/* Wischgesten */
.so-pull { height: 0; overflow: hidden; display: grid; place-items: end center; transition: height .25s var(--ease-out); }
.so-pull span { margin-bottom: 8px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(2, 12, 14, .9); color: var(--muted); font-size: 13px; font-weight: 800; }
.so-pull.ready span { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 14px rgba(0, 248, 255, .5); }
#so-pane { transition: transform .25s var(--ease-out), opacity .25s; touch-action: pan-y; }
.so-in-r { animation: so-in-r .28s var(--ease-out); }
.so-in-l { animation: so-in-l .28s var(--ease-out); }
@keyframes so-in-r { from { transform: translateX(40px); opacity: .3; } }
@keyframes so-in-l { from { transform: translateX(-40px); opacity: .3; } }

/* Auswahlfenster: auch auf Handys mit wenig Höhe (z. B. Galaxy S23 Ultra) passt alles, der Bestätigen-Knopf bleibt immer sichtbar */
.so-sheet > :last-child { position: sticky; bottom: calc(-16px - env(safe-area-inset-bottom, 0px)); z-index: 2; margin-top: 4px;
  box-shadow: 0 -14px 16px 4px #041215, 0 16px 0 16px #041215; }
.so-sheet > .so-actions:last-child { background: #041215; }
:root[data-theme="light"] .so-sheet > :last-child { box-shadow: 0 -14px 16px 4px #fff, 0 16px 0 16px #fff; }
:root[data-theme="light"] .so-sheet > .so-actions:last-child { background: #fff; }

/* Auswahlfenster über das ganze Display (Wunsch der Gildenleitung, S23 Ultra): kein Scrollen, Knopf immer unten */
.so-sheet-wrap { align-items: stretch; }
.so-sheet { display: flex; flex-direction: column; height: 100%; height: 100dvh; max-height: none; border-radius: 0; border: 0;
  padding-top: calc(14px + env(safe-area-inset-top, 0px)); animation: so-fade .2s ease; }
.so-sheet > .so-grip { display: none; }
.so-sheet > :last-child { margin-top: auto; }
/* Windrose genau in der Mitte des Displays, so groß wie möglich */
.so-sheet > .so-rose { position: absolute; inset: 0; display: grid; place-items: center; padding: 0 12px; pointer-events: none; }
.so-sheet > .so-rose svg { width: min(100%, 62vh); pointer-events: auto; }
.so-sheet > h2, .so-sheet > p { text-align: center; }

/* „Neu“ als breite Leiste zwischen Reitern und Eingabefeldern, gleiche Breite wie die Reiterleiste */
.so-new { width: 100%; min-height: 46px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(2, 10, 12, .85); color: var(--accent);
  font: 800 16px var(--font); letter-spacing: .08em; cursor: pointer; backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  box-shadow: 0 0 12px rgba(0, 248, 255, .2); transition: transform .1s, box-shadow .15s; }
.so-new:active { transform: scale(.98); box-shadow: 0 0 18px rgba(0, 248, 255, .5); }
:root[data-theme="light"] .so-new { background: rgba(255, 255, 255, .92); }
/* Kompakter Seitenaufbau: keine doppelten Abstände zwischen Kopf, Reitern und Inhalt */
main.view:has(> .so-head) { gap: 0; }
main.view:has(> .so-head) > .so-tabs { margin: 10px 0 10px; }

/* Moderne Windrose (SO Rechner) */
.so-rose .so-ring { fill: none; stroke: rgba(0, 248, 255, .18); stroke-width: 3; stroke-dasharray: 6 12; }
.so-rose .so-arrow { cursor: pointer; }
.so-rose .so-arrow .hit { fill: transparent; stroke: none; }
.so-rose .so-arrow .shape { fill: #16343a; stroke: #2f7780; stroke-width: 3; stroke-linejoin: round; transition: fill .15s, stroke .15s, filter .15s; }
.so-rose .so-arrow.main .shape { fill: #1d4a52; stroke: #3fa3ad; }
.so-rose .so-arrow:active .shape { fill: #2c6c75; }
.so-rose .so-arrow.on .shape { fill: var(--accent); stroke: #d9ffff; filter: drop-shadow(0 0 14px var(--accent)); }

/* Putter-Leiste unter den Bedingungen (schmal): „Putter“ mit Ergebnis, Höhe am Grün, rechts Vollbild-Knopf für die Liste */
#so-out { display: grid; gap: 10px; }
.so-putbar { display: grid; grid-template-columns: minmax(0, 1fr) auto 44px; gap: 8px; align-items: center; min-height: 48px; padding: 4px 5px 4px 6px;
  border-radius: 14px; border: 1px solid var(--line); background: rgba(2, 12, 14, .85); }
  background: rgba(0, 248, 255, .06); color: var(--text); font: inherit; cursor: pointer; }
.so-putbar .so-step { gap: 4px; }
.so-putbar .so-step button { width: 32px; height: 32px; font-size: 18px; }
.so-putbar .so-step b { min-width: 50px; font-size: 13px; }
.so-put-full { width: 44px; height: 40px; display: grid; place-items: center; padding: 0; border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(0, 248, 255, .08); cursor: pointer; }
.so-put-full svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.so-put-full:disabled { opacity: .35; cursor: default; }
:root[data-theme="light"] .so-putbar { background: rgba(255, 255, 255, .9); }

/* Vollbild-Listen (Puttweiten, Ergebnisliste): „Fertig“ oben mittig */
.so-sheet.so-top > :last-child { position: static; margin-top: 0; box-shadow: none; }
.so-topbar { position: sticky; top: calc(-14px - env(safe-area-inset-top, 0px)); z-index: 3; display: grid; place-items: center; margin: -4px -16px 0; padding: 6px 16px 10px; background: #041215; }
:root[data-theme="light"] .so-topbar { background: #fff; }
.so-done-top { min-width: 170px; min-height: 46px; }
.so-full-head { display: grid; justify-items: center; gap: 2px; text-align: center; }
.so-full-head > b { font: 800 22px var(--font-display); }
.so-full-head > span { font-size: 13px; color: var(--muted); }
.so-top .so-results { flex: none; }
.so-top .so-row { min-height: 50px; font-size: 18px; }
.so-top .so-b { font-size: 19px; }
.so-top .so-row.so-th { min-height: 36px; font-size: 11px; }

/* Putter-Leiste mit Eingabe: [Putter Yards] [− Höhe +] [Prozent] [Vollbild] */
.so-putbar { grid-template-columns: minmax(0, 1fr) auto 58px 42px; gap: 6px; }
.so-put-field { display: grid; justify-items: start; align-content: center; gap: 0; min-height: 42px; padding: 2px 10px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(0, 248, 255, .06); color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.so-put-field .so-label { font-size: 11px; line-height: 1.1; }
.so-put-field .so-val { font-size: 19px; line-height: 1.15; }
.so-put-field .so-val i { font-size: 12px; }
.so-put-field.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 14px rgba(0, 248, 255, .4); }
.so-put-field.active .so-val::after { content: ""; display: inline-block; width: 2px; height: .9em; margin-left: 2px; vertical-align: -2px; background: var(--accent); animation: so-blink 1s steps(1) infinite; }
.so-put-pct { justify-self: end; font-size: 20px; white-space: nowrap; }
.so-put-pct .so-over { font-size: 11px; }
.so-put-full { width: 42px; }

/* „Neu“ und „Schlagweiten“ nebeneinander, zusammen so breit wie die Reiterleiste */
.so-newrow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.so-shots { color: var(--gold); border-color: rgba(245, 197, 24, .55); box-shadow: 0 0 12px rgba(245, 197, 24, .2); }
.so-shots:disabled { opacity: .4; color: var(--muted); border-color: var(--line); box-shadow: none; cursor: default; }

/* Vollbild-Listen passen immer auf den Bildschirm: kein Scrollen, Zeilen teilen sich die Höhe, Schrift wächst mit */
.so-sheet.so-top { overflow: hidden; gap: 6px; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
.so-top .so-topbar { position: static; margin: 0; padding: 0 0 2px; background: none; }
.so-top .so-done-top { min-height: 42px; }
.so-top .so-full-head > b { font-size: clamp(16px, 2.6vh, 22px); }
.so-top .so-results { flex: 1 1 auto; min-height: 0; display: grid; grid-template-rows: auto; grid-auto-rows: minmax(0, 1fr); }
.so-top .so-row { min-height: 0; font-size: clamp(12px, 2.3vh, 19px); }
.so-top .so-b { font-size: clamp(13px, 2.5vh, 20px); }
.so-top .so-row.so-th { min-height: 0; padding-block: 6px; font-size: 11px; }
/* Link zur Offline-Web-App (nur auf der Webseite) */
.so-applink { padding: 8px 12px; border-radius: 999px; border: 1px solid rgba(245, 197, 24, .55); color: var(--gold); font-size: 13px; font-weight: 800; white-space: nowrap; text-decoration: none; }
.so-applink:hover { text-decoration: none; box-shadow: 0 0 12px rgba(245, 197, 24, .35); }
