/* Regnestykker – fælles stil for børneappen og admin-panelet */
:root {
  --bg: #fdf6e3; --ink: #1f2a44; --muted: #6b7280;
  --accent: #ff7a59; --accent-dark: #d95f40;
  --ok: #2fb36d; --ok-dark: #23874f; --fejl: #e5484d; --gul: #f5b301;
  --card: #ffffff; --edge: #e7dcc4; --gold: #f5b301;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink);
  font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, sans-serif; }
button { font: inherit; color: inherit; touch-action: manipulation; cursor: pointer; }
.r { color: var(--ok); } .f { color: var(--fejl); }

/* Faner */
.faner { display: flex; gap: 8px; margin-bottom: 12px; overflow-x: auto; }
.faner button { border: 0; border-radius: 999px; padding: 8px 16px; font-weight: 700; background: var(--card); color: var(--muted); }
.faner button.valgt { background: var(--ink); color: #fff; }

/* Kort og stats */
.kort { background: var(--card); border-radius: 16px; padding: 14px 16px; margin-bottom: 12px; }
.kort h3, .gitter-boks h3 { margin: 0 0 6px; font-size: 1.05rem; color: var(--muted); }
.stats { display: flex; justify-content: space-around; text-align: center; }
.stats strong { display: block; font-size: 1.7rem; }
.stats span { color: var(--muted); font-size: .9rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chips span { border-radius: 10px; padding: 4px 10px; font-weight: 700; }
.chips.driller span { background: #fde8e8; color: var(--fejl); }
.chips.oever span { background: #fdf3d4; color: #8a6400; }

/* Liste over stykker */
.liste { width: 100%; background: var(--card); border-radius: 18px; padding: 8px 16px; text-align: left; }
.liste div { display: flex; justify-content: space-between; padding: 8px 0; font-size: 1.2rem; font-weight: 700; border-bottom: 1px solid #f1ead9; }
.liste div:last-child { border-bottom: 0; }
.liste u { text-decoration-thickness: 3px; text-underline-offset: 4px; }

/* Runder */
details { background: var(--card); border-radius: 14px; margin-bottom: 8px; padding: 12px 16px; }
summary { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
.badge { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; color: #fff; font-size: 1rem; margin-right: 6px; vertical-align: -3px; }
details .liste { padding: 4px 0 0; }
details .liste div { font-size: 1.05rem; }

/* Mine stykker */
.gitter-boks { background: var(--card); border-radius: 16px; padding: 14px 12px; margin-bottom: 12px; }
.g-tal { font-size: 1.15rem; margin: 0 4px 10px; }
.g-tal strong { font-size: 1.6rem; }
.g-niv { display: block; color: var(--muted); font-size: .95rem; margin-top: 2px; }
.gitter { display: grid; gap: 3px; }
.gitter .h { display: grid; place-items: center; font-weight: 800; color: var(--muted); font-size: .8rem; }
.gitter .c { aspect-ratio: 1; border-radius: 5px; display: grid; place-items: center; font-size: .78rem; font-weight: 700; cursor: pointer; }
.gitter.lille { gap: 2px; }
.gitter.lille .h { font-size: .55rem; }
.gitter.lille .c { border-radius: 3px; }
.gitter .c.tom { background: transparent; cursor: default; }
.gitter .c.inaktiv { opacity: .25; }
.gitter .c.valgt { outline: 3px solid var(--ink); outline-offset: 1px; }
.s-laert { background: var(--ok); color: #fff; }
.s-oever { background: var(--gul); color: #fff; }
.s-driller { background: var(--fejl); color: #fff; }
.s-ny { background: #efe7d3; color: #a39a86; }
.g-info { text-align: center; color: var(--muted); font-weight: 700; min-height: 1.4em; margin: 10px 0 6px; }
.g-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; color: var(--muted); font-size: .85rem; }
.g-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
