:root {
  font-family:"Hiragino Maru Gothic ProN","Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif;
  color:#294d46;
  background:#f7f8f2;
  font-synthesis:none;
  --green:#10816b;
  --ink:#4c83aa;
  --muted:#72867c;
  --border:#e6ece2;
}
* {
  box-sizing:border-box;
}
body {
  margin:0;
}
button,a {
  -webkit-tap-highlight-color:transparent;
}
button {
  font:inherit;
  color:inherit;
  cursor:pointer;
  border:0;
  background:none;
}
a {
  color:inherit;
  text-decoration:none;
}
button:disabled {
  opacity:.4;
  cursor:default;
}
button:focus-visible,a:focus-visible {
  outline:3px solid #e4ad3c;
  outline-offset:4px;
}
h1:focus {
  outline:none;
}
button,.home-link {
  min-height:44px;
  min-width:44px;
}
[hidden] {
  display:none!important;
}
.icon {
  width:23px;
  height:23px;
  flex-shrink:0;
  vertical-align:middle;
}
p,h1,h2 {
  margin:0;
}
button svg {
  pointer-events:none;
}
.app-shell {
  max-width:1240px;
  margin:auto;
  padding:28px 44px 16px;
  padding-top:max(28px,env(safe-area-inset-top));
  padding-bottom:max(16px,env(safe-area-inset-bottom));
}
.topbar {
  height:61px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:32px;
}
.brand {
  display:flex;
  align-items:center;
  gap:12px;
  font-weight:800;
  font-size:18px;
  line-height:1.35;
  letter-spacing:.06em;
}
.brand-mark {
  width:49px;
  height:52px;
  border-radius:16px 16px 18px 13px;
  background:var(--green);
  color:white;
  display:grid;
  place-items:center;
  font-size:36px;
  transform:rotate(-5deg);
  box-shadow:0 4px 0 #d5e6d9;
}
.brand-sub {
  display:block;
  color:var(--green);
  font-size:12px;
  letter-spacing:.08em;
  margin-top:2px;
}
.header-actions {
  display:flex;
  align-items:center;
  gap:12px;
}
.icon-button {
  width:44px;
  height:44px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background:#fff9;
  color:#4e7568;
  font-size:28px;
}
.icon-button:hover {
  background:white;
}
.total-stars {
  display:flex;
  align-items:center;
  gap:9px;
  font-size:18px;
  background:#fff;
  padding:10px 17px;
  border-radius:15px;
  min-width:80px;
}
.total-stars>span:first-child {
  color:#e6b64e;
  font-size:24px;
}
.home-intro {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin:0 0 31px;
}
.eyebrow {
  font-size:12px;
  letter-spacing:.09em;
  color:var(--muted);
  display:block;
  font-weight:600;
}
h1 {
  font-size:37px;
  line-height:1.5;
  letter-spacing:.035em;
  font-weight:800;
  margin:4px 0 8px;
}
.home-intro p {
  font-size:13px;
  letter-spacing:.06em;
  color:#758279;
}
.journey-badge {
  display:flex;
  align-items:center;
  gap:11px;
  margin:5px 34px 0 20px;
  transform:rotate(-6deg);
}
.journey-badge>span {
  display:grid;
  place-items:center;
  width:44px;
  height:44px;
  background:#e9eee0;
  border-radius:15px;
  color:#90a18d;
  font-size:24px;
}
.journey-badge>span:nth-of-type(2) {
  background:#dcebe0;
  color:#659980;
  transform:translateY(-7px);
}
.journey-badge>span:last-child {
  background:#ecedd9;
  color:#a3aa7b;
}
.journey-badge i {
  width:12px;
  border-top:3px dotted #bbc9b6;
}
.section-label {
  display:flex;
  justify-content:space-between;
  color:#7e8b7d;
  font-size:11px;
  letter-spacing:.12em;
  margin-bottom:14px;
}
.vehicle-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:18px;
}
.vehicle-card {
  background:#fff;
  border:1px solid #edf0e7;
  border-radius:21px;
  padding:16px 16px 12px;
  transition:transform .18s,box-shadow .18s;
  box-shadow:0 4px 0 #e9ede332;
  min-width:0;
  overflow:hidden;
}
.vehicle-card:hover {
  transform:translateY(-5px);
  box-shadow:0 9px 20px #305c4210;
}
.vehicle-card:active {
  transform:scale(.98);
}
.card-top {
  display:flex;
  justify-content:space-between;
  align-items:center;
  color:var(--card-accent);
  font-size:10px;
  letter-spacing:.05em;
}
.card-star {
  color:#dfe6d7;
  font-size:18px;
  letter-spacing:0;
}
.card-star.earned {
  color:#dba731;
}
.vehicle-card img {
  display:block;
  width:100%;
  height:auto;
  aspect-ratio:320/190;
  object-fit:contain;
  margin:3px 0 4px;
  background:radial-gradient(ellipse at 50% 62%,var(--card-color) 0%,transparent 69%);
}
.card-bottom {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:2px;
  font-size:14px;
  font-weight:700;
  letter-spacing:.01em;
}
.card-arrow {
  display:grid;
  place-items:center;
  flex-shrink:0;
  background:var(--card-color);
  color:var(--card-accent);
  width:25px;
  height:25px;
  border-radius:50%;
}
.card-arrow .icon {
  width:15px;
  height:15px;
}
.home-bottom {
  display:grid;
  grid-template-columns:1.05fr 1fr;
  gap:36px;
  align-items:center;
  margin-top:24px;
}
.kana-banner {
  display:flex;
  align-items:center;
  text-align:left;
  gap:15px;
  background:#e1f0e5;
  border:1px solid #d6e8d9;
  border-radius:18px;
  padding:16px 18px;
  font-size:15px;
  font-weight:700;
  letter-spacing:.025em;
}
.kana-banner>.icon {
  margin-left:auto;
}
.kana-banner-icon {
  width:39px;
  height:39px;
  display:grid;
  place-items:center;
  background:#fff9;
  color:var(--green);
  font-size:26px;
  border-radius:12px;
}
.home-bottom small {
  display:block;
  font-weight:400;
  font-size:10px;
  color:#80917f;
  margin-top:4px;
  letter-spacing:.055em;
}
.gentle-note {
  display:flex;
  align-items:center;
  gap:14px;
  font-size:13px;
}
.little-flower {
  font-size:37px;
  color:#d6a286;
  display:inline-block;
  transform:rotate(20deg);
}
footer {
  display:flex;
  justify-content:space-between;
  font-size:10px;
  letter-spacing:.04em;
  color:#899587;
  margin-top:29px;
  padding:8px 0;
}
footer a {
  text-decoration:underline;
  text-underline-offset:3px;
}
.practice-heading {
  display:flex;
  align-items:center;
  gap:14px;
  margin:0 0 20px;
}
.practice-heading h1 {
  font-size:26px;
  margin:3px 0 0;
}
.home-link {
  width:46px;
  height:46px;
  display:grid;
  place-items:center;
  border-radius:15px;
  background:#eaf0e6;
}
.char-sound {
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:15px;
  color:var(--green);
}
.char-sound>span {
  font-size:25px;
  background:#e6f2e7;
  border-radius:12px;
  padding:1px 8px;
}
.practice-layout {
  display:grid;
  grid-template-columns:230px minmax(260px,580px) 90px;
  justify-content:center;
  align-items:start;
  gap:37px;
}
.word-panel {
  padding-top:59px;
  text-align:center;
}
.word-picture {
  padding:13px 10px 19px;
  background:#fff;
  border:1px solid #edf0e7;
  border-radius:20px;
  overflow:hidden;
}
.word-picture img {
  width:100%;
  height:auto;
  display:block;
  background:radial-gradient(ellipse,var(--card-color),transparent 70%);
}
.word-picture h2 {
  font-size:18px;
  margin:0 0 6px;
  line-height:1.5;
}
.word-picture p {
  color:#8a998a;
  font-size:10px;
  letter-spacing:.12em;
}
.single-kana {
  display:block;
  font-size:100px;
  color:var(--green);
  height:144px;
}
.word-letters {
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:6px;
  margin-top:15px;
}
.letter {
  font-size:21px;
  border-radius:11px;
  min-width:44px;
  height:44px;
  display:grid;
  place-items:center;
  background:#ffffff90;
}
.letter.selected {
  background:var(--ink);
  color:white;
}
.practice-stars {
  margin-top:26px;
}
.practice-stars p {
  font-size:11px;
  margin-bottom:10px;
}
.stars {
  display:flex;
  justify-content:center;
  gap:12px;
}
.stars>span {
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  border-radius:50%;
  font-size:26px;
  color:#d9e2d4;
  background:#fff8;
}
.stars>span.earned {
  color:#dba62b;
  background:#fbefbd;
}
.practice-stars small {
  display:block;
  font-size:9px;
  color:#91a08d;
  margin-top:11px;
}
.segmented {
  display:flex;
  border-radius:14px;
  background:#eaf0e7;
  padding:4px;
  gap:4px;
}
.segmented button {
  flex:1;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  border-radius:11px;
  font-size:13px;
  white-space:nowrap;
  color:#7f9185;
  transition:background .15s;
}
.segmented button[aria-pressed="true"] {
  background:var(--green);
  color:white;
  box-shadow:0 2px 4px #24725816;
}
.mode-tabs {
  margin-bottom:14px;
}
.mode-tabs .icon {
  width:18px;
  height:18px;
}
.board-wrap {
  position:relative;
  background:white;
  border:1px solid #e8ede4;
  border-radius:24px;
  box-shadow:0 5px 0 #e8eee370;
  overflow:hidden;
}
.board-top {
  height:46px;
  padding:10px 17px 0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:4px;
  color:#8b9a8a;
  font-size:10px;
}
.board-top #stroke-count {
  font-size:11px;
  background:#f5f7f1;
  border-radius:7px;
  padding:5px 8px;
  white-space:nowrap;
}
.board-top #guide-toggle {
  font-size:10px;
  padding:0;
  min-height:44px;
}
.board-top #guide-toggle .icon {
  width:17px;
  height:17px;
  margin-right:5px;
}
.board-label {
  font-size:10px;
  letter-spacing:.06em;
}
#board {
  display:block;
  width:100%;
  aspect-ratio:1;
  touch-action:none;
  user-select:none;
  -webkit-user-select:none;
  overflow:hidden;
  cursor:crosshair;
}
.grid-line {
  stroke:#eaf0e5;
  stroke-width:.35;
  stroke-dasharray:1 2;
}
.guide {
  fill:none;
  stroke:#e6eee4;
  stroke-width:6;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.user-ink,.demo-ink {
  fill:none;
  stroke:var(--ink);
  stroke-width:3.4;
  stroke-linecap:round;
  stroke-linejoin:round;
  pointer-events:none;
}
.start-marker {
  fill:var(--ink);
  stroke:white;
  stroke-width:.7;
  pointer-events:none;
}
.stroke-number {
  fill:white;
  font-size:4.5px;
  text-anchor:middle;
  font-family:Arial,sans-serif;
  pointer-events:none;
  font-weight:700;
}
.direction-marker {
  stroke:#557c6b;
  stroke-width:.7;
  fill:none;
  stroke-linecap:round;
  stroke-linejoin:round;
  pointer-events:none;
}
.instruction {
  text-align:center;
  margin:15px 0 0;
  font-size:11px;
  line-height:1.8;
  color:#7c8c7b;
  min-height:22px;
}
.practice-tools {
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:16px;
  padding-top:96px;
}
.practice-tools button {
  display:flex;
  align-items:center;
  flex-direction:column;
  justify-content:center;
  width:84px;
  gap:8px;
  min-height:64px;
  border-radius:15px;
  color:var(--green);
}
.practice-tools button:hover {
  background:#eaf0e3;
}
.practice-tools button>span {
  font-size:10px;
  white-space:nowrap;
  color:#748774;
}
.practice-tools .icon {
  width:24px;
  height:24px;
}
.free-actions {
  display:flex;
  justify-content:center;
  gap:10px;
  margin-top:12px;
}
.primary-button,.secondary-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:45px;
  border-radius:12px;
  padding:9px 18px;
  font-size:13px;
}
.primary-button {
  background:var(--green);
  color:white;
}
.secondary-button {
  background:#eef3e9;
  color:#618471;
}
.primary-button .icon,.secondary-button .icon {
  width:19px;
  height:19px;
}
.self-check-note {
  font-size:10px;
  color:#8d9789;
  text-align:center;
  line-height:1.7;
  margin-top:10px;
}
.success {
  position:static;
  margin:12px;
  border:1px solid #dce8d4;
  background:#fffffff5;
  border-radius:22px;
  padding:16px;
  text-align:center;
  box-shadow:0 10px 38px #284e3417;
}
.success-star {
  display:inline-block;
  font-size:36px;
  color:#e0ad3e;
  line-height:1;
}
.success h2 {
  font-size:25px;
  margin:5px 0;
}
.success p {
  font-size:11px;
  color:#7c927b;
  margin:7px 0 14px;
}
.success>div {
  display:flex;
  gap:9px;
  justify-content:center;
}
.success.animate {
  animation:arrive .4s ease-out;
}
.success.animate .success-star {
  animation:star .65s ease-out;
}
@keyframes arrive {
  from {
    transform:translateY(15px);
    opacity:0;
  }
  to {
    transform:translateY(0);
    opacity:1;
  }
}
@keyframes star {
  0% {
    transform:scale(.3) rotate(-30deg);
  }
  65% {
    transform:scale(1.3) rotate(10deg);
  }
  100% {
    transform:scale(1) rotate(0);
  }
}
dialog {
  background:#fafbf6;
  color:#294d46;
  border:1px solid #e0e8d8;
  border-radius:25px;
  padding:25px;
  max-width:540px;
  width:calc(100% - 30px);
  max-height:90dvh;
  overflow:auto;
  box-shadow:0 20px 100px #254a402b;
}
dialog::backdrop {
  background:#203e3555;
  backdrop-filter:blur(4px);
}
.dialog-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:15px;
  margin-bottom:17px;
}
.dialog-heading h2 {
  font-size:21px;
  margin-top:4px;
}
.picker-tabs {
  margin-bottom:17px;
}
.picker-tabs button {
  font-size:12px;
}
.kana-grid {
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:8px;
}
.kana-choice {
  height:55px;
  background:#fff;
  border:1px solid #e4eadf;
  border-radius:12px;
  font-size:25px;
  position:relative;
  padding-bottom:8px;
}
.kana-choice.practiced {
  background:#e9f4e8;
  border-color:#d4e6d0;
}
.kana-choice small {
  position:absolute;
  bottom:2px;
  left:0;
  right:0;
  font-size:9px;
  color:#d5a63f;
  letter-spacing:3px;
}
.kana-choice:hover {
  background:#dff0e3;
}
#help-dialog p {
  font-size:14px;
  line-height:1.9;
  margin-bottom:18px;
}
#help-dialog>a {
  font-size:13px;
  text-decoration:underline;
}
.storage-notice {
  background:#fff4d8;
  color:#80682e;
  padding:12px;
  border-radius:12px;
  font-size:12px;
  margin-top:20px;
}
#notice {
  position:fixed;
  bottom:24px;
  left:50%;
  transform:translate(-50%,15px);
  z-index:20;
  background:#315e50;
  color:white;
  padding:13px 20px;
  border-radius:16px;
  max-width:90%;
  width:max-content;
  font-size:13px;
  opacity:0;
  pointer-events:none;
  transition:opacity .2s,transform .2s;
}
#notice.visible {
  opacity:1;
  transform:translate(-50%,0);
}
@media(min-width:1050px) and (min-height:800px) {
  .vehicle-card {
    padding-top:20px;
    padding-bottom:18px;
  }
  .vehicle-card img {
    margin:8px 0 12px;
  }
  .home-intro {
    margin-top:12px;
    margin-bottom:34px;
  }
}
@media(max-width:1000px) {
  .app-shell {
    padding:23px 27px 15px;
  }
  .vehicle-grid {
    gap:12px;
  }
  .vehicle-card {
    padding:12px;
  }
  .card-bottom {
    font-size:12px;
  }
  .card-arrow {
    width:21px;
    height:21px;
  }
  .practice-layout {
    grid-template-columns:180px minmax(250px,1fr) 65px;
    gap:20px;
  }
  .practice-tools button {
    width:65px;
  }
  .word-panel {
    padding-top:59px;
  }
  .word-picture h2 {
    font-size:15px;
  }
  .letter {
    min-width:44px;
    font-size:18px;
  }
  .journey-badge {
    margin-right:10px;
  }
  .home-intro h1 {
    font-size:32px;
  }
}
@media(max-width:760px) {
  .app-shell {
    padding:20px 20px 13px;
  }
  .topbar {
    margin-bottom:25px;
  }
  .vehicle-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:14px;
  }
  .vehicle-card {
    padding:15px;
  }
  .card-bottom {
    font-size:14px;
  }
  .home-intro {
    margin-bottom:25px;
  }
  .home-intro p {
    font-size:11px;
    line-height:1.9;
    max-width:280px;
  }
  .journey-badge {
    display:none;
  }
  .home-bottom {
    grid-template-columns:1fr;
    gap:18px;
  }
  .gentle-note {
    justify-content:center;
    margin-top:4px;
  }
  .practice-layout {
    grid-template-columns:minmax(0,1fr);
    gap:15px;
  }
  .word-panel {
    padding:0;
    display:grid;
    grid-template-columns:115px 1fr;
    column-gap:15px;
    align-items:center;
  }
  .word-picture {
    grid-row:1/3;
    padding:4px 5px 9px;
    border-radius:16px;
  }
  .word-picture img {
    height:62px;
    object-fit:contain;
  }
  .word-picture h2 {
    font-size:11px;
    margin:0;
  }
  .word-picture p {
    display:none;
  }
  .single-kana {
    font-size:49px;
    height:64px;
  }
  .word-letters {
    margin:0;
    gap:5px;
  }
  .letter {
    min-width:44px;
    height:44px;
    min-height:44px;
    font-size:18px;
  }
  .practice-stars {
    margin:5px 0 0;
  }
  .practice-stars p,.practice-stars small {
    display:none;
  }
  .stars {
    gap:8px;
  }
  .stars>span {
    width:26px;
    height:26px;
    font-size:20px;
  }
  .practice-tools {
    padding:0;
    flex-direction:row;
    justify-content:space-around;
    gap:5px;
    order:3;
  }
  .practice-tools button {
    width:75px;
    min-height:57px;
    gap:6px;
  }
  .practice-heading {
    margin-bottom:17px;
  }
  .practice-heading h1 {
    font-size:22px;
  }
  .practice-heading .eyebrow {
    font-size:10px;
  }
  .board-top {
    height:39px;
    padding:5px 13px 0;
  }
  .board-wrap {
    border-radius:21px;
  }
  .mode-tabs {
    margin-bottom:10px;
  }
  .instruction {
    margin-top:10px;
  }
  .writing-panel {
    max-width:560px;
    justify-self:center;
    width:100%;
  }
  .self-check-note {
    max-width:350px;
    margin-left:auto;
    margin-right:auto;
  }
  footer {
    flex-direction:column;
    text-align:center;
    gap:12px;
    margin-top:23px;
    font-size:9px;
  }
}
@media(max-width:420px) {
  .app-shell {
    padding:15px 15px 12px;
  }
  .brand {
    font-size:16px;
    gap:10px;
  }
  .brand-mark {
    width:43px;
    height:46px;
    font-size:31px;
  }
  .header-actions {
    gap:7px;
  }
  .total-stars {
    padding:7px 11px;
    min-width:61px;
    font-size:16px;
  }
  .header-actions .icon-button {
    background:transparent;
  }
  .home-intro h1 {
    font-size:31px;
  }
  .home-intro p {
    font-size:10px;
  }
  .vehicle-card {
    padding:12px 11px;
  }
  .card-bottom {
    font-size:12px;
  }
  .card-top {
    font-size:9px;
  }
  .home-bottom {
    margin-top:18px;
  }
  .kana-banner {
    font-size:13px;
    gap:10px;
    padding:14px;
  }
  .practice-heading {
    gap:9px;
  }
  .practice-heading h1 {
    font-size:19px;
  }
  .char-sound {
    gap:7px;
  }
  .char-sound>span {
    font-size:22px;
  }
  .char-sound .icon {
    width:20px;
  }
  .word-panel {
    grid-template-columns:100px 1fr;
    gap:7px;
  }
  .word-letters {
    gap:3px;
  }
  .letter {
    min-width:44px;
    min-height:44px;
    font-size:17px;
  }
  .board-label {
    font-size:9px;
  }
  .success {
    padding:12px;
  }
  .success h2 {
    font-size:21px;
  }
  .success-star {
    font-size:30px;
  }
}
@media(min-width:761px) {
  .vehicle-card {
    padding:14px 16px;
  }
  .vehicle-card img {
    height:115px;
    margin:4px 0 9px;
  }
  .home-intro {
    margin-top:0;
    margin-bottom:25px;
  }
  .topbar {
    margin-bottom:25px;
  }
  .practice-layout {
    grid-template-columns:210px minmax(260px,min(540px,calc(100dvh - 380px))) 80px;
    gap:30px;
  }
}
@media(min-width:761px) and (max-width:1000px) {
  .practice-layout {
    grid-template-columns:170px minmax(250px,1fr) 65px;
    gap:18px;
  }
  .vehicle-card {
    padding:12px;
  }
  .vehicle-card img {
    height:98px;
  }
}
.letter {
  min-width:44px;
  min-height:44px;
}
.board-top #guide-toggle {
  min-height:44px;
}
.board-top:has(#guide-toggle:not([hidden])) {
  height:49px;
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    animation:none!important;
    transition:none!important;
    scroll-behavior:auto!important;
  }
}

/* A visible state avoids confusing the sound toggle with a play button. */
#sound {
  width:auto;
  padding:8px 10px;
  display:flex;
  justify-content:center;
  gap:6px;
}
.sound-label { font-size:12px; font-weight:700; white-space:nowrap; }
#sound[aria-pressed="false"] { background:#eee9df; color:#625748; }
@media(max-width:420px) {
  .brand { font-size:14px; gap:7px; }
  .brand-mark { width:36px; height:42px; }
  .header-actions { gap:5px; }
  #sound { flex-direction:column; gap:1px; padding:3px 5px; }
  .sound-label { font-size:10px; }
}

/* Keep the writing surface separate from the child's hand and the tools.
   Only CSS placement changes on rotation: the existing ink nodes stay put. */
@media(min-width:700px) and (max-width:1366px) and (min-height:600px) {
  .app-shell {
    --tablet-side:260px;
    --tablet-left:max(16px,env(safe-area-inset-left));
    --tablet-right:max(16px,env(safe-area-inset-right));
    /* Reserve 112px header, 48px board top, 24px instruction and 26px gaps/padding. */
    --tablet-board:min(720px,calc(100vh - 210px - env(safe-area-inset-top) - env(safe-area-inset-bottom)),calc(100vw - var(--tablet-left) - var(--tablet-right) - var(--tablet-side) - 16px));
    --tablet-board:min(720px,calc(100dvh - 210px - env(safe-area-inset-top) - env(safe-area-inset-bottom)),calc(100vw - var(--tablet-left) - var(--tablet-right) - var(--tablet-side) - 16px));
    max-width:none;
    padding: max(8px,env(safe-area-inset-top)) var(--tablet-right) max(8px,env(safe-area-inset-bottom)) var(--tablet-left);
  }
  .app-shell button, dialog button { min-width:48px; min-height:48px; }
  .topbar { height:48px; margin-bottom:4px; }
  .brand { min-height:48px; }
  .brand-mark { width:42px; height:44px; font-size:30px; }
  .icon-button { width:48px; height:48px; }
  .total-stars { padding:6px 14px; }
  #sound { background:white; min-width:106px; }
  #sound[aria-pressed="false"] { background:#eee9df; }
  .practice-heading { min-height:48px; margin-bottom:4px; gap:10px; }
  .practice-heading h1 { font-size:21px; margin:0; }
  .practice-heading .eyebrow { display:none; }
  .home-link { width:48px; height:48px; }
  .char-sound { padding:0 12px; min-height:48px; background:#e6f2e7; border-radius:14px; }
  .char-sound>span { font-size:23px; }
  .practice-layout {
    display:grid;
    grid-template-columns:var(--tablet-side) minmax(0,var(--tablet-board));
    grid-template-rows:auto auto auto auto auto;
    gap:8px 16px;
    align-items:start;
    justify-content:center;
  }
  .writing-panel { display:contents; }
  .word-panel { display:block; grid-column:1; grid-row:1; padding:0; min-width:0; }
  .word-picture { padding:4px; border-radius:14px; }
  .word-picture img { height:40px; object-fit:contain; }
  .word-picture h2 { font-size:16px; line-height:22px; margin:0; }
  .word-picture p { display:none; }
  .single-kana { font-size:42px; height:40px; line-height:40px; }
  .word-letters { gap:4px; margin-top:8px; }
  .letter { width:48px; height:48px; font-size:23px; }
  .practice-stars { margin-top:8px; }
  .practice-stars p,.practice-stars small { display:none; }
  .stars { gap:8px; }
  .stars>span { width:26px; height:26px; font-size:21px; }
  .mode-tabs { grid-column:1; grid-row:2; margin:0; padding:3px; }
  .mode-tabs button { gap:5px; font-size:14px; }
  .board-wrap { grid-column:2; grid-row:1 / 5; width:100%; border-radius:20px; }
  .board-top,.board-top:has(#guide-toggle:not([hidden])) { height:48px; padding:0 14px; }
  .board-top #stroke-count,.board-label { font-size:13px; }
  .board-top #guide-toggle { font-size:13px; min-height:48px; }
  .instruction { grid-column:2; grid-row:5; margin:0; font-size:13px; min-height:24px; }
  .practice-tools {
    grid-column:1; grid-row:3; display:grid; grid-template-columns:repeat(2,minmax(0,1fr));
    padding:0; gap:8px; width:100%;
  }
  .practice-tools button { width:100%; min-height:48px; flex-direction:row; gap:6px; background:#edf3e8; border:1px solid #e0e9dc; border-radius:12px; }
  .practice-tools button>span { font-size:13px; color:#476a59; }
  .practice-tools .icon { width:20px; height:20px; }
  .free-actions { grid-column:1; grid-row:4; margin:0; flex-wrap:wrap; gap:6px; }
  .free-actions button { flex:1; min-height:48px; padding:8px; font-size:13px; white-space:nowrap; }
  .self-check-note { grid-column:1; grid-row:5; margin:0; font-size:11px; }
  .app-shell:has(.practice-layout)>footer { display:none; }
  .home-intro { margin:24px 0; }
  .vehicle-card { min-height:190px; }
  .vehicle-card img { height:110px; }
  .kana-choice { font-size:24px; }
}
@media(min-width:700px) and (max-width:1366px) and (min-height:600px) and (orientation:portrait) {
  .app-shell { --tablet-side:180px; }
  .mode-tabs { flex-direction:column; }
  .practice-tools button { flex-direction:column; gap:3px; min-height:58px; }
  .practice-tools button>span { font-size:12px; }
  .free-actions { flex-direction:column; }
}
