/* Weekly companion to Version A / Soft Studio. */
html[data-page="weekly"],
html[data-page="weekly"] body {
  min-width: 320px;
  min-height: 100%;
  color: #2c4352;
  background: #edf4f5;
}

.weekly-view {
  --ink: #2c4352;
  --muted: #536875;
  --line: #cbdcdf;
  --surface: #edf4f5;
  --tray: #e2e9e7;
  --cream: #faf6ec;
  --target: #e7e3f0;
  --target-edge: #c8c0da;
  --target-ink: #444269;
  --action: #4f4058;
  --selection-ring: #57465f;
  --blue: #c3e5fa;
  --blue-ink: #173e59;
  --blue-edge: #649ab9;
  --yellow: #ffe180;
  --yellow-ink: #624c06;
  --yellow-edge: #b6962e;
  --red: #efada1;
  --red-ink: #702a23;
  --red-edge: #b3675b;
  --green: #acdfbc;
  --green-ink: #1b5035;
  --green-edge: #579773;
  min-height: 100svh;
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink);
}

.weekly-view button,
.weekly-view a {
  font: inherit;
  touch-action: manipulation;
}
.weekly-view button:focus-visible,
.weekly-view a:focus-visible {
  outline: 3px solid var(--selection-ring);
  outline-offset: 4px;
}
.weekly-view button:disabled { cursor: default; }
.mobile-week-label { display: none; }
.preview-progress-note { display: block; margin-top: 7px; }
.word-scroll-hint { display: none; margin: 10px 0 -8px; color: var(--target-ink); font-size: 11px; }
.phrase-workspace.has-long-word .word-scroll-hint { display: block; }
.weekly-load-error { max-width: 560px; margin: 48px auto; padding: 24px; border: 1px solid var(--target-edge); border-radius: 16px; background: var(--target); }
.weekly-load-error p { margin-block: 16px 24px; }
.weekly-load-error .today-link { margin-left: 14px; }

.weekly-shell {
  width: min(1120px, 100%);
  margin-inline: auto;
  padding: 0 38px 36px;
}
.weekly-header {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 86px;
}
.clueroll-brand { display: block; flex: 0 0 auto; width: 190px; }
.clueroll-brand img { display: block; width: 100%; height: auto; }
.weekly-edition {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .13em;
}
.weekly-edition span { font-size: 10px; letter-spacing: .05em; }
.weekly-navigation { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.weekly-view .today-link,
.weekly-view .weekly-help-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 6px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}
.today-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.weekly-view .weekly-help-link { font-weight: 650; }
.weekly-help-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.weekly-help { box-sizing: border-box; width: min(560px, calc(100% - 24px)); max-height: calc(100svh - 32px); overflow-y: auto; padding: 24px; border: 2px solid #57465f; border-radius: 18px; background: #faf6ec; color: #2c4352; font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.weekly-help::backdrop { background: #20323d80; }
.weekly-help form { display: flex; justify-content: flex-end; position: sticky; top: -24px; background: #faf6ec; }
.weekly-help-close { min-height: 44px; padding: 8px 12px; border: 0; background: transparent; color: #4f4058; font: inherit; font-weight: 750; cursor: pointer; }
.weekly-help-close:focus-visible { outline: 2px solid #57465f; outline-offset: 2px; }
.weekly-help h2 { margin: 0 0 12px; }
.weekly-help ol { padding-left: 22px; }
.weekly-help li { margin: 14px 0; }
.weekly-help-note { padding: 12px; border-radius: 10px; background: #e2e9e7; font-size: 13px; }

.weekly-board {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  grid-template-areas: "heading heading" "phrase pool" "phrase week" "actions actions";
  gap: 18px 24px;
  align-items: start;
  max-width: 1000px;
  margin-inline: auto;
}
.weekly-heading {
  grid-area: heading;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 0 6px;
}
.weekly-kicker,
.section-label {
  margin: 0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}
.weekly-kicker { margin-bottom: 8px; color: var(--muted); }
.weekly-heading h1 { margin: 0; font-size: 30px; font-weight: 800; line-height: 1.15; letter-spacing: -.035em; }
.weekly-heading p:last-child { margin: 9px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.weekly-collected {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 0 0 auto;
  min-height: 62px;
  padding: 10px 18px;
  color: #fffaf1;
  border: 1px solid #26545d;
  border-radius: 13px;
  background: #2f5c64;
  box-shadow: 0 3px 0 #a7bcbc, inset 0 1px 0 #ffffff18;
}
.weekly-collected > span { font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.weekly-collected strong { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.weekly-collected small { font-size: 12px; font-weight: 700; }

/* Weekly-specific guidance lives in the existing heading, not in the word board. */
.weekly-heading.has-clue { flex-wrap: wrap; row-gap: 10px; }
.weekly-heading-title { flex: 1 1 140px; min-width: 0; }
.weekly-clue { flex: 0 0 100%; min-width: 0; border-top: 1px solid #cbd8da; }
.weekly-clue-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.weekly-clue-heading h2 { color: var(--muted); }
.weekly-hint-toggle { min-width: 108px; min-height: 44px; border: 0; padding: 8px 0 8px 12px; background: transparent; color: #2f5c64; font: inherit; font-size: 12px; font-weight: 750; cursor: pointer; }
.weekly-hint-toggle span { margin-left: 6px; }
.weekly-hint-toggle:focus-visible { outline: 2px solid #57465f; outline-offset: 2px; border-radius: 5px; }
.weekly-heading .weekly-clue-text { margin: 0; max-width: 68ch; font-size: 15px; line-height: 1.5; color: var(--ink); }
.weekly-heading .weekly-word-hint { margin: 12px 0 0; padding: 10px 12px; border-left: 3px solid #e1b64a; border-radius: 0 8px 8px 0; background: #f5ecd6; color: #42565c; font-size: 13px; line-height: 1.5; }
.weekly-word-hint[hidden] { display: none; }

.phrase-workspace {
  grid-area: phrase;
  align-self: stretch;
  min-width: 0;
  padding: 20px 24px 18px;
  border: 1px solid var(--target-edge);
  border-radius: 16px;
  background: var(--target);
  box-shadow: 0 3px 0 #beb7ce, inset 0 2px 0 #f6f2fc;
}
.phrase-stack {
  --slot-size: 44px;
  --slot-gap: 7px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  gap: 12px;
  width: min(100%, calc(var(--longest-word) * var(--slot-size) + (var(--longest-word) - 1) * var(--slot-gap) + 8px));
  max-width: 100%;
  margin: 0 auto 25px;
}
.phrase-word-group {
  display: flex;
  gap: var(--slot-gap);
  width: max-content;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 4px 4px 7px;
  margin-block: -4px -7px;
  scrollbar-width: thin;
  scrollbar-color: #a79abb transparent;
  scroll-padding-inline: 4px;
}
.phrase-slot,
.fragment-tile {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #afa2ca;
  border-radius: 10px;
  background: #faf7ff;
  color: var(--target-ink);
  box-shadow: 0 3px 0 #afa2ca, inset 0 2px 0 #fffafc;
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
}
.weekly-view .phrase-slot,
.weekly-view .fragment-tile { font-size: 24px; font-weight: 750; line-height: 1; }
.phrase-slot:not(.has-fragment)::after {
  content: "";
  width: 10px;
  height: 2px;
  border-radius: 2px;
  background: #b8adcc;
  transform: translateY(5px);
}
.phrase-slot.is-misplaced {
  color: var(--yellow-ink);
  border-color: var(--yellow-edge);
  background: var(--yellow);
  box-shadow: 0 3px 0 var(--yellow-edge), inset 0 2px 0 #fff3b7;
}
.phrase-slot.is-absent {
  color: var(--red-ink);
  border-color: var(--red-edge);
  background: var(--red);
  box-shadow: 0 3px 0 var(--red-edge), inset 0 2px 0 #ffe0d8;
}
.phrase-slot:not(:disabled):hover,
.fragment-tile:not(.is-future):hover { transform: translateY(-2px); }
.fragment-tile.is-selected {
  color: var(--blue-ink);
  background: var(--blue);
  border-color: var(--selection-ring);
  box-shadow: inset 0 0 0 2px var(--selection-ring), 0 3px 0 var(--blue-edge);
  transform: translateY(-2px);
}
.fragment-tile.is-selected::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 4px;
  border: 3px solid transparent;
  border-top-color: var(--selection-ring);
}
.phrase-slot.is-locked {
  color: var(--green-ink);
  border-color: var(--green-edge);
  background: var(--green);
  box-shadow: 0 3px 0 var(--green-edge), inset 0 2px 0 #d5f0dc;
  transform: none;
}
.phrase-slot.is-locked::after {
  content: "";
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 8px;
  height: 9px;
  background: var(--green-ink);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5 7V5a3 3 0 0 1 6 0v2' fill='none' stroke='black' stroke-width='2'/%3E%3Crect x='3' y='7' width='10' height='8' rx='2'/%3E%3C/svg%3E") center / contain no-repeat;
}
.phrase-slot:not(:disabled):active,
.fragment-tile:not(.is-future):active { transform: translateY(1px); }
.phrase-state-key { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 15px; color: #554e68; font-size: 10px; }
.phrase-state-key > span { display: flex; align-items: center; gap: 5px; }
.phrase-state-key i { display: inline-block; width: 9px; height: 9px; border: 1px solid; border-radius: 3px; }
.state-selected { background: var(--blue); border-color: var(--blue-edge) !important; }
.state-loose { background: var(--yellow); border-color: var(--yellow-edge) !important; }
.state-absent { background: var(--red); border-color: var(--red-edge) !important; }
.state-locked { background: var(--green); border-color: var(--green-edge) !important; }
.phrase-bottom { display: grid; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid #cec7db; color: var(--target-ink); }
.locked-count { font-size: 11px; }
.locked-count b { font-size: 15px; }
.arrangement-progress { display: flex; align-items: center; gap: 10px; }
.arrangement-progress > span { flex: 1; height: 5px; overflow: hidden; border-radius: 10px; background: #d1cadd; }
.arrangement-progress > span::before {
  content: "";
  display: block;
  width: calc((var(--placed) / max(var(--collected), 1)) * 100%);
  height: 100%;
  border-radius: inherit;
  background: #797095;
  transition: width .18s ease;
}
.arrangement-progress small { font-size: 10px; font-variant-numeric: tabular-nums; }

.fragment-pool-boundary { display: contents; }
.fragment-pool { grid-area: pool; min-width: 0; padding: 18px; border-radius: 16px; background: var(--tray); }
.pool-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pool-available { color: var(--muted); font-size: 11px; white-space: nowrap; }
.fragment-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px 7px; align-content: start; min-height: 206px; margin: 18px 0 0; }
.fragment-tile {
  width: 100%;
  height: 44px;
  border-color: #d3c7ae;
  color: var(--ink);
  background: #fff5df;
  box-shadow: 0 3px 0 #a7bcbc, inset 0 2px 0 #fffcf5;
}
.fragment-tile.is-future { color: #7b878a; border-color: #c7d2d0; background: #dce4e2; box-shadow: 0 3px 0 #bdcac7, inset 0 2px 0 #eaf0ed; }
.weekly-view .fragment-tile.is-future { font-size: 18px; font-weight: 600; }
.fragment-tile.is-future small { position: absolute; right: 4px; bottom: 3px; color: #607074; font-size: 7px; font-weight: 600; }
.pool-helper { min-height: 36px; margin: 16px 0 12px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.pool-helper.is-error { color: #923c32; }
.pool-helper.is-success { color: var(--green-ink); }
.pool-tools { display: flex; }
.weekly-view .pool-tools button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 42px;
  padding: 8px;
  border: 1px solid #c5b89e;
  border-radius: 11px;
  color: #54493c;
  background: #f5ebd8;
  box-shadow: 0 3px 0 #b4ac9d, inset 0 2px 0 #fffaf1;
  font-size: 12px;
  font-weight: 750;
}
.pool-tools button:disabled { background: #ece8e0; color: #79746a; border-color: #d8d0c1; box-shadow: 0 2px 0 #d0c9bd; }
.pool-tools button:not(:disabled):active { transform: translateY(2px); }

.week-rail { grid-area: week; min-width: 0; padding: 15px 16px 13px; border-radius: 13px; background: #fbf4e5; box-shadow: 0 3px 0 #a7bcbc; }
.week-rail-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.week-rail-heading h2 { margin: 0; font-size: 15px; font-weight: 800; letter-spacing: -.025em; }
.week-rail-heading > span { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.week-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; margin: 14px 0 12px; padding: 0; list-style: none; }
.week-day { display: grid; justify-items: center; gap: 7px; min-width: 0; }
.day-marker { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid #d3cdc0; border-radius: 9px; background: #ece8df; color: #797971; box-shadow: 0 2px 0 #c9c3b7; font-size: 12px; font-weight: 700; }
.week-day.is-complete .day-marker { color: var(--green-ink); background: #e7f0df; border-color: #a5bd9d; box-shadow: 0 2px 0 #8da78f; }
.week-day.is-today .day-marker { border-color: var(--selection-ring); box-shadow: inset 0 0 0 1px var(--selection-ring), 0 2px 0 var(--selection-ring); }
.day-copy { display: flex; }
.day-copy b { font-size: 8px; font-weight: 750; letter-spacing: .04em; color: var(--muted); }
.day-copy small, .day-count { display: none; }
.week-note { margin: 0; padding-top: 10px; border-top: 1px dashed #d9d3c5; font-size: 11px; line-height: 1.45; color: var(--muted); }

.weekly-actions { grid-area: actions; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 3px; }
.weekly-actions p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.weekly-view .weekly-primary {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  min-height: 48px;
  min-width: 232px;
  padding: 10px 18px;
  border: 1px solid #47374f;
  border-radius: 12px;
  background: var(--action);
  color: #fffaf1;
  box-shadow: 0 3px 0 #35293f, inset 0 1px 0 #ffffff20;
  font-size: 13px;
  font-weight: 750;
}
.weekly-primary:not(:disabled):hover { background: #604e6b; }
.weekly-primary:not(:disabled):active { transform: translateY(2px); box-shadow: 0 1px 0 #35293f; }
.weekly-primary:disabled { color: var(--green-ink); background: #e7f0df; border-color: var(--green-edge); box-shadow: 0 3px 0 var(--green-edge); }

@media (max-width: 1000px) {
  .weekly-shell { padding-inline: 24px; }
  .weekly-board { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; }
  .phrase-workspace { padding-inline: 18px; }
  .phrase-stack { --slot-gap: 5px; }
  .fragment-pool { padding-inline: 14px; }
  .fragment-grid { grid-template-columns: repeat(auto-fit, minmax(44px, 1fr)); gap: 10px 5px; }
  .week-days { gap: 4px; }
  .day-marker { width: 29px; height: 29px; }
  .weekly-collected { flex-direction: column; gap: 6px; min-width: 105px; padding: 12px; }
}

@media (max-width: 760px) {
  .weekly-shell { padding: 0 max(12px, env(safe-area-inset-left, 0px)) calc(26px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-right, 0px)); }
  .weekly-header { min-height: 66px; gap: 4px 8px; flex-wrap: wrap; padding-block: 8px; }
  .clueroll-brand { width: 138px; }
  .weekly-edition { display: none; }
  .mobile-week-label { display: inline; }
  .weekly-navigation { justify-content: flex-end; gap: 8px; }
  .weekly-view .today-link, .weekly-view .weekly-help-link { font-size: 13px; padding-inline: 2px; }
  .weekly-board { grid-template-columns: minmax(0, 1fr); grid-template-areas: "heading" "phrase" "pool" "week" "actions"; gap: 16px; max-width: 480px; }
  .weekly-heading { padding: 3px 0 2px; gap: 14px; align-items: start; }
  .weekly-kicker { font-size: 8px; margin-bottom: 7px; }
  .weekly-heading h1 { max-width: 260px; font-size: 25px; }
  .weekly-heading p:last-child { font-size: 12px; line-height: 1.45; margin-top: 8px; }
  .weekly-heading .weekly-clue-text { font-size: 14px; line-height: 1.45; }
  .weekly-heading .weekly-word-hint { font-size: 12px; line-height: 1.5; margin-top: 10px; }
  .weekly-collected { min-width: 79px; min-height: 62px; gap: 8px; padding: 10px 8px; border-radius: 11px; }
  .weekly-collected > span { font-size: 8px; }
  .weekly-collected strong { font-size: 25px; }
  .weekly-collected small { font-size: 10px; }
  .phrase-workspace { padding: 15px 14px 13px; }
  .section-label { font-size: 9px; }
  .phrase-stack { gap: 10px; margin-block: 0 20px; }
  .phrase-stack { --slot-gap: 5px; }
  .phrase-slot { width: 44px; height: 44px; border-radius: 8px; }
  .weekly-view .phrase-slot { font-size: 22px; }
  .phrase-state-key { gap: 9px; font-size: 9px; }
  .phrase-bottom { margin-top: 12px; padding-top: 11px; gap: 5px; }
  .fragment-pool { padding: 16px; }
  .fragment-grid { gap: 8px 6px; min-height: 0; margin-top: 12px; }
  .fragment-tile { height: 44px; border-radius: 8px; }
  .weekly-view .fragment-tile { font-size: 22px; }
  .pool-helper { min-height: 36px; margin-top: 14px; }
  .week-rail { padding: 14px 16px; }
  .week-days { gap: 7px; }
  .day-marker { width: 32px; height: 32px; }
  .weekly-actions { flex-direction: column-reverse; gap: 16px; text-align: center; padding-top: 3px; }
  .weekly-view .weekly-primary { width: 100%; min-width: 0; }
  .weekly-actions p { font-size: 11px; }
}

@media (max-width: 400px) {
  .weekly-shell { padding-inline: 12px; }
  .phrase-workspace { padding-inline: 12px; }
  .fragment-pool { padding-inline: 13px; }
  .fragment-grid { gap: 10px 6px; }
}
@media (max-width: 350px) {
  .weekly-header { gap: 8px; }
  .clueroll-brand { width: 126px; }
  .weekly-heading h1 { font-size: 22px; }
  .weekly-collected { min-width: 73px; }
  .phrase-state-key { gap: 7px; font-size: 8px; }
  .fragment-grid { gap: 8px 5px; }
  .week-days { gap: 4px; }
}

/* Phone portrait: the same fragment pool stays within reach while the page scrolls. */
@media (max-width: 760px) and (orientation: portrait) {
  .weekly-shell { padding-bottom: calc(var(--pool-dock-height, 256px) + 36px); }
  .weekly-view { scroll-padding-bottom: calc(var(--pool-dock-height, 256px) + 16px); }
  .fragment-pool {
    position: fixed;
    z-index: 5;
    inset: auto max(8px, env(safe-area-inset-right, 0px)) 0 max(8px, env(safe-area-inset-left, 0px));
    width: min(480px, calc(100% - 16px));
    margin-inline: auto;
    padding: 12px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    border: 1px solid #b7cac6;
    border-bottom: 0;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -5px 20px #2c43521c;
  }
  .fragment-grid {
    max-height: 108px;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    align-content: start;
    padding: 3px 3px 5px;
    margin-top: 7px;
    scrollbar-width: thin;
    scrollbar-color: #9dafab transparent;
  }
  .pool-helper { min-height: 32px; margin: 7px 0; font-size: 11px; }
  .weekly-view .pool-tools button { min-height: 44px; }
  .weekly-view .phrase-slot { scroll-margin-block: 20px calc(var(--pool-dock-height, 256px) + 20px); }
}

/* Short phone landscape retains both established panels without a covering dock. */
@media (max-width: 1000px) and (max-height: 500px) and (orientation: landscape) {
  .weekly-header { min-height: 60px; }
  .clueroll-brand { width: 138px; }
  .weekly-edition { display: none; }
  .mobile-week-label { display: inline; }
  .weekly-board {
    max-width: 900px;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    grid-template-areas: "heading heading" "phrase pool" "phrase week" "actions actions";
    gap: 14px;
  }
  .weekly-heading h1 { max-width: none; }
  .phrase-workspace { padding-inline: 12px; }
  /* Sticky content is bounded by its own grid row, never the following progress card. */
  .fragment-pool-boundary { display: block; grid-area: pool; min-width: 0; align-self: stretch; }
  .fragment-pool { position: sticky; top: 8px; z-index: 2; padding: 12px; }
  .weekly-view .pool-tools button { min-height: 44px; }
  .fragment-grid { max-height: 108px; min-height: 0; overflow-y: auto; padding: 3px 3px 5px; margin-top: 8px; }
  .pool-helper { min-height: 32px; margin: 8px 0; font-size: 11px; }
  .weekly-actions { flex-direction: row; }
  .weekly-view .weekly-primary { width: auto; min-width: 180px; }
}
@media (max-width: 760px) and (max-height: 650px) and (orientation: portrait) {
  .fragment-grid { max-height: 58px; }
  .pool-helper { min-height: 28px; }
}

/* Keep whole words visible on compact screens. Short words keep 44px squares;
   only rows that need space narrow their cells. Height stays 44px for touch.
   Content validation caps every answer word at eight letters. */
@media (max-width: 1000px) {
  .phrase-stack { width: 100%; }
  .phrase-word-group {
    --slot-gap: 4px;
    display: grid;
    grid-template-columns: repeat(var(--word-length), minmax(0, 1fr));
    width: min(100%, calc(var(--word-length) * 44px + (var(--word-length) - 1) * var(--slot-gap)));
    overflow: visible;
    padding-inline: 0;
  }
  .phrase-word-group:is([data-word-length="9"], [data-word-length="10"], [data-word-length="11"]) { --slot-gap: 2px; }
  .weekly-view .phrase-slot { width: 100%; min-width: 0; height: 44px; }
  .phrase-word-group:is([data-word-length="9"], [data-word-length="10"], [data-word-length="11"]) .phrase-slot { font-size: 18px; }
  .phrase-workspace .word-scroll-hint { display: none; }
}
@media (max-width: 350px) {
  .weekly-shell { padding-inline: 8px; }
  .phrase-workspace { padding-inline: 8px; }
}
@media (max-width: 1000px) and (max-height: 500px) and (orientation: landscape) {
  .weekly-board { grid-template-columns: minmax(0, 1.7fr) minmax(160px, 1fr); }
  .week-days { gap: 3px; }
  .day-marker { width: min(26px, 100%); height: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .weekly-view *, .weekly-view *::before { transition: none !important; }
}
