:root {
  --ink: #24304a;
  --muted: #667085;
  --purple: #4395d2;
  --purple2: #79bcee;
  --mint: #bdf4dc;
  --sun: #ffd76a;
  --rose: #ff8fab;
  --sky: #bfe7ff;
  --card: #fff;
  --bg: #f5fafe;
  --ok: #25a56a;
  --bad: #e65b64;
  --shadow: 0 14px 35px rgba(42, 86, 120, 0.15);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: ui-rounded, "Arial Rounded MT Bold", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 8%, #fff8d8 0 9%, transparent 10%),
    radial-gradient(circle at 92% 18%, #e7f7ff 0 10%, transparent 11%), linear-gradient(145deg, #f9fcfe, #f3f9ff);
  -webkit-tap-highlight-color: transparent;
}
button,
input,
select {
  font: inherit;
}
button {
  border: 0;
  cursor: pointer;
  color: inherit;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 4px solid #2b84ff;
  outline-offset: 3px;
}
.app {
  max-width: 1040px;
  margin: auto;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(100px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(20px, 3.2vw, 34px);
  font-weight: 900;
  color: #3c83ba;
  line-height: 1.05;
}
.brand-icon {
  display: grid;
  place-items: center;
  width: 1.55em;
  height: 1.55em;
  border-radius: 16px;
  background: #fff3c4;
  box-shadow: 0 5px 16px #46739626;
  font-size: 0.9em;
}
.brand-copy small {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: var(--muted);
}
.status {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.pill {
  background: #fff;
  padding: 9px 14px;
  border-radius: 999px;
  box-shadow: 0 4px 15px #4673961f;
  font-weight: 800;
  white-space: nowrap;
}
.header-tools {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}
.public-version {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 11px;
  border-radius: 999px;
  background: #ecf6fd;
  color: #3773a1;
  box-shadow: 0 4px 15px #4673961f;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}
.parent-btn {
  background: #fff;
  border-radius: 999px;
  width: 52px;
  height: 52px;
  font-size: 24px;
  box-shadow: 0 5px 18px #46739626;
}
.category {
  margin: 20px auto 4px;
  width: max-content;
  max-width: 100%;
  font-size: 15px;
  font-weight: 900;
  color: #fff;
  padding: 7px 15px;
  border-radius: 999px;
  background: var(--purple);
}
.card {
  background: rgba(255, 255, 255, 0.94);
  border: 3px solid #fff;
  border-radius: 32px;
  padding: clamp(20px, 4vw, 42px);
  margin: 8px auto 18px;
  box-shadow: var(--shadow);
  text-align: center;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
#question {
  font-size: clamp(27px, 4.5vw, 48px);
  line-height: 1.15;
  font-weight: 900;
  margin: 0 auto 14px;
  max-width: 900px;
}
#visual {
  font-size: clamp(50px, 9vw, 88px);
  line-height: 1.3;
  min-height: 94px;
  margin: 4px 0 18px;
  letter-spacing: 7px;
  overflow-wrap: anywhere;
  white-space: pre-line;
}
#visual.has-image {
  display: grid;
  place-items: center;
  min-height: 180px;
  letter-spacing: 0;
}
.puzzle-image {
  display: block;
  width: min(240px, 72vw);
  max-height: 190px;
  object-fit: contain;
  border-radius: 25px;
  box-shadow: 0 8px 24px #3f678620;
}
#hint {
  font-size: 18px;
  color: var(--muted);
  min-height: 25px;
  margin-bottom: 12px;
}
#answers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 14px;
  width: 100%;
}
.answer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 116px;
  min-height: 88px;
  padding: 18px 20px 14px;
  background: #fff;
  border: 3px solid #e4f2fc;
  border-radius: 23px;
  box-shadow: 0 7px 0 #d1e8f9;
  font-size: clamp(27px, 5vw, 48px);
  font-weight: 900;
  transition:
    0.12s transform,
    0.12s box-shadow;
  overflow: hidden;
}
.answer.long {
  flex: 1 1 210px;
  max-width: 330px;
  font-size: clamp(18px, 3vw, 28px);
  line-height: 1.15;
  padding-left: 48px;
}
.answer-number {
  position: absolute;
  left: 8px;
  top: 8px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #4395d2;
  color: #fff;
  font-size: 17px;
  line-height: 1;
  box-shadow: 0 2px 7px #31638935;
}
.answer-content {
  display: block;
  overflow-wrap: anywhere;
}
.answer.image-choice {
  flex: 1 1 150px;
  max-width: 210px;
  min-height: 175px;
  padding: 15px 10px 10px;
}
.answer.image-choice .answer-content {
  display: grid;
  place-items: center;
  gap: 7px;
}
.answer-image {
  display: block;
  width: 120px;
  height: 92px;
  object-fit: contain;
  border-radius: 15px;
}
.answer-caption {
  font-size: 18px;
  line-height: 1.1;
}
.answer.long .answer-content {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
}
.answer:active {
  transform: translateY(5px);
  box-shadow: 0 2px 0 #d1e8f9;
}
.answer.good {
  background: #dff8eb;
  border-color: #46bd84;
}
.answer.nope {
  animation: shake 0.3s;
  background: #ffe3e5;
  border-color: #ef7880;
}
.answer.color {
  min-width: 110px;
  height: 100px;
}
#feedback {
  font-size: clamp(24px, 3vw, 33px);
  font-weight: 900;
  min-height: 48px;
  margin-top: 21px;
}
.actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.action {
  padding: 14px 19px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 5px 16px #46739626;
  font-size: 17px;
  font-weight: 900;
}
.action.primary {
  background: var(--purple);
  color: #fff;
}
.action.pause {
  background: #fff0c5;
}
.action.end {
  background: #ffe8e8;
  color: #9d2635;
}
.progress {
  height: 14px;
  background: #e4eff7;
  border-radius: 999px;
  overflow: hidden;
  margin: 20px auto 0;
  max-width: 620px;
}
.progress > div {
  height: 100%;
  background: linear-gradient(90deg, #ffaf45, #ff6b91);
  width: 0;
  transition: width 0.4s;
}
.speech-status {
  min-height: 22px;
  margin: 10px auto 0;
  max-width: 760px;
  text-align: center;
  color: #a23b12;
  font-size: 14px;
  font-weight: 800;
}
.bug-launch-row {
  text-align: center;
  margin: 18px 0 0;
}
.bug-launch {
  padding: 11px 17px;
  border-radius: 999px;
  background: #fff0dc;
  color: #854900;
  border: 2px solid #ffd39b;
  font-weight: 900;
  box-shadow: 0 4px 14px #6f421526;
}
.copyright {
  text-align: center;
  margin: 18px 0 0;
  color: #625b78;
  font-size: 13px;
  font-weight: 700;
}
.modal {
  position: fixed;
  inset: 0;
  background: rgba(25, 41, 52, 0.68);
  backdrop-filter: blur(6px);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}
.modal[hidden] {
  display: none;
}
.modal-box {
  background: #fff;
  width: min(720px, 100%);
  max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 30px;
  padding: clamp(22px, 4vw, 38px);
  box-shadow: 0 25px 80px #101c2580;
  text-align: center;
}
.modal-box h2 {
  font-size: clamp(27px, 4vw, 40px);
  margin: 0 0 10px;
}
.modal-box p {
  font-size: 18px;
  line-height: 1.5;
}
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 18px;
}
.big-btn {
  background: var(--purple);
  color: #fff;
  padding: 16px 25px;
  border-radius: 17px;
  font-size: 20px;
  font-weight: 900;
  min-height: 58px;
}
.big-btn.secondary {
  background: #ebf5fc;
  color: #2f638b;
}
.big-btn.danger {
  background: #fff0f1;
  color: #b62f3c;
}
.big-btn.green {
  background: #15945d;
}
.big-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.field {
  text-align: left;
  margin: 14px 0;
}
.field label,
.field legend {
  display: block;
  font-weight: 900;
  margin-bottom: 7px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px;
  border: 2px solid #d2e2ef;
  border-radius: 13px;
  background: #fff;
}
.field textarea {
  resize: vertical;
  min-height: 88px;
}
.field input[type="checkbox"] {
  width: 24px;
  height: 24px;
  vertical-align: middle;
  margin-right: 8px;
}
.field .check {
  display: inline-flex;
  align-items: center;
  margin: 7px 16px 7px 0;
  font-weight: 700;
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
}
.wide {
  grid-column: 1/-1;
}
.note {
  background: #f1f8fd;
  border-radius: 15px;
  padding: 12px;
  font-size: 14px !important;
  color: #445c6e;
}
.error {
  color: #bb2838;
  font-weight: 800;
  min-height: 23px;
}
.success {
  color: #168552;
  font-weight: 800;
}
.camera-modal-box {
  width: min(760px, 100%);
}
.camera-wrap {
  position: relative;
  flex: none;
  width: min(620px, 100%);
  height: min(420px, 52dvh);
  min-height: 260px;
  margin: 14px auto;
  border-radius: 22px;
  overflow: hidden;
  background: #131c22;
}
.camera-wrap video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.camera-wrap video.mirror {
  transform: scaleX(-1);
}
.camera-label {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  background: #111b;
  color: #fff;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
}
.target-box {
  position: absolute;
  left: 25%;
  top: 20%;
  width: 50%;
  height: 60%;
  border: 5px dashed #fff;
  border-radius: 20px;
  box-shadow: 0 0 0 999px #0004;
  pointer-events: none;
}
.camera-status {
  font-size: clamp(18px, 4vw, 24px);
  font-weight: 900;
  margin: 8px;
  min-height: 30px;
}
.meter {
  height: 20px;
  background: #e5e5ec;
  border-radius: 999px;
  overflow: hidden;
  flex: 0 0 auto;
}
.meter > div {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #65d39d, #ffd447, #ff7777);
  transition: width 0.15s;
}
.history-list,
.reward-list,
.day-list {
  display: grid;
  gap: 10px;
  text-align: left;
}
.history-item,
.reward-item,
.day-item {
  background: #f3f9fe;
  border: 2px solid #e4f2fc;
  border-radius: 16px;
  padding: 13px;
}
.history-item b,
.day-item b {
  display: block;
  margin-bottom: 4px;
}
.reward-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}
.reward-item button {
  padding: 10px 13px;
  border-radius: 12px;
  background: #4395d2;
  color: #fff;
  font-weight: 900;
}
.reward-item button:disabled {
  opacity: 0.45;
}
.points-banner {
  background: linear-gradient(135deg, #fff3bd, #ffe2a4);
  border: 3px solid #ffd76a;
  border-radius: 20px;
  padding: 16px;
  margin: 12px 0;
}
.points-banner b {
  display: block;
  font-size: 34px;
}
.mini {
  font-size: 13px;
  color: var(--muted);
}
.memory {
  display: grid;
  grid-template-columns: repeat(var(--memory-columns, 4), minmax(52px, 100px));
  gap: clamp(6px, 1.2vw, 12px);
  justify-content: center;
  width: 100%;
}
.memory button {
  display: grid;
  place-items: center;
  min-width: 0;
  width: 100%;
  aspect-ratio: 1;
  padding: 6px;
  overflow: hidden;
  background: #62a9df;
  color: #fff;
  border-radius: 18px;
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 6px 0 #3572a1;
}
.memory button.open,
.memory button.done {
  background: #fff;
  color: var(--ink);
  border: 3px solid #d5eafa;
  box-shadow: none;
}
.memory button.done {
  opacity: 0.5;
}
.memory button.memory-word {
  font-size: clamp(14px, 2.35vw, 24px);
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}
.memory-picture {
  display: block;
  width: 88%;
  height: 88%;
  object-fit: contain;
  border-radius: 10px;
}
.memory-picture-card > span {
  font-size: clamp(30px, 6vw, 48px);
}
.puzzle-shell {
  display: grid;
  gap: 11px;
  width: min(720px, 100%);
  margin: auto;
}
.puzzle-status {
  justify-self: center;
  padding: 8px 13px;
  border-radius: 999px;
  background: #eff7fd;
  color: #32709f;
  font-size: 14px;
  font-weight: 900;
}
.tile-puzzle {
  display: grid;
  grid-template-columns: repeat(var(--puzzle-size), 1fr);
  gap: 6px;
  width: min(390px, 88vw);
  aspect-ratio: 1;
  margin: auto;
  padding: 9px;
  background: #396485;
  border-radius: 22px;
  box-shadow: 0 10px 25px #2856792d;
}
.puzzle-tile {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-radius: 9px;
  background-repeat: no-repeat;
  background-color: #fff;
  cursor: default;
}
.puzzle-tile.movable {
  cursor: pointer;
  box-shadow: inset 0 0 0 5px #72d8a7;
}
.puzzle-tile.movable:hover {
  box-shadow: inset 0 0 0 7px #35ad75;
}
.puzzle-tile.hinted {
  animation: puzzleHint 0.7s infinite alternate;
  box-shadow:
    inset 0 0 0 7px #ffad25,
    0 0 18px #ffad2588;
}
.puzzle-tile.blank {
  background: #24445d;
  box-shadow: inset 0 0 0 3px #ffffff30;
}
.puzzle-tile[data-piece]::after {
  content: attr(data-piece);
  position: absolute;
  right: 5px;
  bottom: 5px;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #fff;
  color: #32709f;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 2px 7px #15324955;
  opacity: 0;
  transition: opacity 0.15s;
}
.tile-puzzle.show-numbers .puzzle-tile[data-piece]::after {
  opacity: 1;
}
.puzzle-tools {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.puzzle-tools button {
  min-height: 43px;
  padding: 9px 12px;
  border: 2px solid #d8eaf7;
  border-radius: 12px;
  background: #fff;
  color: #32709f;
  font-size: 13px;
  font-weight: 900;
}
.puzzle-tools button.active {
  border-color: #408fcb;
  background: #ecf6fd;
}
.puzzle-tools button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
.draw-shell {
  width: min(620px, 100%);
  margin: auto;
}
.draw-canvas {
  display: block;
  width: 100%;
  aspect-ratio: 25/17;
  background: #fff;
  border: 4px solid #d5eafa;
  border-radius: 20px;
  touch-action: none;
  box-shadow: inset 0 0 0 2px #fff;
}
.draw-tools {
  display: flex;
  gap: 9px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 12px;
}
.draw-tools button {
  padding: 12px 15px;
  border-radius: 14px;
  background: #ecf6fd;
  font-size: 16px;
  font-weight: 900;
}
.draw-tools .check-drawing {
  background: #15945d;
  color: #fff;
}
.draw-note {
  font-size: 14px;
  color: var(--muted);
  margin: 9px 0 0;
}
.parent-box {
  width: min(940px, 100%);
  padding: 0;
  background: #f7fafc;
  text-align: left;
}
.parent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 26px 30px 12px;
  background: #fff;
  border-radius: 30px 30px 0 0;
}
.parent-head h2 {
  margin: 0;
}
.parent-head p {
  margin: 4px 0 0;
  font-size: 15px;
  color: var(--muted);
}
.version-badge {
  flex: 0 0 auto;
  background: #ecf6fd;
  color: #3773a1;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 900;
}
.parent-tabs {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  margin: 0;
  padding: 12px 30px;
  background: #fff;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  border-bottom: 1px solid #e9f0f5;
}
.tab {
  flex: 0 0 auto;
  padding: 11px 15px;
  border-radius: 13px;
  background: #eaf4fc;
  font-weight: 900;
}
.tab.on {
  background: var(--purple);
  color: #fff;
}
.parent-content {
  padding: 18px 30px 4px;
}
.admin-section {
  background: #fff;
  border: 1px solid #e8eff4;
  border-radius: 20px;
  padding: 18px 20px;
  margin-bottom: 14px;
  box-shadow: 0 7px 22px #26506f0d;
}
.admin-section h3 {
  margin: 0 0 5px;
  font-size: 21px;
}
.section-help {
  margin: 0 0 12px !important;
  font-size: 14px !important;
  color: var(--muted);
}
.category-weights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.category-weight {
  padding: 12px 13px;
  border: 2px solid #e7f2fb;
  border-radius: 16px;
  background: #fbfdfe;
}
.weight-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.weight-head label {
  font-weight: 900;
}
.weight-value {
  display: grid;
  place-items: center;
  min-width: 50px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #4395d2;
  color: #fff;
  font-weight: 900;
}
.category-weight input[type="range"] {
  width: 100%;
  height: 28px;
  padding: 0;
  border: 0;
  accent-color: #4395d2;
}
.weight-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.weight-preset {
  padding: 9px 12px;
  border-radius: 12px;
  background: #ecf6fd;
  color: #326c98;
  font-weight: 900;
}
.weight-total {
  margin-top: 10px;
  font-weight: 900;
  color: #267150;
}
.toggle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.toggle-card {
  display: flex !important;
  align-items: flex-start !important;
  gap: 8px;
  margin: 0 !important;
  padding: 13px;
  border: 2px solid #e7f2fb;
  border-radius: 15px;
  background: #fbfdfe;
}
.toggle-card input {
  flex: 0 0 auto;
}
.parent-footer {
  position: sticky;
  bottom: 0;
  z-index: 4;
  margin-top: 12px;
  padding: 12px 30px max(18px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, #f7fafc00, #f7fafc 24%);
  text-align: right;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}
.stat {
  background: #f3f9fd;
  padding: 12px;
  border-radius: 14px;
}
.stat b {
  font-size: 25px;
  display: block;
}
.screen-lock {
  font-size: 72px;
}
.child-list,
.voice-catalog,
.reward-editor,
.assessment-grid {
  display: grid;
  gap: 10px;
}
.child-card,
.voice-row,
.reward-edit-row,
.assessment-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 2px solid #e7f2fb;
  border-radius: 16px;
  background: #fbfdfe;
}
.child-card.active {
  border-color: #4395d2;
  background: #f0f7fd;
}
.child-card b,
.assessment-card b,
.assessment-card span,
.voice-row b,
.voice-row span {
  display: block;
}
.child-actions,
.voice-actions,
.voice-toolbar {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.voice-toolbar {
  justify-content: flex-start;
}
.child-actions button,
.voice-row button,
.reward-edit-row button {
  padding: 9px 11px;
  border-radius: 11px;
  background: #4395d2;
  color: #fff;
  font-weight: 900;
}
.voice-row button.secondary-small {
  background: #ebf5fc;
  color: #2f638b;
}
.child-actions button:disabled,
.voice-row button:disabled {
  opacity: 0.55;
}
.child-actions .danger-small,
.reward-edit-row button {
  background: #fff0f1;
  color: #a62f3d;
}
.reward-edit-row {
  grid-template-columns: minmax(150px, 1fr) 110px auto;
}
.reward-edit-row input {
  width: 100%;
  padding: 11px;
  border: 2px solid #d2e2ef;
  border-radius: 12px;
}
.voice-catalog {
  margin-top: 8px;
  padding: 13px;
  background: #f6fbfe;
  border-radius: 16px;
}
.voice-catalog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.voice-catalog-head span {
  display: block;
  text-align: right;
}
.voice-group-title {
  margin: 9px 0 0;
  padding-top: 10px;
  border-top: 1px solid #dbe2ea;
  color: #334155;
  font-size: 14px;
}
.voice-row {
  background: #fff;
}
.voice-row button {
  min-width: 112px;
}
.voice-catalog-note {
  margin: 5px 0 0;
  line-height: 1.45;
}
.status-line {
  margin: 8px 0;
  padding: 11px 13px;
  border-radius: 13px;
  background: #fff5cf;
  color: #735b00;
  font-weight: 900;
}
.status-line.ready {
  background: #e3f8ec;
  color: #176c49;
}
.status-line.warning {
  background: #fff0dc;
  color: #874a00;
}
.voice-error {
  color: #a51f32;
  font-weight: 800;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 8px 0;
}
.assessment-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.assessment-card {
  display: block;
}
.assessment-note {
  grid-column: 1/-1;
  margin: 3px 0;
}
.player-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.player-card {
  min-height: 90px;
  padding: 15px;
  border: 3px solid #e4f2fc;
  border-radius: 20px;
  background: #fbfdfe;
  font-size: 20px;
  font-weight: 900;
}
.player-card span {
  display: block;
  margin-top: 5px;
  font-size: 14px;
  color: var(--muted);
}
.interest-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 12px 0;
}
.interest-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: 2px solid #e7f2fb;
  border-radius: 15px;
  background: #fbfdfe;
  font-weight: 900;
}
.interest-option input {
  width: 22px;
  height: 22px;
  accent-color: #4395d2;
}
.file-button {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.content-summary {
  margin: 12px 0;
  padding: 12px;
  border-radius: 14px;
  background: #f1f8fd;
  font-weight: 900;
}
.content-review,
.device-log,
.bug-log {
  display: grid;
  gap: 9px;
  margin: 12px 0;
}
.content-card,
.device-entry,
.bug-entry {
  padding: 12px 13px;
  border: 2px solid #e7f2fb;
  border-radius: 15px;
  background: #fff;
  text-align: left;
}
.content-card b,
.device-entry b,
.bug-entry b {
  display: block;
  margin-bottom: 4px;
}
.device-meta,
.bug-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 12px;
  margin-top: 7px;
  font-size: 13px;
  color: var(--muted);
}
.device-ua {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid #e7f2fb;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.device-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.device-filters select {
  min-width: 180px;
  padding: 10px;
  border: 2px solid #d2e2ef;
  border-radius: 12px;
}
.reset-zone {
  margin-top: 22px;
  border: 2px solid #f1a4ad;
  background: #fff9f9;
}
.danger-small {
  background: #fff0f1 !important;
  color: #a62f3d !important;
}
.bug-settings-action {
  display: flex;
  align-items: flex-end;
}
.bug-settings-action button {
  width: 100%;
  min-height: 49px;
}
.bug-report-box {
  width: min(820px, 100%);
}
.bug-preview {
  display: block;
  width: min(100%, 620px);
  max-height: 270px;
  object-fit: contain;
  margin: 12px auto;
  border: 3px solid #e4f2fc;
  border-radius: 18px;
  background: #f4fafe;
}
.bug-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 15px 0;
}
.bug-type {
  min-height: 82px;
  padding: 13px;
  border: 3px solid #e4f2fc;
  border-radius: 18px;
  background: #fbfdfe;
  font-size: 17px;
  font-weight: 900;
  text-align: left;
}
.bug-type span {
  font-size: 28px;
  display: block;
  margin-bottom: 3px;
}
.bug-type.selected {
  border-color: #4395d2;
  background: #ecf6fd;
  box-shadow: 0 0 0 3px #4395d227;
}
.bug-entry {
  cursor: pointer;
}
.bug-entry:hover {
  border-color: #78b9ea;
}
.bug-status {
  display: inline-block;
  margin-left: 7px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fff0c7;
  color: #765200;
  font-size: 12px;
}
.bug-status.resolved {
  background: #dcf6e8;
  color: #176c49;
}
.bug-detail-box {
  width: min(900px, 100%);
}
.bug-detail-image {
  display: block;
  width: 100%;
  max-height: 440px;
  object-fit: contain;
  border: 3px solid #e4f2fc;
  border-radius: 18px;
  background: #f4fafe;
}
.bug-task {
  margin-top: 12px;
  padding: 13px;
  border-radius: 15px;
  background: #f3f9fe;
  text-align: left;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.button-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.bug-detail-box .modal-actions {
  position: sticky;
  bottom: -1px;
  padding: 12px;
  background: #fff;
}
.bug-report-box .note {
  font-size: 13px !important;
}
.voice-save-status {
  margin: 4px 0 10px;
  padding: 9px 11px;
  border: 1px solid #d5dce7;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}
.voice-save-status.saving {
  color: #854d0e;
  background: #fffbeb;
  border-color: #fde68a;
}
.voice-save-status.saved {
  color: #166534;
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.voice-save-status.error {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fecaca;
}

/* Sachliche Verwaltungsoberfläche für Erwachsene */
#parentModal {
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(3px);
}
.parent-box {
  width: min(1180px, calc(100vw - 32px));
  height: min(92dvh, 920px);
  max-height: 92dvh;
  padding: 0;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  background: #f3f5f8;
  color: #1e293b;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  box-shadow: 0 30px 90px #02061766;
  text-align: left;
}
.parent-head {
  grid-column: 1/-1;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 26px;
  background: #fff;
  border-bottom: 1px solid #dbe2ea;
  border-radius: 0;
}
.parent-head h2 {
  margin: 0;
  color: #0f172a;
  font-size: 25px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.parent-head p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 14px;
}
.version-badge {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid #dbe2ea;
  border-radius: 7px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}
.parent-tabs {
  position: static;
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: flex-start;
  margin: 0;
  padding: 18px 12px;
  background: #172033;
  border: 0;
  border-right: 1px solid #0f172a;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
}
.parent-tabs .tab {
  flex: 0 0 auto;
  width: 100%;
  padding: 11px 13px;
  border-radius: 7px;
  background: transparent;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
}
.parent-tabs .tab:hover {
  background: #ffffff12;
  color: #fff;
}
.parent-tabs .tab.on {
  background: #2563eb;
  color: #fff;
  box-shadow: none;
}
.parent-content {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  overflow-y: auto;
  padding: 22px 24px 8px;
  background: #f3f5f8;
}
.parent-content > section > h3 {
  color: #0f172a;
  font-size: 18px;
}
.admin-section {
  margin-bottom: 16px;
  padding: 19px 20px;
  border: 1px solid #dbe2ea;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 3px #0f172a0d;
}
.admin-section h3 {
  margin: 0 0 5px;
  color: #0f172a;
  font-size: 18px;
  font-weight: 700;
}
.section-help {
  margin: 0 0 14px !important;
  color: #64748b !important;
  font-size: 13px !important;
}
.parent-box .field {
  margin: 12px 0;
}
.parent-box .field label,
.parent-box .field legend {
  margin-bottom: 6px;
  color: #334155;
  font-size: 13px;
  font-weight: 650;
}
.parent-box .field input,
.parent-box .field select,
.parent-box .field textarea,
.parent-box .device-filters select {
  padding: 10px 11px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 1px 2px #0f172a0b;
}
.parent-box .field input:focus,
.parent-box .field select:focus,
.parent-box .field textarea:focus {
  border-color: #2563eb;
  outline: 3px solid #2563eb22;
}
.parent-box .big-btn {
  min-height: 44px;
  padding: 11px 17px;
  border-radius: 7px;
  background: #2563eb;
  font-size: 15px;
  font-weight: 650;
}
.parent-box .big-btn.secondary {
  background: #e2e8f0;
  color: #1e293b;
}
.parent-box .big-btn.danger {
  background: #fee2e2;
  color: #991b1b;
}
.parent-box .weight-preset {
  padding: 9px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 650;
}
.parent-box .weight-preset:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}
.parent-box .note {
  padding: 11px 13px;
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
}
.category-weight,
.toggle-card,
.interest-option,
.child-card,
.voice-row,
.reward-edit-row,
.assessment-card,
.content-card,
.device-entry,
.bug-entry {
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  background: #fff;
}
.child-card {
  padding: 14px;
}
.child-card.active {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: inset 3px 0 #2563eb;
}
.child-actions button,
.voice-row button,
.reward-edit-row button,
.reward-item button {
  padding: 9px 12px;
  border-radius: 6px;
  background: #2563eb;
  font-size: 13px;
  font-weight: 650;
}
.child-actions .danger-small,
.reward-edit-row button {
  background: #fef2f2;
  color: #b91c1c;
}
.weight-value {
  background: #334155;
}
.points-banner {
  border: 1px solid #dbe2ea;
  border-radius: 9px;
  background: #fff;
}
.points-banner b {
  font-size: 28px;
}
.stats {
  gap: 12px;
}
.stat {
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  background: #fff;
}
.stat b {
  font-size: 22px;
}
.status-line {
  border-radius: 8px;
  font-size: 13px;
}
.voice-catalog {
  border: 1px solid #dbe2ea;
  border-radius: 9px;
  background: #f8fafc;
}
.device-filters {
  align-items: center;
}
.device-filters select {
  min-width: 190px;
}
.parent-footer {
  position: static;
  grid-column: 1/-1;
  grid-row: 3;
  margin: 0;
  padding: 12px 24px;
  background: #fff;
  border-top: 1px solid #dbe2ea;
  text-align: right;
}
@keyframes shake {
  25% {
    transform: translateX(-8px);
  }
  75% {
    transform: translateX(8px);
  }
}
@media (hover: hover) {
  .answer:hover {
    transform: translateY(-2px);
  }
}
@media (max-width: 680px) {
  header {
    grid-template-columns: 1fr auto;
  }
  .status {
    grid-row: 2;
    grid-column: 1/-1;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .wide {
    grid-column: auto;
  }
  .card {
    min-height: 390px;
    border-radius: 25px;
  }
  .answer {
    min-width: 90px;
  }
  .stats {
    grid-template-columns: 1fr;
  }
  .category-weights,
  .assessment-grid {
    grid-template-columns: 1fr;
  }
  .toggle-grid {
    grid-template-columns: 1fr;
  }
  .brand-copy small {
    display: none;
  }
  .actions {
    position: sticky;
    bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 5;
    background: #f5fafef2;
    padding: 9px;
    border-radius: 20px;
    box-shadow: 0 8px 25px #26506f26;
  }
  .action {
    flex: 1 1 145px;
  }
  .camera-wrap {
    width: 100%;
  }
  .child-card,
  .voice-row {
    grid-template-columns: 1fr;
  }
  .child-actions {
    justify-content: flex-start;
  }
  .reward-edit-row {
    grid-template-columns: 1fr 95px;
  }
  .reward-edit-row button {
    grid-column: 1/-1;
  }
  .voice-row button {
    width: 100%;
  }
  .interest-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .device-meta,
  .bug-meta {
    grid-template-columns: 1fr;
  }
  .bug-type-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .app {
    padding-top: max(8px, env(safe-area-inset-top));
    padding-left: max(8px, env(safe-area-inset-left));
    padding-right: max(8px, env(safe-area-inset-right));
  }
  .brand {
    gap: 7px;
    font-size: 19px;
  }
  .brand-icon {
    border-radius: 12px;
  }
  .header-tools {
    gap: 5px;
  }
  .public-version {
    min-height: 34px;
    padding: 6px 8px;
    font-size: 11px;
  }
  .parent-btn {
    width: 46px;
    height: 46px;
  }
  .status {
    gap: 5px;
  }
  .category {
    margin-top: 12px;
  }
  .card {
    padding: 18px 10px;
    min-height: 360px;
    border-radius: 22px;
  }
  #question {
    font-size: clamp(25px, 8vw, 36px);
  }
  #visual {
    min-height: 68px;
    font-size: clamp(45px, 16vw, 70px);
    margin-bottom: 10px;
  }
  #visual.has-image {
    min-height: 140px;
  }
  .puzzle-image {
    max-height: 145px;
  }
  .answer {
    flex: 1 1 calc(50% - 8px);
    max-width: 220px;
    min-height: 78px;
    padding: 17px 8px 10px;
    font-size: clamp(26px, 10vw, 42px);
    border-radius: 19px;
  }
  .answer.long {
    flex-basis: 100%;
    max-width: none;
    min-height: 68px;
    padding: 14px 12px 12px 47px;
    font-size: 20px;
  }
  .answer.image-choice {
    min-height: 145px;
    padding: 12px 5px 8px;
  }
  .answer-image {
    width: 98px;
    height: 76px;
  }
  .answer-caption {
    font-size: 15px;
  }
  .answer-number {
    width: 28px;
    height: 28px;
    font-size: 16px;
  }
  .answer.color {
    height: 84px;
  }
  .pill {
    padding: 7px 9px;
    font-size: 13px;
  }
  .actions {
    gap: 7px;
  }
  .action {
    min-height: 52px;
    padding: 11px 9px;
    font-size: 15px;
  }
  .modal {
    padding: 0;
  }
  .modal-box {
    width: 100%;
    max-height: 100dvh;
    min-height: min(100dvh, 620px);
    border-radius: 0;
    padding: max(18px, env(safe-area-inset-top)) 12px max(20px, env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }
  .modal-box h2 {
    font-size: 29px;
  }
  .modal-box p {
    font-size: 17px;
  }
  .parent-box {
    padding: 0;
    display: block;
  }
  .parent-head {
    padding: max(17px, env(safe-area-inset-top)) 14px 10px;
    border-radius: 0;
  }
  .parent-head p {
    display: none;
  }
  .version-badge {
    font-size: 12px;
    padding: 6px 9px;
  }
  .parent-tabs {
    padding: 9px 12px;
  }
  .tab {
    padding: 10px 12px;
  }
  .parent-content {
    padding: 12px 10px 2px;
  }
  .admin-section {
    padding: 15px 13px;
    border-radius: 17px;
  }
  .parent-footer {
    padding: 10px 12px max(14px, env(safe-area-inset-bottom));
  }
  .parent-footer .big-btn {
    width: 100%;
  }
  .big-btn {
    width: 100%;
    min-height: 56px;
  }
  .camera-modal-box {
    overflow-y: auto;
  }
  .camera-wrap {
    width: 100%;
    max-width: none;
    height: clamp(230px, calc((100vw - 24px) * 0.75), 360px);
    min-height: 0;
    border-radius: 17px;
    margin: 8px auto;
  }
  .camera-status {
    margin: 6px;
  }
  .target-box {
    left: 22%;
    top: 18%;
    width: 56%;
    height: 64%;
  }
  .reward-item {
    grid-template-columns: 1fr;
  }
  .reward-item button {
    width: 100%;
  }
  .player-list,
  .interest-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-height: 650px) and (orientation: landscape) {
  .app {
    padding-top: 8px;
  }
  .card {
    min-height: 285px;
    padding: 14px 22px;
  }
  .category {
    margin-top: 8px;
  }
  #visual {
    min-height: 58px;
    font-size: 52px;
    margin-bottom: 8px;
  }
  #question {
    font-size: 30px;
  }
  .answer {
    min-height: 66px;
  }
  .modal-box {
    max-height: calc(100dvh - 12px);
  }
  .camera-wrap {
    height: min(58dvh, 300px);
    min-height: 190px;
  }
}
@media (max-width: 820px) {
  #parentModal {
    padding: 0;
  }
  .parent-box {
    display: block;
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
    overflow-y: auto;
  }
  .parent-head {
    position: sticky;
    top: 0;
    z-index: 6;
    padding: max(15px, env(safe-area-inset-top)) 16px 13px;
  }
  .parent-head p {
    display: none;
  }
  .parent-tabs {
    position: sticky;
    top: 69px;
    z-index: 5;
    display: flex;
    flex-direction: row;
    gap: 5px;
    padding: 8px 12px;
    background: #172033;
    border-right: 0;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .parent-tabs .tab {
    width: auto;
    padding: 9px 12px;
    white-space: nowrap;
  }
  .parent-content {
    overflow: visible;
    padding: 16px 12px 6px;
  }
  .parent-footer {
    position: sticky;
    bottom: 0;
    padding: 10px 12px max(12px, env(safe-area-inset-bottom));
  }
  .parent-footer .big-btn {
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* Familienzugang und getrennte Entwicklerverwaltung */
.admin-open {
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #172033;
  color: #fff;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
}
.access-box {
  width: min(520px, 100%);
  border-radius: 16px;
  padding: 32px;
  text-align: left;
  font-family: "Segoe UI", Arial, sans-serif;
}
.access-box h2 {
  color: #0f172a;
  font-size: 28px;
}
.access-box p {
  color: #475569;
  font-size: 15px;
}
.access-kicker {
  margin-bottom: 8px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.access-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 14px;
  color: #64748b;
  font-size: 12px;
}
.access-divider::before,
.access-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #dbe2ea;
}
#adminModal {
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(3px);
}
.admin-box {
  width: min(1240px, calc(100vw - 32px));
  height: min(94dvh, 940px);
  max-height: 94dvh;
  padding: 0;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  background: #f3f5f8;
  color: #1e293b;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  text-align: left;
  overflow: hidden;
}
.admin-box > .parent-head {
  grid-column: 1/-1;
  grid-row: 1;
}
.admin-tabs {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 12px;
  background: #172033;
  border-right: 1px solid #0f172a;
  overflow-y: auto;
}
.admin-tab {
  width: 100%;
  padding: 11px 13px;
  border-radius: 7px;
  background: transparent;
  color: #cbd5e1;
  font:
    600 14px "Segoe UI",
    Arial,
    sans-serif;
  text-align: left;
}
.admin-tab:hover {
  background: #ffffff12;
  color: #fff;
}
.admin-tab.on {
  background: #2563eb;
  color: #fff;
}
.admin-content {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  padding: 22px 24px 8px;
  overflow-y: auto;
}
.admin-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}
.admin-overview > div {
  padding: 15px;
  border: 1px solid #dbe2ea;
  border-radius: 9px;
  background: #fff;
}
.admin-overview b,
.admin-overview span {
  display: block;
}
.admin-overview b {
  color: #0f172a;
  font-size: 25px;
}
.admin-overview span {
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
}
.section-title-row,
.admin-family-head,
.admin-license-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.admin-family-list,
.admin-license-list {
  display: grid;
  gap: 12px;
}
.admin-family-card,
.admin-license-card {
  padding: 15px;
  border: 1px solid #dbe2ea;
  border-radius: 9px;
  background: #f8fafc;
}
.admin-family-card.disabled,
.admin-license-card.disabled {
  border-color: #fecaca;
  background: #fff7f7;
}
.admin-family-head b,
.admin-family-head span,
.admin-license-head b,
.admin-license-head span {
  display: block;
}
.admin-family-head span,
.admin-license-head span {
  margin-top: 5px;
  color: #64748b;
  font-size: 12px;
}
.admin-inline-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.admin-inline-actions button,
.admin-inline-actions a,
.trusted-device-list button {
  padding: 7px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #334155;
  font:
    600 12px "Segoe UI",
    Arial,
    sans-serif;
  text-decoration: none;
}
.trusted-device-list {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}
.trusted-device-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #fff;
  color: #475569;
  font-size: 12px;
}
.admin-bug-entry {
  cursor: default;
}
.admin-box .parent-footer {
  grid-column: 1/-1;
  grid-row: 3;
}
.license-status {
  display: inline-flex !important;
  width: max-content;
  margin-top: 7px !important;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155 !important;
  font-size: 11px !important;
  font-weight: 700;
}
.license-status.active {
  background: #dcfce7;
  color: #166534 !important;
}
.license-status.warning,
.license-status.grace {
  background: #fef3c7;
  color: #92400e !important;
}
.license-status.expired,
.license-status.revoked,
.license-status.disabled,
.license-status.deletion_pending {
  background: #fee2e2;
  color: #991b1b !important;
}
.license-request {
  margin-top: 12px;
  padding: 10px;
  border: 1px solid #f59e0b;
  border-radius: 7px;
  background: #fffbeb;
  color: #78350f;
  font-size: 13px;
}
.license-request.deletion {
  border-color: #ef4444;
  background: #fef2f2;
  color: #991b1b;
}
.issued-code {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #86efac;
  border-radius: 8px;
  background: #f0fdf4;
}
.issued-code label,
.issued-code span {
  display: block;
}
.issued-code > div {
  display: flex;
  gap: 8px;
  margin: 7px 0;
}
.issued-code input {
  font:
    700 18px ui-monospace,
    monospace;
  letter-spacing: 0.06em;
}
.license-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid #f59e0b;
  border-radius: 9px;
  background: #fffbeb;
  color: #78350f;
}
.license-notice b,
.license-notice span {
  display: block;
}
.license-notice span {
  margin-top: 4px;
  font-size: 13px;
}
.license-notice.grace {
  border-color: #ef4444;
  background: #fef2f2;
  color: #991b1b;
}
.device-filters input[type="search"] {
  min-width: 240px;
  flex: 1;
  padding: 10px 11px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
}
.account-delete-box {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #fecaca;
  border-radius: 8px;
}
.account-delete-box h4 {
  margin: 0 0 8px;
}
.license-notice[hidden],
.issued-code[hidden] {
  display: none !important;
}
.field-action {
  display: flex;
  gap: 7px;
}
.field-action input {
  min-width: 0;
  flex: 1;
}
.credential-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px !important;
  margin: 10px 0 !important;
}
.credential-grid > div {
  display: block !important;
  min-width: 0;
  margin: 0 !important;
}
.credential-grid input {
  width: 100%;
  margin-top: 4px;
  padding: 10px;
  border: 1px solid #86efac;
  border-radius: 6px;
  background: #fff;
  font:
    700 14px ui-monospace,
    monospace;
  letter-spacing: 0.03em;
}
.issued-code h4 {
  margin: 0 0 4px;
}
.issued-code > .admin-inline-actions {
  display: flex;
  gap: 8px;
  margin: 10px 0;
}
.license-notice .license-message {
  min-height: 0;
  font-weight: 700;
}
.license-notice .license-message.success {
  color: #166534;
}
.license-notice .license-message.error {
  color: #991b1b;
}
.recovery-box {
  margin: 12px 0;
  padding: 13px;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  background: #fffbeb;
  color: #78350f;
}
.recovery-box pre {
  margin: 9px 0;
  padding: 10px;
  border-radius: 6px;
  background: #fff;
  font:
    700 14px/1.55 ui-monospace,
    monospace;
  white-space: pre-wrap;
  user-select: all;
}
.license-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.license-overview-card {
  padding: 13px;
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  background: #f8fafc;
}
.license-overview-card span,
.license-overview-card b {
  display: block;
}
.license-overview-card span {
  margin-bottom: 4px;
  color: #64748b;
  font-size: 12px;
}
.license-overview-card.active {
  border-color: #86efac;
  background: #f0fdf4;
}
.license-overview-card.grace,
.license-overview-card.pending {
  border-color: #fcd34d;
  background: #fffbeb;
}
.license-overview-card.expired,
.license-overview-card.revoked,
.license-overview-card.disabled {
  border-color: #fca5a5;
  background: #fef2f2;
}
.renewal-code-list {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  padding: 11px;
  border: 1px solid #dbe2ea;
  border-radius: 7px;
  background: #fff;
}
.renewal-code-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 7px;
  border-top: 1px solid #e2e8f0;
  color: #475569;
  font-size: 12px;
}
.renewal-revoke-all {
  justify-self: start;
}
.admin-bug-question {
  display: block;
  margin: 5px 0;
  color: #334155;
  font-size: 13px;
}
.bug-correction-box {
  width: min(760px, 100%);
  text-align: left;
}
.bug-correction-context {
  padding: 10px;
  border: 1px solid #dbe2ea;
  border-radius: 7px;
  background: #f8fafc;
  color: #475569 !important;
  font-size: 13px !important;
}
.bug-correction-box textarea {
  width: 100%;
  resize: vertical;
}
.bug-correction-box select {
  width: 100%;
  padding: 11px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
}
.family-qr-panel {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #bfdbfe;
  border-radius: 9px;
  background: #eff6ff;
  text-align: center;
}
.family-qr-panel[hidden] {
  display: none !important;
}
.family-qr-panel img {
  width: min(280px, 100%);
  aspect-ratio: 1;
  border: 10px solid #fff;
  border-radius: 8px;
  background: #fff;
  image-rendering: pixelated;
}
.family-qr-panel a {
  max-width: 100%;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.qr-login-section > #familyQrMessage {
  margin-top: 10px;
}
.admin-bug-entry .danger-small {
  border-color: #fecaca;
  color: #991b1b;
}
@media (max-width: 820px) {
  .admin-box {
    display: block;
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
    overflow-y: auto;
  }
  .admin-box > .parent-head {
    position: sticky;
    top: 0;
    z-index: 6;
  }
  .admin-tabs {
    position: sticky;
    top: 69px;
    z-index: 5;
    display: flex;
    flex-direction: row;
    gap: 5px;
    padding: 8px 12px;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .admin-tab {
    width: auto;
    white-space: nowrap;
  }
  .admin-content {
    padding: 16px 12px 6px;
    overflow: visible;
  }
  .admin-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-family-head,
  .admin-license-head,
  .section-title-row {
    display: block;
  }
  .admin-inline-actions {
    margin-top: 10px;
  }
  .trusted-device-list > div {
    align-items: flex-start;
    flex-direction: column;
  }
  .header-tools {
    flex-wrap: wrap;
  }
  .admin-open {
    min-height: 34px;
    padding: 6px 8px;
  }
  .license-notice {
    align-items: flex-start;
    flex-direction: column;
  }
  .admin-box .parent-footer {
    position: sticky;
    bottom: 0;
  }
}
@media (max-width: 480px) {
  .access-box {
    padding: max(22px, env(safe-area-inset-top)) 16px;
    display: block;
  }
  .admin-box > .parent-head {
    padding: max(16px, env(safe-area-inset-top)) 14px 13px;
  }
  .admin-overview,
  .license-overview {
    grid-template-columns: 1fr;
  }
  .admin-open {
    font-size: 10px;
  }
  .header-tools #familyBadge {
    display: none;
  }
  .credential-grid {
    grid-template-columns: 1fr;
  }
  .field-action {
    align-items: stretch;
    flex-direction: column;
  }
  .issued-code button {
    margin-top: 4px;
    width: 100%;
  }
  .renewal-code-list > div {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Ruhige Entwickleroberfläche und eingebettete Bearbeitung */
[hidden] {
  display: none !important;
}
#adminModal .admin-tabs {
  background: #1f2937;
  border-color: #111827;
}
#adminModal .admin-tab {
  color: #d1d5db;
}
#adminModal .admin-tab:hover {
  background: #374151;
  color: #fff;
}
#adminModal .admin-tab.on {
  background: #475569;
  color: #fff;
}
#adminModal .access-kicker {
  color: #475569;
  letter-spacing: 0.08em;
}
#adminModal .weight-preset,
#adminModal .big-btn {
  background: #475569;
  color: #fff;
  border-color: #475569;
}
#adminModal .weight-preset:hover,
#adminModal .big-btn:hover {
  background: #334155;
  border-color: #334155;
}
#adminModal .danger-small {
  background: #fff !important;
  color: #991b1b !important;
  border-color: #fca5a5 !important;
}
.developer-edit-card {
  display: grid;
  gap: 12px;
  background: #fff;
}
.inline-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}
.inline-field {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: #475569;
  font-size: 12px;
  font-weight: 650;
}
.inline-field input,
.inline-field select {
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
}
.inline-field.compact {
  max-width: 180px;
}
.feature-permissions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: stretch;
  padding-top: 11px;
  border-top: 1px solid #e2e8f0;
}
.feature-permissions .toggle-card,
.license-inline-editor .toggle-card {
  padding: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
}
.feature-permissions button,
.license-inline-editor + .admin-inline-actions button,
.developer-edit-card details button {
  padding: 9px 11px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #334155;
  font-weight: 650;
}
.developer-edit-card details {
  padding: 10px 11px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #f8fafc;
}
.developer-edit-card summary {
  cursor: pointer;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}
.developer-edit-card details .inline-form-grid {
  margin-top: 10px;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr) auto;
}
.license-inline-editor {
  display: grid;
  grid-template-columns: 180px minmax(230px, 1fr) minmax(280px, 1.4fr);
  gap: 10px;
  align-items: end;
  padding: 11px 0;
  border-top: 1px solid #e2e8f0;
}
.inline-message {
  min-height: 19px;
  color: #166534;
  font-size: 13px;
  font-weight: 650;
}
.inline-message.error {
  color: #991b1b;
}
.child-inline-fields {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) 120px auto;
  gap: 9px;
  align-items: center;
}
.child-inline-fields input,
.child-inline-fields select {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
}
.child-delete-confirm {
  align-self: center;
  color: #64748b;
  font-size: 12px;
}
.child-delete-confirm input {
  vertical-align: middle;
}
.system-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.system-meter,
.system-status-grid > div {
  padding: 13px;
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  background: #fff;
}
.system-meter > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.system-meter small {
  display: block;
  margin-top: 7px;
  color: #64748b;
}
.meter-track {
  height: 8px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}
.meter-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #64748b;
}
.system-meter.warning .meter-track i {
  background: #d97706;
}
.system-meter.critical .meter-track i {
  background: #dc2626;
}
.system-status-grid > div b,
.system-status-grid > div span {
  display: block;
}
.system-status-grid > div b {
  font-size: 23px;
}
.system-status-grid > div span {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
}
.warning-message {
  color: #92400e;
  font-weight: 700;
}
.developer-question-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.developer-question-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 11px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.developer-question-card input {
  width: 19px;
  height: 19px;
  margin-top: 2px;
}
.developer-question-card b,
.developer-question-card span {
  display: block;
}
.developer-question-card span:last-child {
  margin-top: 5px;
  color: #475569;
  font-size: 13px;
}
.review-confirm {
  margin: 12px 0 !important;
}
.brand-icon {
  overflow: hidden;
  background: #fff;
}
.brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
}
.portal-title {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.portal-logo {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border: 1px solid #dbe2ea;
  border-radius: 10px;
  background: #fff;
  object-fit: contain;
}
.portal-title h2,
.portal-title p {
  margin: 0;
}
.portal-title p {
  margin-top: 4px;
}
.branding-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0;
}
.branding-asset {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  background: #f8fafc;
}
.branding-logo-preview {
  width: 180px;
  height: 72px;
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
}
.branding-favicon-preview {
  width: 56px;
  height: 56px;
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
  image-rendering: auto;
}
.device-policy-editor {
  display: grid;
  grid-template-columns: minmax(160px, 220px) auto auto minmax(220px, 1fr);
  gap: 9px;
  align-items: end;
  padding: 11px;
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  background: #f8fafc;
}
.device-policy-editor > span {
  align-self: center;
  color: #475569;
  font-size: 12px;
}
.device-policy-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 12px 0;
}
.device-policy-summary > div {
  padding: 11px;
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  background: #f8fafc;
}
.device-policy-summary span,
.device-policy-summary b {
  display: block;
}
.device-policy-summary span {
  color: #64748b;
  font-size: 12px;
}
.device-policy-summary b {
  margin-top: 3px;
  color: #0f172a;
}
.device-block-warning {
  grid-column: 1/-1 !important;
  border-color: #f59e0b !important;
  background: #fffbeb !important;
  color: #92400e;
  font-weight: 700;
}
.family-qr-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.qr-countdown {
  color: #475569;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.global-notice {
  display: grid;
  gap: 3px;
  margin: 10px 0;
  padding: 11px 14px;
  border: 1px solid #93c5fd;
  border-radius: 12px;
  background: #eff6ff;
  color: #1e3a8a;
}
.global-notice.update {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #065f46;
}
.global-notice.outage {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #991b1b;
}
.global-notice span {
  font-size: 14px;
}
.announcement-stack {
  display: grid;
  gap: 9px;
  margin: 0 0 14px;
}
.announcement-card {
  padding: 12px 14px;
  border: 1px solid #bfdbfe;
  border-left: 4px solid #3b82f6;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e3a8a;
}
.announcement-card.update {
  border-color: #a7f3d0;
  border-left-color: #10b981;
  background: #ecfdf5;
  color: #065f46;
}
.announcement-card.outage {
  border-color: #fca5a5;
  border-left-color: #dc2626;
  background: #fef2f2;
  color: #991b1b;
}
.announcement-card > div {
  display: flex;
  align-items: center;
  gap: 8px;
}
.announcement-card p {
  margin: 7px 0 0;
  color: inherit;
  font-size: 14px;
}
.announcement-kind {
  padding: 3px 7px;
  border-radius: 999px;
  background: #ffffffb8;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.announcement-options {
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1fr) auto;
}
.announcement-admin-list {
  display: grid;
  gap: 12px;
}
.announcement-admin-card {
  display: grid;
  gap: 11px;
  padding: 14px;
  border: 1px solid #dbe2ea;
  border-left: 4px solid #94a3b8;
  border-radius: 8px;
  background: #fff;
}
.announcement-admin-card.active {
  border-left-color: #16a34a;
}
.announcement-admin-card.inactive {
  opacity: 0.82;
}
.announcement-admin-card textarea {
  resize: vertical;
}
.admin-bug-entry.forwarded {
  border-color: #f59e0b;
  border-left: 4px solid #f59e0b;
  background: #fffbeb;
}
@media (max-width: 900px) {
  .inline-form-grid,
  .feature-permissions,
  .license-inline-editor,
  .system-status-grid {
    grid-template-columns: 1fr 1fr;
  }
  .developer-edit-card details .inline-form-grid {
    grid-template-columns: 1fr;
  }
  .child-inline-fields {
    grid-template-columns: 1fr 120px;
  }
  .child-inline-fields .mini {
    grid-column: 1/-1;
  }
}
@media (max-width: 900px) {
  .device-policy-editor,
  .announcement-options {
    grid-template-columns: 1fr 1fr;
  }
  .device-policy-editor > span {
    grid-column: 1/-1;
  }
  .branding-editor {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .inline-form-grid,
  .feature-permissions,
  .license-inline-editor,
  .system-status-grid,
  .child-inline-fields,
  .device-policy-editor,
  .device-policy-summary,
  .announcement-options {
    grid-template-columns: 1fr;
  }
  .inline-field.compact {
    max-width: none;
  }
  .portal-logo {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }
  .family-qr-list {
    grid-template-columns: 1fr;
  }
}

.security-event-list,
.update-list,
.backup-list {
  display: grid;
  gap: 10px;
}
.security-event,
.update-card,
.backup-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid #dce2ec;
  border-radius: 10px;
  background: #fff;
}
.security-event > div,
.update-card > div,
.backup-card > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.security-event span,
.update-card span,
.backup-card span {
  color: #59677b;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}
.security-event.warning {
  border-left: 5px solid #d89b18;
}
.security-event.critical {
  border-left: 5px solid #c43d45;
  background: #fff9f9;
}
.security-event.info {
  border-left: 5px solid #3d74c5;
}
.backup-card a {
  display: inline-flex;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid #c9d3e2;
  border-radius: 8px;
  color: #25344a;
  text-decoration: none;
  font-weight: 700;
  background: #f8fafc;
}
#adminCaddyPreview {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.86rem;
  background: #111827;
  color: #d8e3f5;
  line-height: 1.5;
}
@media (max-width: 760px) {
  .security-event,
  .update-card,
  .backup-card {
    align-items: stretch;
    flex-direction: column;
  }
  .security-event button,
  .update-card button,
  .backup-card button {
    width: 100%;
  }
}

/* Anpassbare Entwicklerverwaltung */
#adminModal {
  --admin-accent: #2563eb;
  --admin-surface: #f3f5f8;
  --admin-scale: 1;
  --admin-panel: #fff;
  --admin-nav: #172033;
  --admin-text: #1e293b;
}
#adminModal .admin-box {
  background: var(--admin-surface);
  color: var(--admin-text);
  font-size: calc(14px * var(--admin-scale));
}
#adminModal .admin-tabs {
  background: var(--admin-nav);
}
#adminModal .admin-tab.on,
#adminModal .weight-preset,
#adminModal .big-btn,
#adminModal .feature-permissions button {
  background: var(--admin-accent);
  border-color: var(--admin-accent);
}
#adminModal[data-admin-theme="blue"] {
  --admin-nav: #102a56;
  --admin-panel: #fff;
}
#adminModal[data-admin-theme="forest"] {
  --admin-nav: #15382f;
  --admin-panel: #fcfffd;
}
#adminModal[data-admin-theme="graphite"] {
  --admin-nav: #111827;
  --admin-panel: #f9fafb;
  --admin-text: #111827;
}
#adminModal[data-admin-theme="sand"] {
  --admin-nav: #40362b;
  --admin-panel: #fffdf8;
  --admin-text: #332b23;
}
#adminModal .admin-section,
#adminModal .dashboard-widget {
  background: var(--admin-panel);
}
#adminModal .admin-content {
  padding: calc(18px * var(--admin-scale)) calc(20px * var(--admin-scale)) 8px;
}
#adminModal.admin-density-comfortable .admin-section,
#adminModal.admin-density-comfortable .dashboard-widget {
  padding: calc(20px * var(--admin-scale));
}
#adminModal.admin-density-compact .admin-section {
  padding: calc(13px * var(--admin-scale));
}
#adminModal .big-btn {
  width: auto;
  min-height: 38px;
  padding: 8px 13px;
  border-radius: 7px;
  font-size: 13px;
}
#adminModal .admin-inline-actions button,
#adminModal .admin-inline-actions a {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 12px;
}
.small-admin-button {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
  color: #334155;
  font-weight: 700;
}
.admin-global-toolbar {
  position: sticky;
  z-index: 4;
  top: -22px;
  display: grid;
  gap: 5px;
  margin: -6px 0 14px;
  padding: 10px 12px;
  border: 1px solid #d7dee9;
  border-radius: 10px;
  background: color-mix(in srgb, var(--admin-surface) 92%, #fff 8%);
  box-shadow: 0 5px 15px #17203310;
}
.admin-global-toolbar > label {
  font-size: 12px;
  font-weight: 800;
}
.admin-global-toolbar > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.admin-global-toolbar input,
.admin-list-search {
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid #bfc9d8;
  border-radius: 7px;
  background: #fff;
}
.admin-global-toolbar button {
  padding: 7px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
  font-weight: 700;
}
.admin-global-toolbar small {
  color: #64748b;
}
.admin-global-results {
  display: grid;
  gap: 7px;
  margin: -5px 0 14px;
  padding: 10px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
}
.admin-search-result {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 10px;
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #fff;
  text-align: left;
}
.admin-search-result > span {
  grid-row: 1/3;
  padding: 3px 7px;
  border-radius: 999px;
  background: #e8eef8;
  color: #334155;
  font-size: 10px;
  font-weight: 800;
}
.admin-search-result > b {
  font-size: 13px;
}
.admin-search-result > small {
  color: #64748b;
}
.admin-list-search {
  width: min(330px, 100%);
}
.dashboard-customizer {
  margin-bottom: 14px;
}
.dashboard-customizer > summary {
  cursor: pointer;
  font-weight: 800;
}
.dashboard-customizer h4 {
  margin: 14px 0 7px;
}
.admin-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}
.dashboard-widget {
  min-width: 0;
  padding: 15px;
  border: 1px solid #d8e0eb;
  border-radius: 11px;
  box-shadow: 0 3px 10px #1e293b0a;
}
.dashboard-widget-wide {
  grid-column: 1/-1;
}
.dashboard-widget-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}
.dashboard-widget-head h3 {
  margin: 0 0 3px;
}
.dashboard-widget-head p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
}
.dashboard-widget .admin-overview {
  margin: 0;
}
.dashboard-compact-list {
  display: grid;
  gap: 7px;
}
.dashboard-compact-entry {
  padding: 8px 10px;
  border-left: 4px solid #f59e0b;
  border-radius: 7px;
  background: #fff8e8;
}
.dashboard-compact-entry b,
.dashboard-compact-entry span {
  display: block;
}
.dashboard-compact-entry b {
  font-size: 12px;
}
.dashboard-compact-entry span {
  margin-top: 3px;
  color: #64748b;
  font-size: 11px;
}
.dashboard-empty {
  padding: 12px;
  border-radius: 8px;
  background: #f0fdf4;
  color: #166534;
  font-weight: 750;
}
.dashboard-status-card {
  display: grid;
  gap: 7px;
  padding: 12px;
  border-radius: 9px;
  background: #f8fafc;
}
.dashboard-status-card b,
.dashboard-status-card span {
  display: block;
}
.dashboard-status-card span {
  color: #64748b;
  font-size: 12px;
}
.dashboard-copy-row,
.dashboard-restart-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.dashboard-copy-row input,
.dashboard-restart-row input {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
  font:
    600 12px ui-monospace,
    monospace;
}
.dashboard-copy-row button,
.dashboard-restart-row button {
  padding: 8px 11px;
  border-radius: 7px;
  background: var(--admin-accent);
  color: #fff;
  font-weight: 750;
}
.dashboard-widget-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.dashboard-widget-option {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 7px;
  padding: 8px 9px;
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  background: #f8fafc;
}
.dashboard-widget-option button {
  width: 29px;
  height: 29px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
}
.dashboard-widget-option button:disabled {
  opacity: 0.35;
}
#adminModal[data-system-view="gauges"] .system-status-grid {
  grid-template-columns: repeat(3, minmax(120px, 1fr));
}
#adminModal[data-system-view="gauges"] .system-meter {
  display: grid;
  justify-items: center;
  text-align: center;
}
#adminModal[data-system-view="gauges"] .system-meter .meter-track {
  position: relative;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: conic-gradient(var(--meter-color, var(--admin-accent)) calc(var(--meter-value, 0) * 1%), #e2e8f0 0);
}
#adminModal[data-system-view="gauges"] .system-meter .meter-track i {
  position: absolute;
  inset: 10px;
  width: auto;
  border-radius: 50%;
  background: #fff;
}
#adminModal[data-system-view="numbers"] .system-meter .meter-track {
  display: none;
}
#adminModal[data-system-view="numbers"] .system-status-grid {
  grid-template-columns: repeat(6, minmax(100px, 1fr));
}
.license-expiry-editor {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto;
  gap: 7px;
  align-items: end;
  margin-top: 9px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}
.license-expiry-editor input {
  width: 100%;
  padding: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
}
.license-expiry-editor button {
  min-height: 35px;
  padding: 7px 10px;
  border-radius: 6px;
  background: #334155;
  color: #fff;
  font-weight: 700;
}
.child-card.quick-select {
  cursor: pointer;
}
.child-card.quick-select:hover,
.child-card.quick-select:focus-visible {
  border-color: #3b82f6;
  background: #f8fbff;
  outline: 3px solid #bfdbfe;
  outline-offset: 2px;
}
.child-card.quick-select input,
.child-card.quick-select select,
.child-card.quick-select button,
.child-card.quick-select label {
  cursor: auto;
}
@media (max-width: 820px) {
  .admin-global-toolbar {
    top: 58px;
  }
  .admin-dashboard-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-widget-wide {
    grid-column: auto;
  }
  .dashboard-widget-editor {
    grid-template-columns: 1fr;
  }
  #adminModal[data-system-view="numbers"] .system-status-grid,
  #adminModal[data-system-view="gauges"] .system-status-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 520px) {
  .dashboard-copy-row,
  .dashboard-restart-row,
  .license-expiry-editor {
    grid-template-columns: 1fr;
  }
  .admin-global-toolbar > div {
    grid-template-columns: 1fr;
  }
  .admin-list-search {
    margin-top: 8px;
    width: 100%;
  }
}

/* Spielabenteuer und interaktive Minispiele */
.play-mode-box {
  width: min(780px, 100%);
}
.play-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0 12px;
}
.play-mode-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 13px;
  align-items: center;
  min-height: 126px;
  padding: 20px;
  border: 3px solid #d8eaf7;
  border-radius: 24px;
  background: #fbfdfe;
  text-align: left;
  box-shadow: 0 7px 0 #d1e8f9;
  transition:
    transform 0.15s,
    box-shadow 0.15s,
    border-color 0.15s;
}
.play-mode-card.adventure {
  border-color: #4494d1;
  background: linear-gradient(145deg, #f1f8fd, #fff9df);
  box-shadow: 0 7px 0 #3572a1;
}
.play-mode-card:active {
  transform: translateY(5px);
  box-shadow: 0 2px 0 #d1e8f9;
}
.play-mode-card.adventure:active {
  box-shadow: 0 2px 0 #3572a1;
}
.play-mode-card b,
.play-mode-card small {
  display: block;
}
.play-mode-card b {
  font-size: 22px;
}
.play-mode-card small {
  margin-top: 6px;
  color: #5d6679;
  font-size: 14px;
  line-height: 1.35;
}
.play-mode-card em {
  position: absolute;
  right: 12px;
  top: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #4494d1;
  color: #fff;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}
.play-mode-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: #fff;
  font-size: 34px;
  box-shadow: 0 5px 14px #3f67861f;
}
.play-mode-interests {
  margin: 4px 0 0 !important;
  color: #625b78;
  font-size: 14px !important;
  font-weight: 800;
}
.adventure-progress {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr);
  gap: 18px;
  align-items: center;
  margin: 18px auto 7px;
  padding: 12px 16px;
  border: 2px solid #daecfa;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 6px 18px #3f678617;
}
.adventure-progress-copy b,
.adventure-progress-copy span {
  display: block;
}
.adventure-progress-copy b {
  color: #32709f;
  font-size: 15px;
}
.adventure-progress-copy span {
  margin-top: 2px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
}
.adventure-steps {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 6px;
}
.adventure-step {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: #e1edf7;
  overflow: hidden;
}
.adventure-step.done {
  background: #34bd7a;
}
.adventure-step.current {
  background: #ffd15c;
  box-shadow: 0 0 0 3px #fff1b0;
}
.sort-workshop {
  display: grid;
  gap: 15px;
  width: min(780px, 100%);
  margin: auto;
}
.sort-tray {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  min-height: 92px;
  padding: 14px;
  border: 3px dashed #d0e2ef;
  border-radius: 22px;
  background: #f9fcfe;
}
.sort-piece {
  display: grid;
  place-items: center;
  width: 72px;
  height: 66px;
  border: 3px solid #deeefa;
  border-radius: 18px;
  background: #fff;
  font-size: 38px;
  box-shadow: 0 5px 0 #d1e8f9;
  cursor: grab;
}
.sort-piece.selected {
  border-color: #ffb52e;
  background: #fff8d8;
  transform: translateY(-3px);
}
.sort-piece.placed {
  width: 55px;
  height: 49px;
  border: 0;
  box-shadow: none;
  background: #ffffffb8;
  font-size: 29px;
  cursor: default;
}
.sort-piece.wrong {
  animation: shake 0.3s;
  background: #ffe3e5;
  border-color: #ef7880;
}
.sort-bins {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.sort-bin {
  min-height: 140px;
  padding: 12px;
  border: 4px solid #8ec8ee;
  border-radius: 24px;
  background: #edf8ff;
}
.sort-bin:nth-child(2) {
  border-color: #ffbf69;
  background: #fff6e7;
}
.sort-bin.hover,
.sort-bin:focus-visible {
  box-shadow: 0 0 0 6px #4494d12b;
}
.sort-bin-title {
  display: block;
  margin-bottom: 9px;
  font-size: 18px;
  font-weight: 900;
}
.sort-bin-items {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex-wrap: wrap;
  min-height: 62px;
}
.number-trail {
  display: grid;
  grid-template-columns: repeat(var(--trail-columns), minmax(58px, 86px));
  gap: 10px;
  justify-content: center;
  width: min(600px, 100%);
  margin: auto;
}
.trail-number {
  aspect-ratio: 1;
  border: 3px solid #daebf8;
  border-radius: 50%;
  background: #fff;
  color: #326993;
  font-size: clamp(25px, 5vw, 38px);
  font-weight: 900;
  box-shadow: 0 6px 0 #cbe2f4;
  transition: transform 0.15s;
}
.trail-number.next {
  border-color: #ffbd35;
  background: #fff8d6;
  animation: pulseTrail 1.1s infinite;
}
.trail-number.done {
  border-color: #2eb875;
  background: #dff8eb;
  color: #14724a;
  box-shadow: none;
  transform: scale(0.86);
}
.trail-number.wrong {
  animation: shake 0.3s;
  background: #ffe3e5;
}
.trail-goal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 0 auto 15px;
  padding: 9px 14px;
  border-radius: 999px;
  background: #eff7fd;
  color: #32709f;
  font-size: 17px;
  font-weight: 900;
}
.trail-goal strong {
  font-size: 26px;
}
.maze-shell {
  display: grid;
  grid-template-columns: minmax(250px, 430px) auto;
  gap: 20px;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.maze-board {
  display: grid;
  grid-template-columns: repeat(var(--maze-size), 1fr);
  gap: 4px;
  width: min(430px, 78vw);
  aspect-ratio: 1;
  padding: 8px;
  border-radius: 24px;
  background: #304b72;
  box-shadow: 0 10px 26px #1f33562e;
}
.maze-cell {
  display: grid;
  place-items: center;
  min-width: 0;
  border-radius: 8px;
  background: #e9f6ff;
  font-size: clamp(16px, 4vw, 29px);
}
.maze-cell.wall {
  background: #6d87a8;
}
.maze-cell.visited {
  background: #c9f1df;
}
.maze-cell.player {
  background: #ffd86b;
  box-shadow: inset 0 0 0 4px #fff;
}
.maze-cell.goal {
  background: #eaf4fc;
}
.maze-controls {
  display: grid;
  grid-template-columns: repeat(3, 64px);
  grid-template-rows: repeat(3, 64px);
  gap: 7px;
}
.maze-control {
  border-radius: 18px;
  background: #fff;
  color: #32709f;
  font-size: 30px;
  font-weight: 900;
  box-shadow: 0 5px 0 #cbe2f4;
}
.maze-control:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #cbe2f4;
}
.maze-up {
  grid-column: 2;
}
.maze-left {
  grid-column: 1;
  grid-row: 2;
}
.maze-right {
  grid-column: 3;
  grid-row: 2;
}
.maze-down {
  grid-column: 2;
  grid-row: 3;
}
.maze-legend {
  grid-column: 1/-1;
  color: #5d6679;
  font-size: 13px;
  font-weight: 800;
}
.pattern-workshop {
  display: grid;
  gap: 18px;
  width: min(720px, 100%);
  margin: auto;
}
.pattern-target,
.pattern-slots,
.pattern-palette {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.pattern-target {
  padding: 12px;
  border-radius: 20px;
  background: #eff7fd;
}
.pattern-token,
.pattern-slot,
.pattern-choice {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  font-size: 35px;
}
.pattern-token {
  background: #fff;
  box-shadow: 0 4px 12px #3f678620;
}
.pattern-slot {
  border: 3px dashed #c1d7e8;
  background: #fff;
}
.pattern-slot.filled {
  border-style: solid;
  border-color: #78b8e8;
  background: #f7fbfe;
}
.pattern-slot.wrong {
  animation: shake 0.3s;
  border-color: #ef7880;
  background: #ffe3e5;
}
.pattern-choice {
  border: 3px solid #daebf8;
  background: #fff;
  box-shadow: 0 5px 0 #cbe2f4;
}
.pattern-tools {
  display: flex;
  gap: 9px;
  justify-content: center;
  flex-wrap: wrap;
}
.pattern-tools button {
  padding: 11px 15px;
  border-radius: 14px;
  background: #ecf6fd;
  color: #32709f;
  font-weight: 900;
}
.pattern-tools .pattern-check {
  background: #15945d;
  color: #fff;
}
.target-hunt {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
  gap: 12px;
  width: min(720px, 100%);
  margin: auto;
}
.target-hunt button {
  min-height: 78px;
  border: 3px solid #daecfa;
  border-radius: 22px;
  background: #fff;
  font-size: 38px;
  box-shadow: 0 5px 0 #c5dff3;
  transform: rotate(var(--tilt));
}
.target-hunt button.found {
  background: #dff8eb;
  border-color: #32b878;
  box-shadow: none;
  transform: scale(0.82);
}
.target-hunt button.wrong {
  animation: shake 0.3s;
  background: #ffe3e5;
}
.word-builder,
.rhythm-shell,
.order-story,
.balance-game {
  display: grid;
  gap: 16px;
  width: min(720px, 100%);
  margin: auto;
}
.word-slots,
.letter-tray,
.balance-tools {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.word-slots span {
  display: grid;
  place-items: center;
  width: 58px;
  height: 66px;
  border-bottom: 5px solid #3886c1;
  font-size: 34px;
  font-weight: 900;
}
.letter-tray button {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  background: #fff;
  color: #2d628b;
  font-size: 30px;
  font-weight: 900;
  box-shadow: 0 5px 0 #cbe2f4;
}
.word-builder > button,
.order-story > button {
  justify-self: center;
  padding: 10px 15px;
  border-radius: 12px;
  background: #ecf6fd;
  color: #32709f;
  font-weight: 800;
}
.rhythm-pads {
  display: grid;
  grid-template-columns: repeat(2, minmax(100px, 180px));
  gap: 14px;
  justify-content: center;
}
.rhythm-pads button {
  aspect-ratio: 1;
  border: 8px solid #ffffffaa;
  border-radius: 32px;
  box-shadow: 0 8px 0 #b1c7d8;
  opacity: 0.72;
}
.rhythm-pads button.lit {
  opacity: 1;
  transform: scale(1.08);
  box-shadow: 0 0 28px currentColor;
}
.rhythm-shell > button {
  justify-self: center;
  padding: 13px 20px;
  border-radius: 15px;
  background: #3886c1;
  color: #fff;
  font-weight: 900;
}
.rhythm-status {
  text-align: center;
  color: #32709f;
  font-weight: 900;
}
.tone-pair-shell {
  display: grid;
  gap: 16px;
  width: min(720px, 100%);
  margin: auto;
}
.tone-pairs {
  display: grid;
  grid-template-columns: repeat(var(--tone-columns, 4), minmax(54px, 100px));
  gap: clamp(7px, 1.4vw, 13px);
  justify-content: center;
}
.tone-card {
  display: grid;
  place-items: center;
  min-width: 0;
  width: 100%;
  aspect-ratio: 1;
  border: 5px solid #deeefb;
  border-radius: 21px;
  background: #408bc5;
  color: #fff;
  font-size: clamp(27px, 5vw, 43px);
  font-weight: 900;
  box-shadow: 0 6px 0 #336c98;
  transition:
    transform 0.12s,
    background 0.12s;
}
.tone-card.open {
  background: #fff;
  color: #336c98;
  box-shadow: none;
}
.tone-card.playing {
  transform: scale(1.08);
  border-color: #f1bd3f;
  box-shadow: 0 0 25px #f1bd3f88;
}
.tone-card.done {
  background: #dff8eb;
  color: #18724d;
  border-color: #72cca3;
  box-shadow: none;
}
.order-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 62px;
  padding: 10px;
  border-radius: 18px;
  background: #eff7fd;
  flex-wrap: wrap;
}
.order-line span {
  padding: 8px 10px;
  border-radius: 12px;
  background: #fff;
  font-weight: 800;
}
.order-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}
.order-choices button {
  display: grid;
  gap: 5px;
  place-items: center;
  min-height: 105px;
  border: 3px solid #d8eaf7;
  border-radius: 20px;
  background: #fff;
}
.order-choices button span {
  font-size: 36px;
}
.order-choices button b {
  font-size: 14px;
}
.order-choices button:disabled {
  opacity: 0.25;
}
.order-choices button.wrong {
  animation: shake 0.3s;
  background: #ffe3e5;
}
.balance-scale {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 54px;
  align-items: end;
  min-height: 190px;
  padding: 20px 40px 48px;
}
.balance-scale:before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: 10px;
  height: 118px;
  border-radius: 8px;
  background: #5f6778;
  transform: translateX(-50%);
}
.balance-scale:after {
  content: "";
  position: absolute;
  left: 16%;
  right: 16%;
  bottom: 105px;
  height: 9px;
  border-radius: 8px;
  background: #5f6778;
  transform: rotate(calc(var(--balance) * 1deg));
  transition: transform 0.25s;
}
.balance-pan {
  position: relative;
  z-index: 1;
  display: flex;
  align-content: flex-end;
  justify-content: center;
  flex-wrap: wrap;
  min-height: 90px;
  padding: 15px;
  border: 4px solid #78b8e8;
  border-radius: 16px 16px 32px 32px;
  background: #fff;
  font-size: 25px;
}
.balance-tools button {
  padding: 12px 16px;
  border-radius: 14px;
  background: #ecf6fd;
  color: #32709f;
  font-weight: 900;
}
.balance-tools button:last-child {
  background: #15945d;
  color: #fff;
}
.habitat-match {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  width: min(720px, 100%);
  margin: auto;
}
.habitat-column {
  display: grid;
  gap: 10px;
}
.habitat-column button {
  min-height: 67px;
  padding: 10px;
  border: 3px solid #d8eaf7;
  border-radius: 17px;
  background: #fff;
  font-size: 18px;
  font-weight: 900;
}
.habitat-column button.selected {
  border-color: #ffb52e;
  background: #fff8d8;
}
.habitat-column button.matched {
  border-color: #32b878;
  background: #dff8eb;
  opacity: 0.55;
}
.habitat-column button.wrong {
  animation: shake 0.3s;
  background: #ffe3e5;
}
.catch-arena {
  position: relative;
  width: min(720px, 94vw);
  height: 360px;
  overflow: hidden;
  border: 4px solid #c9ddf8;
  border-radius: 28px;
  background: linear-gradient(#bfe5ff, #edf8ff 65%, #d9f6df 66%);
}
.catch-arena button {
  position: absolute;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 50%;
  background: #ffffffd9;
  font-size: 35px;
  box-shadow: 0 5px 16px #30558135;
  animation: floatCatch 2.2s ease-in-out;
}
.catch-arena button:active {
  transform: scale(0.8);
}
.robot-game,
.energy-game,
.shape-builder,
.recycle-game,
.shopping-game,
.routine-clock {
  display: grid;
  gap: 14px;
  width: min(760px, 100%);
  margin: auto;
}
.robot-board {
  display: grid;
  grid-template-columns: repeat(var(--robot-size), minmax(56px, 82px));
  justify-content: center;
  gap: 7px;
}
.robot-board span {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 2px solid #d2e4f1;
  border-radius: 14px;
  background: #f8fbfe;
  font-size: 34px;
}
.robot-program {
  min-height: 48px;
  padding: 10px;
  border-radius: 12px;
  background: #eef2ff;
  color: #355267;
  font-size: 25px;
  font-weight: 800;
}
.robot-tools,
.shape-builder > div:last-child,
.shopping-game > div:last-child,
.routine-clock > div:last-child {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
}
.robot-tools button,
.energy-game > button,
.shape-builder button,
.shopping-game button,
.routine-clock button {
  min-height: 52px;
  padding: 10px 15px;
  border-radius: 13px;
  background: #408eca;
  color: #fff;
  font-weight: 850;
}
.energy-line {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 18px;
  border-radius: 18px;
  background: #172036;
}
.energy-line button {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #334155;
  color: #94a3b8;
  font-size: 40px;
  transition: transform 0.18s;
}
.energy-line.powered {
  box-shadow: 0 0 28px #facc15;
}
.energy-line.powered button {
  color: #fde047;
  background: #713f12;
}
.shape-recipe,
.shape-work,
.shopping-basket,
.routine-clock-face {
  min-height: 68px;
  padding: 14px;
  border: 2px dashed #c1d9ec;
  border-radius: 16px;
  background: #fafcfe;
  font-size: 31px;
  font-weight: 900;
}
.shape-work {
  min-height: 90px;
}
.recycle-status {
  justify-self: center;
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 13px;
  background: #eff7fd;
  color: #32709f;
  font-weight: 900;
}
.recycle-items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 11px;
  border: 3px dashed #d0e2ef;
  border-radius: 17px;
  background: #f9fcfe;
}
.recycle-item {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 9px;
  min-height: 72px;
  padding: 8px 12px;
  border: 3px solid #ddecf8;
  border-radius: 15px;
  background: #fff;
  text-align: left;
  box-shadow: 0 4px 0 #d1e8f9;
}
.recycle-item span {
  font-size: 31px;
}
.recycle-item strong {
  font-size: 15px;
}
.recycle-item.selected {
  border-color: #ffad25;
  background: #fff8d8;
  box-shadow: 0 0 0 4px #ffdd8a;
  transform: translateY(-2px);
}
.recycle-bins {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.recycle-bin {
  --bin: #3b82f6;
  --bin-bg: #eff6ff;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  justify-items: center;
  gap: 5px;
  min-height: 174px;
  padding: 13px 9px;
  border: 4px solid var(--bin);
  border-radius: 18px;
  background: var(--bin-bg);
  font-weight: 900;
}
.recycle-bin-paper {
  --bin: #2f80ed;
  --bin-bg: #eaf5ff;
}
.recycle-bin-bio {
  --bin: #81512f;
  --bin-bg: #f7eee6;
}
.recycle-bin-packaging {
  --bin: #e7ad12;
  --bin-bg: #fff8d7;
}
.recycle-bin-symbol {
  position: relative;
  display: block;
  width: 54px;
  height: 55px;
  margin-top: 9px;
  border-radius: 5px 5px 12px 12px;
  background: var(--bin);
  box-shadow: inset 0 -8px #00000012;
}
.recycle-bin-symbol::before {
  content: "";
  position: absolute;
  left: -5px;
  top: -10px;
  width: 64px;
  height: 9px;
  border-radius: 5px;
  background: var(--bin);
}
.recycle-bin-symbol::after {
  content: "";
  position: absolute;
  left: 19px;
  top: -17px;
  width: 16px;
  height: 8px;
  border: 4px solid var(--bin);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}
.recycle-bin strong {
  font-size: 18px;
}
.recycle-bin small {
  color: #5d6679;
  font-size: 12px;
}
.recycle-bin-items {
  display: flex;
  align-content: flex-start;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
  width: 100%;
  margin-top: 3px;
}
.recycle-sorted-item {
  padding: 4px 6px;
  border-radius: 8px;
  background: #fff;
  color: #344054;
  font-size: 11px;
}
.recycle-bin.wrong {
  animation: shake 0.3s;
  border-color: #e65b64;
  background: #ffe3e5;
}
.routine-clock-face {
  font-size: 48px;
  color: #25324a;
}
.restart-zone {
  border-color: #fecaca;
  background: #fffafa;
}
.restart-action {
  display: flex;
  align-items: end;
}
.restart-action button {
  width: 100%;
}
.word-learning-controls,
.pair-learning-controls {
  display: flex;
  justify-content: center;
  gap: 9px;
  flex-wrap: wrap;
}
.word-learning-controls button,
.pair-learning-controls button {
  min-height: 48px;
  padding: 10px 15px;
  border-radius: 14px;
  background: #ecf6fd;
  color: #32709f;
  font-weight: 900;
}
.word-learning-controls button:first-child,
.pair-learning-controls button:first-child {
  background: #3886c1;
  color: #fff;
}
.word-translation {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 13px;
  background: #fff8d8;
  color: #634b10;
  text-align: center;
  font-size: 18px;
  font-weight: 900;
}
.pair-learning-shell {
  display: grid;
  gap: 14px;
  width: min(760px, 100%);
  margin: auto;
}
.pair-learning-controls button:disabled {
  opacity: 0.45;
}
.pair-learning-shell .memory button.memory-word {
  overflow-wrap: normal;
  word-break: normal;
}
.bilingual-learning-panel {
  display: grid;
  gap: 9px;
  flex: 1 0 100%;
  width: min(720px, 100%);
  margin: 2px auto 0;
  padding: 12px;
  border: 2px solid #d2e6f5;
  border-radius: 18px;
  background: linear-gradient(135deg, #f3f9fe, #fffaf0);
}
.bilingual-current {
  min-height: 38px;
  display: grid;
  place-items: center;
  padding: 7px 12px;
  border-radius: 12px;
  background: #fff;
  color: #2d3b58;
  font-size: clamp(17px, 3vw, 23px);
  font-weight: 950;
  letter-spacing: 0.015em;
  text-align: center;
}
.bilingual-audio-buttons {
  display: flex;
  justify-content: center;
  gap: 9px;
  flex-wrap: wrap;
}
.bilingual-audio-buttons button {
  min-height: 47px;
  padding: 9px 14px;
  border-radius: 13px;
  background: #3886c1;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}
.bilingual-audio-buttons button:last-child {
  background: #fff;
  color: #35435f;
  border: 2px solid #cbd5e1;
}
.bilingual-audio-buttons button:disabled {
  opacity: 0.45;
}
.bilingual-choice {
  overflow: visible !important;
}
.bilingual-choice .answer-content {
  position: relative;
}
.bilingual-choice-label {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: -6px;
  min-width: max-content;
  max-width: calc(100% + 20px);
  padding: 6px 9px;
  border-radius: 999px;
  background: #18243a;
  color: #fff;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0;
  box-shadow: 0 5px 14px #17203340;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition:
    0.16s opacity,
    0.16s transform;
  pointer-events: none;
}
.bilingual-choice.bilingual-active .bilingual-choice-label,
.bilingual-choice:hover .bilingual-choice-label,
.bilingual-choice:focus-visible .bilingual-choice-label {
  opacity: 1;
  transform: translate(-50%, 0);
}
.answer.bilingual-color {
  background: var(--choice-color);
  border-color: #ffffff;
  box-shadow: 0 7px 0 color-mix(in srgb, var(--choice-color) 70%, #111 30%);
}
.answer.bilingual-color .answer-content {
  width: 100%;
  height: 100%;
}
.memory button {
  position: relative;
}
.memory-bilingual-caption {
  position: absolute;
  z-index: 2;
  left: 5px;
  right: 5px;
  bottom: 5px;
  padding: 5px 4px;
  border-radius: 9px;
  background: #18243ae8;
  color: #fff;
  font-size: clamp(10px, 1.7vw, 14px);
  line-height: 1.05;
  opacity: 0;
  transform: translateY(5px);
  transition:
    0.16s opacity,
    0.16s transform;
}
.memory button.bilingual-active .memory-bilingual-caption,
.memory button:focus-visible .memory-bilingual-caption {
  opacity: 1;
  transform: none;
}
.pointer-draggable {
  touch-action: none;
  cursor: grab;
  user-select: none;
}
.pointer-draggable:active,
.pointer-draggable.dragging {
  cursor: grabbing;
}
.pointer-draggable.dragging {
  opacity: 0.28;
}
.pointer-drag-ghost {
  position: fixed !important;
  z-index: 100000 !important;
  left: 0;
  top: 0;
  width: 150px !important;
  max-width: 38vw !important;
  transform: translate(-50%, -50%) rotate(2deg) scale(1.04) !important;
  pointer-events: none !important;
  opacity: 0.94 !important;
  box-shadow: 0 18px 38px #1720334d !important;
}
.drag-over {
  transform: translateY(-4px) scale(1.025);
  box-shadow:
    0 0 0 6px #4494d12d,
    0 14px 28px #29365b26 !important;
}
.sort-bin,
.recycle-bin {
  transition:
    0.18s transform,
    0.18s box-shadow,
    0.18s border-color;
}
.sort-piece {
  grid-template-columns: auto 1fr !important;
  gap: 8px !important;
  width: auto !important;
  min-width: 112px !important;
  height: auto !important;
  min-height: 70px !important;
  padding: 9px 12px !important;
  text-align: left;
}
.sort-piece > span {
  font-size: 34px;
}
.sort-piece > strong {
  font-size: 14px;
}
.sort-bin {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto 1fr;
  align-items: center;
  min-height: 155px;
  padding: 14px;
  border-width: 3px;
  background: linear-gradient(145deg, #fff, #f5f8ff);
  overflow: hidden;
}
.sort-bin-right {
  background: linear-gradient(145deg, #fff, #fff8eb);
}
.sort-bin-symbol {
  grid-row: 1/3;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin-right: 10px;
  border-radius: 18px;
  background: #eef2ff;
  font-size: 34px;
}
.sort-bin-title {
  margin: 0;
  font-size: 20px;
}
.sort-bin-help {
  color: #667085;
  font-size: 12px;
}
.sort-bin-items {
  grid-column: 1/-1;
}
.sort-piece.placed {
  display: grid !important;
  grid-template-columns: auto 1fr !important;
  min-width: 94px !important;
  min-height: 42px !important;
  padding: 5px 8px !important;
  border: 1px solid #dbe2ea !important;
  border-radius: 11px !important;
}
.sort-piece.placed > span {
  font-size: 23px;
}
.sort-piece.placed > small {
  font-size: 11px;
}
.sort-bin.accepted,
.recycle-bin.accepted {
  animation: binCelebrate 0.6s ease;
}
.wrong-drop {
  animation: shake 0.35s;
  background: #ffe8ea !important;
}
.drag-return {
  animation: dragReturn 0.48s ease;
}
.sort-drop-in {
  animation: sortDrop 0.42s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.recycle-game-modern {
  padding: 2px;
}
.recycle-game-modern .recycle-status {
  display: grid;
  gap: 8px;
  justify-self: stretch;
  padding: 11px 14px;
  background: linear-gradient(90deg, #eff7fd, #f7fbff);
  text-align: left;
}
.recycle-progress {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #d8e7f2;
}
.recycle-progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #408eca, #2eb875);
  transition: 0.35s width;
}
.recycle-game-modern .recycle-items {
  gap: 11px;
  padding: 14px;
  border-radius: 23px;
  background: linear-gradient(135deg, #fafcfe, #f5fbff);
}
.recycle-game-modern .recycle-item {
  position: relative;
  grid-template-columns: auto 1fr auto;
  min-height: 74px;
  border-radius: 18px;
  transition:
    0.18s transform,
    0.18s box-shadow,
    0.18s opacity;
}
.recycle-game-modern .recycle-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 0 #d1e8f9;
}
.recycle-grip {
  padding: 4px 7px;
  border-radius: 999px;
  background: #eff7fd;
  color: #428ac0;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.recycle-game-modern .recycle-bin {
  position: relative;
  overflow: visible;
  min-height: 205px;
  padding-top: 16px;
  border-radius: 24px;
  box-shadow: 0 9px 20px #25324a18;
}
.recycle-game-modern .recycle-bin > em {
  padding: 4px 8px;
  border-radius: 999px;
  background: #ffffffc9;
  color: #59677b;
  font-size: 10px;
  font-style: normal;
}
.recycle-game-modern .recycle-bin-symbol {
  transition: 0.2s transform;
}
.recycle-game-modern .recycle-bin.drag-over .recycle-bin-symbol,
.recycle-game-modern .recycle-bin.accepted .recycle-bin-symbol {
  transform: translateY(3px) scale(1.07);
}
.recycle-game-modern .recycle-bin-lid {
  position: absolute;
  left: -5px;
  top: -10px;
  width: 64px;
  height: 9px;
  border-radius: 5px;
  background: var(--bin);
  transform-origin: left center;
  transition: 0.18s transform;
}
.recycle-game-modern .recycle-bin.drag-over .recycle-bin-lid {
  transform: rotate(-18deg) translateY(-4px);
}
.recycle-game-modern .recycle-bin-symbol:before {
  display: none;
}
.recycle-sorted-item {
  display: inline-grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 4px;
}
.recycle-sorted-item > span {
  font-size: 17px;
}
.recycle-sorted-item > small {
  font-size: 10px;
}
.recycle-game-modern.complete .recycle-bins {
  animation: completeGlow 0.9s ease 2;
}
.build-status {
  justify-self: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: #ecf6fd;
  color: #32709f;
  font-size: 15px;
  font-weight: 900;
}
.build-board {
  position: relative;
  width: min(560px, 100%);
  height: 320px;
  margin: auto;
  overflow: hidden;
  border: 4px solid #c6ddef;
  border-radius: 26px;
  background: linear-gradient(#e8f6ff 0 68%, #d9edc4 68% 73%, #d8b384 73%);
  box-shadow:
    inset 0 -10px #0000000b,
    0 8px 22px #3f678620;
}
.build-board:before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 27%;
  background: repeating-linear-gradient(90deg, #ffffff10 0 34px, #00000009 35px 37px);
}
.shape-builder .build-slot {
  position: absolute;
  z-index: 2;
  left: calc(var(--slot-x) * 1%);
  top: calc(var(--slot-y) * 1%);
  display: grid;
  place-items: center;
  width: 90px;
  height: 90px;
  min-height: 0;
  padding: 0;
  border: 3px dashed #638fb088;
  border-radius: 20px;
  background: #ffffff62;
  color: inherit;
  transform: translate(-50%, -50%) rotate(var(--slot-rotate));
  box-shadow: none;
}
.shape-builder .build-slot .build-shape {
  transform: scale(var(--slot-scale));
}
.shape-builder .build-slot.filled {
  border-color: transparent;
  background: transparent;
}
.shape-builder .build-slot.wrong {
  animation: shake 0.3s;
  background: #ffe3e5;
  border-color: #e85f68;
}
.build-shape {
  display: block;
  flex: none;
  background: var(--part-color);
  filter: drop-shadow(0 4px 2px #27324a24);
}
.build-square {
  width: 58px;
  height: 58px;
  border-radius: 9px;
}
.build-rect {
  width: 48px;
  height: 76px;
  border-radius: 10px;
}
.build-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
}
.build-triangle {
  width: 72px;
  height: 62px;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  border-radius: 8px;
}
.build-shape-ghost {
  opacity: 0.23;
  filter: grayscale(0.5);
}
.build-tray-title {
  text-align: center;
  color: #5d6679;
  font-weight: 900;
}
.build-tray {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 10px;
  min-height: 105px;
  padding: 12px;
  border: 3px dashed #d0e2ef;
  border-radius: 20px;
  background: #fafcfe;
  flex-wrap: wrap;
}
.shape-builder .build-piece {
  display: grid;
  grid-template-rows: 66px auto;
  place-items: center;
  gap: 5px;
  width: 102px;
  min-height: 98px;
  padding: 9px 7px;
  border: 3px solid #d7e9f7;
  border-radius: 18px;
  background: #fff;
  color: #2f3850;
  box-shadow: 0 5px 0 #cbe2f4;
  touch-action: none;
  cursor: grab;
}
.shape-builder .build-piece strong {
  font-size: 12px;
  line-height: 1.1;
}
.shape-builder .build-piece.selected {
  border-color: #f4ad28;
  background: #fff8d8;
  box-shadow: 0 0 0 4px #ffe59d;
  transform: translateY(-3px);
}
.build-drag-ghost {
  position: fixed !important;
  z-index: 99999 !important;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%) scale(0.9) !important;
  pointer-events: none !important;
  opacity: 0.88;
}
.build-tools {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.shape-builder .build-tools button {
  min-height: 50px;
  padding: 10px 16px;
  border-radius: 14px;
  background: #ecf6fd;
  color: #32709f;
  font-weight: 900;
}
.shape-builder .build-tools button:last-child {
  background: #168e5c;
  color: #fff;
}
.build-board.ready {
  border-color: #f0b83c;
  box-shadow:
    0 0 0 6px #ffeaa455,
    0 8px 22px #3f678620;
}
.build-board.complete {
  border-color: #35b978;
  animation: pulseTrail 0.8s ease-in-out 2;
}
.adventure-finish {
  display: grid;
  gap: 12px;
  width: min(620px, 100%);
  margin: auto;
}
.adventure-finish p {
  margin: 0;
  color: #5d6679;
  font-size: 18px;
}
.adventure-finish-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.adventure-finish-actions button {
  min-height: 74px;
  padding: 14px;
  border-radius: 20px;
  background: #4395d2;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}
.adventure-finish-actions button:last-child {
  background: #ecf6fd;
  color: #2f638b;
}
@keyframes pulseTrail {
  50% {
    transform: scale(1.08);
    box-shadow: 0 8px 0 #e5a914;
  }
}
@keyframes floatCatch {
  0%,
  100% {
    transform: translateY(10px);
  }
  50% {
    transform: translateY(-10px);
  }
}
@keyframes puzzleHint {
  to {
    transform: scale(1.04);
  }
}
@keyframes sortDrop {
  0% {
    opacity: 0.1;
    transform: translateY(-28px) scale(0.7) rotate(-8deg);
  }
  70% {
    transform: translateY(4px) scale(1.08);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}
@keyframes dragReturn {
  40% {
    transform: translateX(-10px) rotate(-3deg);
  }
  70% {
    transform: translateX(7px) rotate(2deg);
  }
}
@keyframes binCelebrate {
  40% {
    transform: translateY(-8px) scale(1.04);
    box-shadow: 0 0 0 7px #56ca9152;
  }
}
@keyframes completeGlow {
  50% {
    filter: brightness(1.08);
    transform: scale(1.015);
  }
}
@media (max-width: 700px) {
  .play-mode-grid,
  .sort-bins,
  .adventure-finish-actions,
  .habitat-match {
    grid-template-columns: 1fr;
  }
  .adventure-progress {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .adventure-steps {
    gap: 3px;
  }
  .maze-shell {
    grid-template-columns: 1fr;
  }
  .maze-controls {
    justify-content: center;
  }
  .maze-board {
    width: min(430px, 92vw);
  }
  .number-trail {
    grid-template-columns: repeat(var(--trail-columns), minmax(48px, 70px));
  }
  .pattern-token,
  .pattern-slot,
  .pattern-choice {
    width: 55px;
    height: 55px;
    font-size: 30px;
  }
  .balance-scale {
    padding-inline: 8px;
    gap: 20px;
  }
  .catch-arena {
    height: 300px;
  }
  .recycle-items {
    grid-template-columns: 1fr 1fr;
  }
  .recycle-bins {
    grid-template-columns: 1fr;
  }
  .recycle-bin {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto 1fr;
    justify-items: start;
    min-height: 118px;
    text-align: left;
  }
  .recycle-bin-symbol {
    grid-row: 1/4;
    margin: 12px 10px;
  }
  .recycle-bin-items {
    grid-column: 2;
    justify-content: flex-start;
  }
  .energy-line button {
    width: 46px;
    height: 46px;
    font-size: 32px;
  }
  .build-board {
    height: 280px;
  }
  .shape-builder .build-piece {
    width: 88px;
    grid-template-rows: 58px auto;
  }
  .build-tray {
    gap: 7px;
  }
  .shape-builder .build-slot {
    width: 78px;
    height: 78px;
  }
  .word-learning-controls button,
  .pair-learning-controls button {
    width: 100%;
  }
}
