@media (max-width: 670px) {
  .header-inner { flex-wrap: wrap; justify-content: center; padding-top: 18px; gap: 0; }
  .header-inner nav { width: 100%; height: auto; min-height: 44px; justify-content: space-between; gap: 4px; }
  .header-inner nav :is(button, a) { font-size: clamp(.82rem, 2.45vw, 1rem); line-height: 1.1; padding: 6px 2px; }
  .header-inner nav :is(button, a)[aria-current="page"]:after { bottom: 1px; }
}
.atlas-sheet, .river-surface {
  border-radius: 9px; border: 1px solid #c7cdbd; overflow: hidden; position: relative;
  background: #f1f3e6;
}
.province-sheet { width: 100%; height: auto; display: block; }
.province-sheet path {
  fill: #d7dfcf; stroke: #faf8ed; stroke-width: 1; vector-effect: non-scaling-stroke;
  cursor: pointer; stroke-linejoin: round;
}
.province-sheet path.examined { stroke: #8d431e; stroke-width: 2.5; }
.province-sheet path:hover { stroke: #384e46; stroke-width: 2; }
.registry-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, .48fr); gap: 16px; align-items: start; }
.dis-kutuk .registry-heading h2 { margin-bottom: 4px; }
.registry-heading {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
  gap: .75rem 1.5rem; margin-bottom: 1rem;
}
.registry-summary { min-width: 0; overflow-wrap: anywhere; }
.registry-heading .dis-controls {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  width: 24rem;
  margin: 0;
}
.registry-heading .dis-field, .registry-heading select { min-width: 0; }
.registry-total { margin: 0; color: var(--muted); }
@media (max-width: 760px) {
  .registry-heading { grid-template-columns: minmax(0, 1fr); }
  .registry-heading .dis-controls { width: 100%; gap: .5rem; }
  .registry-heading select { font-size: .94rem; padding-left: 8px; }
}
.registry-key { display: flex; flex-wrap: wrap; gap: 5px 12px; padding: 8px 12px; background: #fbfaf2; font-size: .84rem; }
.registry-key span, .river-legend { display: inline-flex; align-items: center; gap: .35rem; }
.registry-key span::before { content: ""; width: .85rem; height: .85rem; background: var(--swatch); border-radius: 3px; }
.registry-side { min-width: 0; container: registry-side / inline-size; font-size: clamp(1.25rem, 2vw, 1.7rem); }
.river-result { display: flex; align-items: baseline; flex-wrap: wrap; gap: .3rem 1rem; color: var(--muted); margin: .55rem 0; }
.river-result strong { color: #1d564a; font-size: clamp(1.2rem, 2vw, 1.6rem); }
.registry-result { display: flow-root; }
.card-share {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  padding: 0; flex: none; border-radius: 50%; background: #f1f3e8; color: var(--green);
}
.card-share:hover, .card-share:focus-visible { background: #e1e9d9; }
.dis-panel { position: relative; --share-inset: clamp(1rem, 3vw, 2rem); }
.dis-panel .card-share {
  position: absolute; inset-block-start: var(--share-inset); inset-inline-end: var(--share-inset);
}
.dis-content > .dis-controls, .dis-content > .registry-heading, .registry-guess h2 {
  margin-inline-end: 52px;
}
.map-frame > .card-share { position: absolute; top: 6px; right: 6px; }
.map-frame .compass { top: 55px; pointer-events: none; }
.map-frame .map-toolbar { max-width: calc(100% - 64px); }
.pair-heading, .table-heading { position: relative; padding-inline-end: 52px; min-height: 44px; }
.pair-heading > .card-share, .table-heading > .card-share { position: absolute; top: 0; right: 0; }
.scatter-heading #expand-chart { margin-inline-start: auto; }
@media (max-width: 720px) {
  .scatter-heading { flex-direction: column-reverse; align-self: start; }
}
@media (max-width: 600px) {
  .dis-panel { --share-inset: .8rem; }
  .dis-kutuk .registry-heading { margin-inline-end: 0; }
  .dis-kutuk .registry-summary { margin-inline-end: 52px; }
}
.registry-sentence {
  margin: 0; font-size: inherit;
  line-height: 1.6; font-weight: 500; color: var(--ink);
  min-block-size: 2lh;
}
@container registry-side (max-width: 15em) {
  .registry-sentence { min-block-size: 3lh; }
}
.registry-rank { font-size: 1rem; }
.registry-ending { white-space: nowrap; }
.registry-sentence strong {
  color: #174d40;
  font-size: 1.16em;
  font-weight: 750;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.registry-inline-picker {
  position: relative; display: inline-block; padding-right: .8em;
  color: var(--green); text-decoration: underline dashed; text-underline-offset: .23em; white-space: nowrap;
}
.registry-inline-picker::after {
  content: ""; position: absolute; right: .12em; top: 45%; width: .28em; height: .28em;
  border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); pointer-events: none;
}
.registry-inline-picker select { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; opacity: 0; cursor: pointer; }
.registry-inline-picker:focus-within { outline: 2px solid #aa692f; outline-offset: 2px; border-radius: 3px; }
.registry-rank-header { display: flex; align-items: center; gap: .3rem; margin-top: .6rem; }
.registry-rank h3 { font-size: 1rem; margin: 0; }
.registry-rank-toggle { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border-radius: 50%; color: var(--green); }
.registry-rank-toggle:hover, .registry-rank-toggle:focus-visible { background: #e5eddf; }
.registry-rank-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.registry-rank-toggle .ascending { transform: rotate(180deg); }
.rank-strip { display: flex; width: 100%; justify-content: space-between; gap: 8px; margin: 4px 0; padding: 5px 8px; color: #254539; border-radius: 3px; font-size: .9rem; background: linear-gradient(to right,#e0ead9 var(--amount),#f4f4ea var(--amount)); }
.exp-quiet { border: 1px solid #aebcac; border-radius: 5px; padding: .5rem .8rem; }
.exp-quiet:disabled { opacity: .5; }
.exp-instruction, .exp-date { color: var(--muted); margin: 0 0 .75rem; }
.exp-date { color: #806134; font-weight: 600; font-size: .9rem; }
.game-heading { font-size: clamp(1.55rem, 3vw, 2.1rem); line-height: 1.15; margin: 0 0 .3rem; }
.dis-komsu .atlas-sheet { margin: 0 0 .8rem; }
.dis-komsu .province-sheet { max-height: 405px; }
.province-sheet .neighbor { fill: #a7c6ab; }
.province-sheet .visited { fill: #538b78; }
.province-sheet .current { fill: #164f49; }
.province-sheet .goal { fill: #be783e; }
.route-status { color: #214c40; font-weight: 600; min-height: 1.5em; }
.game-trail { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 3px 7px; margin: .4rem 0; padding: 0; font-size: .93rem; }
.game-trail li:not(:first-child)::before { content: "›"; margin-right: 7px; color: #826b41; }
.river-surface { background: #e8ede1; }
.river-canvas { display: block; width: 100%; height: clamp(220px,39vw,485px); cursor: crosshair; }
.river-legend { position: absolute; pointer-events: none; bottom: 8px; left: 8px; background: #fffdf2ee; color: #214a51; font-size: .82rem; padding: 4px 8px; border-radius: 4px; }
.river-legend::before { content: ""; width: 1.1rem; height: 2px; background: #347e91; }
.river-result:empty { margin: 0; }
@media (max-width: 760px) { .registry-layout { grid-template-columns: minmax(0,1fr); } }

.game-heading .game-target { color: #965b2f; }
.your-route { stroke: #164f49; stroke-width: 4; stroke-linejoin: round; }
.shortest-route { stroke: #da9d39; stroke-width: 2.4; stroke-dasharray: 4 3; }
.route-key { display: flex; flex-wrap: wrap; gap: .3rem 1rem; padding: .35rem .75rem; font-size: .86rem; }
.route-key span::before { content: ""; display: inline-block; width: 1rem; border-top: 3px solid #164f49; margin-right: .3rem; vertical-align: middle; }
.route-key span + span::before { border-top: 3px dashed #b77419; }

.registry-guess { max-width: 36rem; margin: clamp(1rem,4vw,3rem) auto; }
.registry-guess label, .registry-guess input { display: block; }
.registry-guess label { color: var(--muted); margin: 1.3rem 0 .75rem; }
.registry-guess input { width: min(100%,18rem); border: 1px solid #aebbac; border-radius: .4rem; padding: .7rem; margin-top: .3rem; font: inherit; color: var(--green); }
.registry-guess .action { background: var(--green); color: #fff; }
.registry-shared-actions { font-size: 1rem; }
.registry-shared-layout .registry-sentence { min-block-size: 0; }
.registry-shared-actions:not(:empty) { margin: .65rem 0 .9rem; }
.registry-shared-actions .dis-field {
  display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .75rem;
  padding: .65rem .75rem; border-radius: .5rem; background: #eef2e7;
  color: #284d40; font-size: .95rem; font-weight: 600;
}
.registry-shared-actions select { min-width: 0; flex: 1 1 9rem; width: auto; }
@media (max-width: 760px) {
  .registry-shared-layout .registry-side { display: contents; }
  .registry-shared-layout .registry-result { grid-row: 1; }
  .registry-shared-layout .atlas-sheet { grid-row: 2; }
  .registry-shared-layout .registry-shared-actions { margin-bottom: 0; }
}
.registry-verdict { color: #235949; margin: .25rem 0 .85rem; }
