* {
  box-sizing: border-box;
}
:root {
  --ink: #18312b;
  --muted: #53675d;
  --green: #185b46;
  --deep: #103f32;
  --pale: #e2eee5;
  --paper: #fbfaf5;
  --line: #cad5ca;
  --white: #fff;
  --warm: #f3e9c6;
  --radius: 16px;
  font-family: 'Atkinson Hyperlegible Next', 'Segoe UI', Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.48;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #a94b07;
  outline-offset: 3px;
}
a {
  color: var(--green);
}
button {
  border: 1px solid var(--line);
  background: white;
  border-radius: 10px;
  font-weight: 650;
}
button:hover:enabled {
  border-color: #68886e;
}
button:active:enabled {
  background: #e6efe7;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
h3 {
  line-height: 1.17;
}
button[hidden],
[hidden] {
  display: none !important;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.ic {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.iconbank {
  width: 0;
  height: 0;
  position: absolute;
  overflow: hidden;
}
.child .shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
}
.child .rail {
  height: 100vh;
  height: 100dvh;
  position: sticky;
  top: 0;
  padding: 27px 16px 14px;
  background: #edf2e9;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 5;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -1px;
  padding: 0 8px;
  margin: 0 0 30px;
}
.brandmark {
  background: var(--green);
  border-radius: 11px 11px 11px 3px;
  width: 35px;
  height: 33px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.brandmark i {
  display: block;
  width: 3px;
  height: 10px;
  border-radius: 3px;
  background: #fff;
}
.brandmark i:nth-child(2) {
  height: 17px;
}
.child .rail h2 {
  font-size: 15px;
  margin: 0 9px 10px;
}
.searchbox {
  height: 44px;
  border-radius: 10px;
  border: 1px solid #acbcaf;
  background: white;
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 6px;
}
.searchbox .ic {
  width: 18px;
}
.searchbox input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: none;
  font-size: 15px;
  outline-offset: 0;
}
.child .rail nav {
  overflow: auto;
  margin: 12px -4px 0;
  padding: 4px;
  flex: 1;
}
.navgroup {
  margin: 0 0 4px;
}
.navgroup > button,
.navitem {
  width: 100%;
  min-height: 45px;
  display: flex;
  gap: 9px;
  align-items: center;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  padding: 8px 9px;
  font-size: 15px;
}
.navgroup > button .ic {
  width: 17px;
}
.navgroup > button span {
  flex: 1;
}
.navgroup > button .arrow {
  width: 14px;
  height: 14px;
  transition: transform 0.15s;
}
.navgroup > button[aria-expanded='true'] .arrow {
  transform: rotate(90deg);
}
.navchildren {
  border-left: 1px solid #bccdbd;
  margin: 0 0 7px 17px;
  padding-left: 5px;
}
.navitem {
  font-weight: 500;
  padding-left: 10px;
}
.navitem[aria-current='page'] {
  color: var(--deep);
  background: #d2e4d4;
  font-weight: 720;
}
.navitem[aria-current='page']:before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
}
.rail-end {
  padding: 12px 5px 0;
  border-top: 1px solid var(--line);
  margin-top: 8px;
  display: grid;
  gap: 1px;
}
.rail-end a,
.rail-end button {
  display: flex;
  align-items: center;
  min-height: 40px;
  justify-content: space-between;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  background: transparent;
  border: 0;
  padding: 6px 4px;
  font-weight: 600;
}
.rail-end a:hover {
  text-decoration: underline;
}
.mobile-close,
#open-side,
#scrim {
  display: none;
}
main#main {
  min-width: 0;
  width: 100%;
  max-width: 1420px;
  margin: 0 auto;
  padding: 22px clamp(16px, 3.3vw, 56px) 48px;
}
.pagehead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  gap: 8px;
}
.context-name {
  display: flex;
  gap: 10px;
  align-items: center;
}
.context-name h1 {
  font-size: clamp(28px, 3.6vw, 44px);
  letter-spacing: -1.3px;
  margin: 1px 0 0;
}
.context-name #group-label {
  font-size: 14px;
  color: var(--muted);
  font-weight: 650;
}
.settings-icon,
.toolbutton,
#open-side {
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
}
.settings-icon,
.toolbutton {
  display: inline-flex;
}
.composer {
  background: white;
  border: 2px solid #8fae98;
  border-radius: 16px;
  box-shadow: 0 2px 0 rgba(37, 70, 43, 0.05);
  padding: 9px;
}
.compose-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 54px;
}
#tokens {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  padding: 3px 5px;
  min-height: 48px;
  font-size: clamp(17px, 1.9vw, 24px);
  font-weight: 650;
}
.empty-text {
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
}
.token {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 8px;
  background: #eff4eb;
  padding: 5px 8px;
}
.token img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  background: white;
  border-radius: 4px;
}
.phrase-text {
  white-space: normal;
  overflow-wrap: anywhere;
}
.speak {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 10px 18px;
  background: var(--green);
  color: white;
  border: 0;
  border-radius: 11px;
  font-weight: 750;
}
.speak:hover:enabled,
.speak:active:enabled {
  background: var(--deep);
}
.toolbutton {
  border: 0;
  background: #f0f3ed;
}
.composer #phrase-tools {
  display: flex;
  gap: 2px 9px;
  flex-wrap: wrap;
  padding: 5px 2px 0;
}
.composer #phrase-tools button {
  background: transparent;
  border: 0;
  color: var(--green);
  min-height: 36px;
  font-size: 14px;
  padding: 3px 6px;
}
.quickarea {
  margin-top: 15px;
}
.row-title {
  font-size: 14px;
  color: var(--muted);
  font-weight: 680;
  margin-bottom: 7px;
}
.quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.quick button,
.persons button {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 11px;
  font-weight: 700;
}
.quick .ic {
  width: 17px;
  height: 17px;
}
.quick .affirm {
  color: #225a38;
  background: #e7f2e6;
  border-color: #b0cbb4;
}
.quick .decline {
  color: #793d37;
  background: #f9eae5;
  border-color: #d6b5ad;
}
.quick .urgent {
  color: #763e33;
}
.vocab {
  margin-top: 22px;
}
.vocab-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}
.vocab h2,
.materials h2 {
  font-size: 21px;
  letter-spacing: -0.4px;
  margin: 0 0 11px;
}
#language-mark {
  font-size: 13px;
  color: var(--muted);
}
.persons {
  display: flex;
  gap: 7px;
  margin: 0 0 14px;
  flex-wrap: wrap;
}
.persons button {
  min-width: 76px;
  justify-content: center;
  border: 1px solid #bdad77;
  background: #fbf2ce;
}
.persons button[aria-pressed='true'] {
  background: #735823;
  color: white;
  border-color: #5c461a;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 10px;
}
.word {
  background: white;
  min-height: 138px;
  padding: 8px 7px 11px;
  border: 1px solid #c4d0c5;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  line-height: 1.13;
  overflow-wrap: anywhere;
  position: relative;
  box-shadow: 0 2px 0 #e4e9e0;
}
.word:hover:enabled {
  box-shadow: 0 2px 0 #b1c5b1;
}
.word:active:enabled {
  transform: translateY(1px);
}
.word img {
  width: 100%;
  height: 87px;
  object-fit: contain;
}
.word .wordlabel {
  font-size: 17px;
  font-weight: 700;
  text-align: center;
}
.word .wordhint {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.19;
  color: var(--muted);
  text-align: center;
}
.word .textonly {
  font-size: 23px;
  padding: 15px 1px;
}
.materials {
  margin-top: 26px;
}
#material-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
#material-list button {
  min-height: 46px;
  padding: 8px 14px;
}
#connection {
  border: 1px solid #c8ad62;
  background: #fff3c8;
  border-radius: 10px;
  padding: 9px 12px;
  margin-bottom: 14px;
}
#connection button {
  margin-left: 8px;
  padding: 5px 8px;
}
dialog {
  color: var(--ink);
  width: min(510px, calc(100% - 24px));
  max-height: 85dvh;
  overflow: auto;
  padding: 20px;
  border: 1px solid #b0c3b5;
  border-radius: 18px;
  box-shadow: 0 14px 60px #112f2540;
}
dialog::backdrop {
  background: #172b2090;
}
.dialoghead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}
.dialoghead h2 {
  font-size: 23px;
  margin: 0;
}
.dialoghead button,
.mobile-close {
  min-width: 44px;
  min-height: 44px;
  font-size: 23px;
}
.dialogbody p,
dialog p {
  line-height: 1.45;
}
.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0;
}
.dialog-actions button,
dialog form button,
dialog select,
dialog input {
  min-height: 44px;
  padding: 8px 11px;
}
.dialog-big {
  font-size: clamp(30px, 7vw, 55px);
  line-height: 1.17;
  font-weight: 750;
  overflow-wrap: anywhere;
}
.dialog-translation {
  font-size: 21px;
}
dialog label {
  display: grid;
  gap: 5px;
  margin: 9px 0;
}
dialog hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 16px 0;
}
.notice {
  color: var(--muted);
  font-size: 14px;
}
.formerror {
  color: #863a2c;
}
.picture-preview {
  max-width: 100%;
  max-height: 58vh;
  object-fit: contain;
}
.text-preview {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
}
#panel-body a {
  display: inline-block;
  padding: 10px 0;
}
.worktop {
  background: var(--paper);
}
@media (min-width: 850px) and (min-height: 700px) {
  .worktop {
    position: sticky;
    top: 0;
    z-index: 2;
    padding-top: 8px;
    padding-bottom: 12px;
  }
  .vocab {
    margin-top: 10px;
  }
}
@media (min-width: 1550px) {
  .grid {
    grid-template-columns: repeat(6, minmax(145px, 1fr));
  }
  .word {
    min-height: 158px;
  }
  .word img {
    height: 103px;
  }
}
@media (max-width: 850px) {
  .child .shell {
    display: block;
  }
  .child .rail {
    display: none;
    position: fixed;
    inset: 0 auto 0 0;
    width: min(300px, 86vw);
    box-shadow: 8px 0 30px #102e2230;
  }
  .child .rail.open {
    display: flex;
  }
  .child .rail.open + #scrim {
    display: block;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    background: #203c305b;
    z-index: 4;
  }
  #open-side {
    display: inline-flex;
  }
  .mobile-close {
    display: block;
    margin-left: auto;
    border: 0;
    background: transparent;
  }
  .child .rail .brand {
    margin-bottom: 18px;
  }
  main#main {
    padding: 14px 15px 32px;
  }
  .pagehead {
    margin-bottom: 12px;
  }
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
  }
  .vocab {
    margin-top: 18px;
  }
}
@media (max-width: 480px) {
  main#main {
    padding: 10px 10px 28px;
  }
  .context-name h1 {
    font-size: 27px;
  }
  .context-name #group-label {
    font-size: 12px;
  }
  .composer {
    padding: 6px;
  }
  .compose-row {
    gap: 3px;
    min-height: 46px;
  }
  #tokens {
    padding: 2px;
    min-height: 42px;
  }
  .speak {
    padding: 8px 10px;
    min-height: 46px;
    gap: 4px;
    font-size: 14px;
  }
  .speak .ic {
    width: 18px;
  }
  .toolbutton {
    width: 44px;
  }
  .quick {
    gap: 5px;
  }
  .quick button {
    min-height: 44px;
    padding: 6px 9px;
    font-size: 14px;
  }
  .quickarea {
    margin-top: 10px;
  }
  .quick .ic {
    width: 14px;
  }
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }
  .word {
    min-height: 110px;
    padding: 6px 3px;
  }
  .word img {
    height: 62px;
  }
  .word .wordlabel {
    font-size: 15px;
  }
  .word .wordhint {
    font-size: 12px;
  }
  .vocab h2 {
    font-size: 19px;
  }
  .persons {
    margin-bottom: 9px;
  }
  .empty-text {
    font-size: 14px;
  }
  .context-name {
    gap: 6px;
  }
}
@media (max-width: 329px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .speak {
    padding: 7px;
  }
  .speak .ic {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.speech-notice {
  pointer-events: none;
  position: fixed;
  z-index: 3;
  inset: auto clamp(10px, 3vw, 42px) 12px auto;
  max-width: min(450px, calc(100vw - 20px));
  padding: 12px 52px 12px 15px;
  color: white;
  background: #183e30;
  border-radius: 12px;
  box-shadow: 0 3px 16px #152e2633;
  overflow-wrap: anywhere;
}
.speech-notice strong,
.speech-notice small {
  display: block;
}
.speech-notice strong {
  font-size: 20px;
}
.speech-notice small {
  margin-top: 3px;
}
.speech-notice button {
  pointer-events: auto;
  position: absolute;
  right: 4px;
  top: 4px;
  width: 44px;
  height: 44px;
  border: 0;
  color: white;
  background: transparent;
  font-size: 21px;
}
.sentence-choice {
  width: 100%;
  padding: 12px;
  text-align: left;
  margin-bottom: 8px;
}
.person-help {
  align-self: center;
  font-size: 14px;
  color: var(--muted);
}
.persons button img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 7px;
  background: white;
}
.persons button {
  padding: 4px 12px 4px 5px;
  min-width: 88px;
}
.navgroup img {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  object-fit: contain;
  background: white;
  border-radius: 7px;
}
.navgroup > button,
.navitem {
  min-height: 49px;
  padding-block: 4px;
}
.nav-back {
  display: block;
  width: 100%;
  min-height: 42px;
  margin-bottom: 8px;
  background: transparent;
  color: var(--green);
  text-align: left;
  padding-inline: 10px;
  border: 0;
}
.navitem[aria-current='page']:before {
  display: none;
}
.navgroup > button:focus-visible {
  outline-offset: 0;
}
.wordlabel {
  hyphens: auto;
}
@media (max-width: 480px) {
  .persons button {
    min-width: 78px;
    padding: 4px 8px 4px 4px;
  }
  .persons button img {
    width: 31px;
    height: 31px;
  }
}
.person-picker {
  margin: 0 0 13px;
  container-type: inline-size;
}
.person-picker-head {
  display: flex;
  align-items: stretch;
  gap: 7px;
}
.person-tabs {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.person-tabs button {
  display: grid;
  align-content: center;
  text-align: left;
  gap: 2px;
  min-height: 48px;
  min-width: 128px;
  padding: 5px 12px;
  background: #faf3d7;
  border: 1px solid #c7b780;
  border-radius: 10px;
  color: #524019;
}
.person-tabs button[aria-selected='true'] {
  border-color: #947629;
  background: #f1e4ac;
  box-shadow: inset 0 -3px #947629;
}
.person-tabs small {
  font-size: 12px;
  font-weight: 550;
}
.person-tabs span {
  font-size: 15px;
  font-weight: 750;
}
.person-picker .persons {
  margin: 6px 0 0;
}
.person-picker .persons button {
  min-width: 72px;
}
.activity-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0;
}
.activity-choices button {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 5px;
  padding: 9px;
  min-height: 48px;
  flex: 1 1 115px;
}
.activity-images {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.activity-images img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}
.activity-reply {
  border-left: 3px solid var(--green);
  padding: 8px 10px;
  background: var(--pale);
  font-weight: 650;
}
@media (max-width: 480px) {
  .person-picker .persons {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
  }
  .person-picker #people-plural:has([data-person='wir_kita']) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .person-picker .persons button {
    min-width: 0;
    padding: 4px 2px;
    gap: 2px;
    flex-direction: column;
  }
  .person-tabs {
    flex-wrap: nowrap;
  }
  .person-tabs button {
    flex: 1;
    min-width: 0;
  }
}
.side-scroll {
  min-height: 0;
  flex: 1;
  overflow: auto;
  margin: 9px -5px 5px;
  padding: 0 5px;
}
.child .rail .side-scroll nav {
  overflow: visible;
  flex: none;
  margin: 3px 0 0;
  padding: 0;
}
.room-strip {
  padding: 4px 0 10px;
  margin-bottom: 7px;
  border-bottom: 1px solid var(--line);
}
.room-strip h3 {
  font-size: 14px;
  margin: 4px 6px 7px;
}
.room-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}
.room-grid .room {
  min-height: 58px;
  padding: 3px 2px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 1px;
  border-radius: 8px;
  background: #fff;
  font-size: 11.5px;
  line-height: 1.12;
  overflow-wrap: anywhere;
}
.room-grid .room img {
  width: 34px;
  height: 30px;
  object-fit: contain;
}
.room-grid .room[aria-current='page'] {
  background: #d2e4d4;
  border-color: #699175;
}
.place-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  background: #e6efe5;
  border: 1px solid #b6cbb8;
  border-radius: 12px;
  padding: 5px 10px;
  font-size: 15px;
  margin-bottom: 12px;
}
.place-hint span {
  flex: 1;
}
.place-hint button {
  min-height: 42px;
  padding: 4px 10px;
}
.place-hint .hint-close {
  background: transparent;
  border: 0;
  font-size: 21px;
  min-width: 40px;
}
#open-side {
  flex-direction: column;
  gap: 0;
  font-size: 10px;
}
#open-side::after {
  content: attr(data-caption);
}
@media (max-width: 699px), (max-width: 850px) and (max-height: 599px) {
  html[dir=rtl] .child .rail { inset: 0 0 0 auto; }
}
html[dir=rtl] .arrow { transform: scaleX(-1); }
.room-grid .room img {
  width: 44px;
  height: 36px;
}
.word img {
  height: 98px;
}
.word {
  min-height: 151px;
}
.wordlabel {
  max-width: 100%;
  line-height: 1.18;
}
.room-grid .room {
  line-height: 1.2;
}
@media (max-width: 480px) {
  .word img {
    height: 72px;
  }
  .word {
    min-height: 118px;
  }
}
#tokens {
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  opacity: 1;
}
#tokens:not(:disabled)::after {
  content: '▾';
  margin-left: auto;
  padding: 0 3px;
  color: var(--green);
  font-size: 14px;
}
#tokens:hover:enabled {
  background: #f0f5ee;
}
.dialog-actions button {
  min-height: 44px;
}
.place-hint .hint-close {
  min-width: 44px;
}
.room-strip .room {
  min-width: 44px;
}
#areas-toggle {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 7px 9px;
  background: transparent;
  border-color: transparent;
  text-align: left;
  font-size: 15px;
}
#areas-toggle .ic {
  width: 18px;
  height: 18px;
}
#areas-toggle .arrow {
  width: 15px;
  margin-left: auto;
}
#areas-toggle[aria-expanded='true'] .arrow {
  transform: rotate(90deg);
}
.room-strip {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  margin-top: 7px;
  padding-top: 11px;
}
.room-strip h3 {
  margin: 0 3px 8px;
  font-size: 16px;
  overflow-wrap: anywhere;
}
#quick-picks-day {
  width: 100%;
  min-height: 44px;
  margin: 0 0 7px;
  padding: 5px 8px;
  background: #fff;
  border: 1px solid #a9bbae;
  border-radius: 9px;
  color: var(--ink);
  font: inherit;
}
.room-grid .empty-room {
  color: #758777;
  background: transparent;
  border: 1px dashed #b7c6b7;
}
.vocab-title {
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 7px;
}
.vocab-title h2 {
  flex: 1 1 9em;
  margin: 0;
}
#language-mark:empty {
  display: none;
}
#choose-sentence {
  min-height: 44px;
  padding: 5px 11px;
  border: 1px solid #98af9d;
  border-radius: 10px;
  background: #fff;
  font-size: 15px;
}
@container (max-width: 425px) {
  .person-picker-head {
    gap: 5px;
  }
  .person-picker-head .person-tabs {
    flex: 1 1 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
    gap: 4px;
  }
  .person-picker-head .person-tabs button {
    min-width: 0;
    padding: 5px 6px;
  }
  #choose-sentence {
    flex: 0 1 84px;
    padding: 4px 6px;
    line-height: 1.16;
  }
}
#choose-sentence[aria-pressed='true'] {
  color: white;
  background: var(--green);
  box-shadow: inset 0 -3px #214e3d;
}
#choose-sentence[aria-pressed='true']::before {
  content: '✓ ';
}
.sentence-options {
  display: grid;
  gap: 8px;
}
.sentence-option {
  width: 100%;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  text-align: left;
  background: var(--pale);
  border: 1px solid #a7bdab;
}
.sentence-option img {
  flex: none;
  width: 48px;
  height: 48px;
  object-fit: contain;
}
.sentence-option-text {
  display: grid;
  gap: 3px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.sentence-option-text strong {
  font-size: clamp(17px, 3vw, 21px);
  line-height: 1.3;
}
.sentence-option-text small {
  color: var(--muted);
  font-size: 15px;
}
.sentence-back {
  min-height: 44px;
  margin-top: 12px;
  padding: 7px 14px;
}
@media (min-width: 700px) and (max-width: 850px) and (min-height: 600px) {
  .child .shell {
    display: grid;
    grid-template-columns: 188px minmax(0, 1fr);
  }
  .child .rail {
    display: flex;
    position: sticky;
    inset: auto;
    top: 0;
    width: auto;
    height: 100dvh;
    box-shadow: none;
    padding: 20px 9px 10px;
  }
  .child .rail .brand {
    margin: 0 0 20px;
  }
  .mobile-close,
  #open-side,
  #scrim {
    display: none !important;
  }
  .room-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .child .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .child main#main {
    padding: 18px 14px 36px;
  }
  .child .rail h2 {
    font-size: 15px;
  }
  .child .pagehead {
    margin-bottom: 12px;
  }
}
@media (min-width: 540px) and (max-height: 520px) {
  .child .shell {
    display: block;
  }
  .child .rail {
    display: none;
    position: fixed;
    inset: 0 auto 0 0;
    width: min(300px, 74vw);
    height: 100dvh;
    padding: 9px 12px;
  }
  .child .rail.open {
    display: flex;
  }
  .child .rail.open + #scrim {
    display: block;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #203c305b;
    z-index: 4;
  }
  .child .rail > .brand {
    margin-bottom: 5px;
  }
  .child .rail h2 {
    display: none;
  }
  .mobile-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }
  .child .rail-end {
    padding: 2px 0 0;
    display: flex;
    justify-content: space-between;
  }
  .child .rail-end a,
  .child .rail-end button {
    font-size: 12px;
    min-height: 36px;
  }
  #open-side {
    display: inline-flex;
  }
  .child main#main {
    display: grid;
    grid-template-columns: minmax(190px, 31%) minmax(0, 1fr);
    grid-template-areas: 'connection connection' 'place place' 'work words' '. materials';
    align-items: start;
    column-gap: 12px;
    padding: 8px 12px 18px;
  }
  .child #connection {
    grid-area: connection;
  }
  .child #place-hint {
    grid-area: place;
  }
  .child .worktop {
    grid-area: work;
    position: sticky;
    top: 5px;
  }
  .child .vocab {
    grid-area: words;
    margin: 0;
  }
  .child .materials {
    grid-area: materials;
  }
  .child .vocab h2 {
    font-size: 17px;
  }
  .child .pagehead {
    gap: 3px;
    margin: 0 0 7px;
  }
  .child .context-name {
    gap: 5px;
  }
  .child .context-name h1 {
    font-size: clamp(19px, 2.8vw, 26px);
    letter-spacing: -0.5px;
  }
  .child .context-name #group-label {
    font-size: 11px;
  }
  .child .compose-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 3px;
  }
  .child #tokens {
    grid-column: span 2;
    min-height: 34px;
    font-size: 16px;
  }
  .child .speak {
    min-height: 44px;
    padding: 4px 6px;
  }
  .child .quickarea {
    margin-top: 7px;
  }
  .child .quick {
    gap: 3px;
  }
  .child .quick button {
    font-size: 13px;
    padding: 4px 6px;
    min-height: 44px;
  }
  .child .grid {
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 5px;
  }
  .child .word {
    min-height: 96px;
    padding: 4px;
  }
  .child .word img {
    height: 59px;
  }
  .child .word .wordlabel {
    font-size: 14px;
  }
  .child .person-tabs button {
    min-height: 44px;
  }
  .child .person-picker {
    margin-bottom: 6px;
  }
  .child .persons button {
    min-width: 54px;
    min-height: 44px;
    gap: 3px;
    padding: 3px 5px;
  }
  .child .persons button img {
    width: 25px;
    height: 25px;
  }
}
.quick button {
  min-width: 44px;
}
.category-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid #9bb3a4;
  border-radius: 14px;
  background: white;
  box-shadow: 0 2px 0 #e4e9e0;
}
.child .category-open {
  flex: 1;
  width: 100%;
  min-height: 96px;
  border: 0;
  border-radius: 13px 13px 0 0;
  box-shadow: none;
}
.category-open .ic {
  position: absolute;
  inset-block-start: 5px;
  inset-inline-end: 5px;
  width: 24px;
  height: 24px;
  padding: 3px;
  border: 1px solid #99b2a3;
  border-radius: 6px;
  background: #edf5ed;
  color: #20553e;
}
.category-say {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 5px 7px;
  min-height: 44px;
  border: 0;
  border-top: 1px solid #bfcec2;
  border-radius: 0 0 13px 13px;
  background: #eef4ed;
  color: #214e3d;
  font-size: 14px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.category-say .ic { flex: none; width: 18px; height: 18px; }
.category-panel {
  width: min(740px, calc(100% - 20px));
  padding: 0;
  overflow: hidden;
}
.category-panel[open] { display: flex; flex-direction: column; }
.category-panel .dialoghead {
  margin: 0;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}
.category-panel #panel-body {
  padding: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.child .category-choices {
  grid-template-columns: repeat(auto-fill, minmax(min(112px, 100%), 1fr));
}
.detail-marker {
  position: absolute;
  inset-block-start: 5px;
  inset-inline-end: 5px;
  padding: 0 5px 3px;
  border-radius: 8px;
  background: #e7efe7;
  color: #244e38;
  line-height: 1;
}
.detail-panel { width: min(600px, calc(100% - 20px)); }
.detail-direct {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  padding: 10px 14px;
  text-align: start;
  border: 1px solid #37654c;
  border-radius: 12px;
  background: #e9f3e9;
  color: #163f29;
}
.detail-direct .ic { flex: none; width: 24px; height: 24px; }
.detail-direct small { flex-basis: 100%; }
.detail-heading { margin: 16px 0 8px; font-size: 1rem; }
.free-board #room-strip,
.child.free-board #field-tabs, .child.free-board #choose-sentence { display:none; }
.child.free-board main#main { max-width:900px; }
.child.free-board #words { grid-template-columns:repeat(2,minmax(0,1fr)); }
.page-actions { display:flex; gap:8px; align-items:center; }
.pagehead .context-name, .pagehead .context-name > div { min-width:0; }
.pagehead h1 { overflow-wrap:anywhere; }
.page-actions a { display:inline-flex; align-items:center; min-height:44px; font-weight:650; white-space:nowrap; }
.field-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 8px;
  padding: 3px;
  border-radius: 13px;
  background: #e9eee6;
}
.field-tabs[hidden] { display: none; }
.field-tabs button {
  min-width: 44px;
  min-height: 44px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  font-size: 0.94rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.field-tabs button[aria-selected="true"] {
  border-color: #38634d;
  background: #20563f;
  color: white;
}
.field-heading {
  grid-column: 1 / -1;
  margin: .6rem 0 0;
  font-size: 1rem;
  font-weight: 650;
  color: #365544;
}
.field-heading:first-child { margin-top: 0; }
.field-controls:not(:empty) {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 5px 9px;
}
.field-controls .sentence-back { margin: 0 0 8px; }
.category-choices .field-empty { grid-column: 1 / -1; margin: 8px 0; }
.step-number {
  position: absolute;
  inset-inline-start: 6px;
  inset-block-start: 6px;
  display: grid;
  place-items: center;
  min-width: 25px;
  min-height: 25px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-size: .9rem;
  font-weight: 750;
}
.step-card[aria-current="step"] { box-shadow: inset 0 0 0 3px var(--green); }
@media (max-width: 420px) {
  .field-tabs { gap: 1px; }
  .field-tabs button { padding: 4px 7px; }
}


.who { display: flex; align-items: baseline; max-width: 100%; margin: 0 0 8px; font-size: .8rem; line-height: 1.35; color: var(--muted); white-space: nowrap; }
.who[hidden] { display: none; }
.who-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 700; color: var(--ink); }
.who-role { flex: none; font-weight: 700; color: var(--ink); }


.searchbox { height: auto; min-height: 46px; border-color: #788a79; }
.searchbox input { align-self: stretch; min-height: 44px; }
.composer { border-color: #7f9886; }
.room-grid .empty-room { color: #5a6e60; }


.rail-end a,
.rail-end button,
.child .rail-end a,
.child .rail-end button { min-height: 44px; }
@media (max-width: 480px) {
  #tokens { min-height: 44px; }
  .compose-row { min-height: 48px; }
}
@media (min-width: 540px) and (max-height: 520px) {
  .child #tokens { min-height: 44px; }
}


@media (max-width: 480px) {
  .child .pagehead { flex-wrap: wrap; justify-content: flex-start; row-gap: 4px; column-gap: 6px; }
  .child .page-actions .my-day-open { padding: 6px 12px; }
  .child .pagehead::after { content: ''; flex-basis: 100%; order: 2; }
  .child .page-actions { display: contents; }
  .child .pagehead .context-name { order: 0; flex: 1 1 0; }
  .child #open-settings { order: 1; flex: none; }
  .child #my-day-open, .child #messages-open, .child #about-link { order: 3; }
}


.corearea {
  margin-top: 14px;
}
.corearea .row-title {
  margin: 0 0 7px;
}
.core-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}
.core-word {
  height: 60px;
  border-radius: 11px;
}
.core-slot {
  visibility: hidden;
}
.core-word {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 5px 3px;
  background: var(--white);
  border: 1px solid #c4d0c5;
  color: var(--ink);
  font-size: 17px;
  font-weight: 750;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.core-word img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}
.word-colors .wc-people { --wc-line: #b39f5e; --wc-tint: #fbf2ce; }
.word-colors .wc-actions { --wc-line: #7fa98b; --wc-tint: #e7f2e6; }
.word-colors .wc-things { --wc-line: #cf9a62; --wc-tint: #fbeedd; }
.word-colors .wc-feelings { --wc-line: #86a5c8; --wc-tint: #e8f0f8; }
.word-colors .wc-social { --wc-line: #cc98af; --wc-tint: #f8e9f0; }
.word-colors .wc-question { --wc-line: #a08cc2; --wc-tint: #f0ebf7; }
.word-colors .wc-negation { --wc-line: #cf9d92; --wc-tint: #f9eae5; }
.word-colors .wc-little { --wc-line: #b9c6ba; --wc-tint: #ffffff; }
.word-colors .word[class*='wc-']:not(.wc-groups),
.word-colors .core-word {
  border: 2px solid var(--wc-line, #c4d0c5);
}
.word-colors .core-word,
.word-colors .grammar-toggle {
  background: var(--wc-tint, var(--white));
}
.composer {
  position: relative;
}
.grammar-row {
  position: relative;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.grammar-hint {
  margin: 0;
  align-self: center;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.25;
}
.grammar-tools {
  display: flex;
  gap: 6px;
  min-height: 44px;
  overflow-x: auto;
  scrollbar-width: none;
}
.grammar-questions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border: 1px solid #b9c6ba;
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 10px 24px rgba(24, 49, 43, 0.18);
}
.grammar-questions[hidden] {
  display: none;
}
#tokens .composed-text {
  padding: 0 4px;
  color: var(--deep);
  font-weight: 750;
}
.grammar-toggle {
  flex: none;
  min-height: 44px;
  padding: 6px 14px;
  border-radius: 11px;
  border: 1px solid #b9c6ba;
  background: var(--white);
  color: var(--ink);
  font-weight: 700;
}
.word-colors .grammar-toggle {
  border-color: var(--wc-line, #b9c6ba);
}
.grammar-toggle[aria-pressed='true'],
.word-colors .grammar-toggle[aria-pressed='true'] {
  background: var(--deep);
  border-color: var(--deep);
  color: var(--white);
}
.grammar-toggle.wc-negation[aria-pressed='true'] {
  background: #793d37;
  border-color: #793d37;
}
.grammar-toggle.wc-question[aria-pressed='true'] {
  background: #574580;
  border-color: #574580;
}
.keyboard-area {
  margin-top: 10px;
}
.mode-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #d3c184;
  border-radius: 14px;
  background: var(--warm);
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(24, 49, 43, 0.12);
}
.mode-bar p {
  flex: 1 1 220px;
  margin: 0;
  font-weight: 600;
}
.mode-bar .mode-done {
  min-height: 44px;
  padding: 6px 18px;
  border: 0;
  border-radius: 11px;
  background: var(--deep);
  color: var(--white);
  font-weight: 750;
}
.model-find {
  display: flex;
  flex: 1 1 260px;
  align-items: flex-end;
  gap: 6px;
}
.model-find label {
  display: grid;
  flex: 1;
  gap: 3px;
  font-size: 14px;
  font-weight: 650;
}
.model-find input {
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid #9fb2a3;
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  font-size: 17px;
}
.model-find button {
  min-height: 44px;
  padding: 6px 14px;
  border-radius: 11px;
  font-weight: 700;
}
.mode-bar .model-result {
  flex-basis: 100%;
  color: var(--deep);
  font-size: 14px;
}
.mode-bar .model-result:empty {
  display: none;
}
.modeled,
.found {
  outline: 4px solid #c98a12;
  outline-offset: 2px;
}
@media (prefers-reduced-motion: no-preference) {
  .modeled {
    animation: model-pulse 1.6s cubic-bezier(0.16, 1, 0.3, 1) 1;
  }
  @keyframes model-pulse {
    0% { outline-offset: 10px; outline-color: rgba(201, 138, 18, 0); }
    35% { outline-offset: 2px; outline-color: #c98a12; }
    100% { outline-offset: 2px; outline-color: #c98a12; }
  }
}
.is-gap {
  visibility: hidden;
}
.adult-gate {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px dashed #9fb2a3;
  border-radius: 11px;
  background: var(--paper);
  color: var(--deep);
  font-weight: 700;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.adult-gate.holding {
  background: var(--pale);
  border-style: solid;
}
.hide-mode .is-hidden {
  opacity: 0.5;
  border-style: dashed;
  background: repeating-linear-gradient(135deg, var(--white) 0 8px, #eef2ec 8px 16px);
}
.hide-mode .core-word:disabled {
  opacity: 0.35;
}
.talker-settings {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
}
.talker-settings legend {
  margin-bottom: 4px;
  font-weight: 750;
}
.talker-settings .check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}
.talker-settings .check-row input {
  width: 22px;
  height: 22px;
}
.talker-settings .hint {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 14px;
}
#tokens .empty-text {
  white-space: normal;
  line-height: 1.2;
}
#panel-body select {
  max-width: 100%;
}
#panel-body > button,
#panel-body > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
dialog label > select {
  min-width: 0;
  width: 100%;
}
.core-word .core-label {
  font-size: 15px;
  overflow-wrap: normal;
  word-break: keep-all;
  hyphens: manual;
}
@media (max-width: 480px) {
  .core-grid {
    gap: 4px;
  }
  .core-word {
    padding: 4px 1px;
  }
  .core-word .core-label {
    font-size: 13px;
    letter-spacing: -0.2px;
  }
}

.scan-on {
  outline: 4px solid #0b3d91 !important;
  outline-offset: 1px;
  box-shadow: 0 0 0 7px #ffd400 !important;
  position: relative;
  z-index: 3;
}
.scan-back {
  outline: 5px dashed #0b3d91 !important;
  outline-offset: 2px;
}
html.scan-screen,
html.scan-screen body {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.scan-pause {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--deep);
  color: var(--white);
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.25);
}
.scan-pause p {
  flex: 1 1 100%;
  margin: 0;
  font-weight: 700;
}
.scan-pause button {
  min-height: 48px;
  padding: 0 18px;
  border: 2px solid var(--white);
  border-radius: 12px;
  background: var(--white);
  color: var(--deep);
  font-weight: 700;
}
.scan-pause button + button {
  background: transparent;
  color: var(--white);
}
.scan-settings {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0 0 12px;
  padding: 12px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.scan-settings legend {
  padding: 0;
  margin-bottom: 4px;
  font-weight: 750;
}
.scan-settings label {
  display: grid;
  gap: 4px;
}
.scan-settings .check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}
.scan-settings .check-row input {
  width: 22px;
  height: 22px;
  flex: none;
}
.scan-settings select {
  min-width: 0;
  width: 100%;
  min-height: 44px;
}
.scan-settings .hint {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.managed-note {
  margin: 0;
}
