/* Adapted from the approved site-proposal-2026-11-10/r5.css: preserve the approved composition and interaction. Production routes, accessibility and language changes stay here. */


html[data-r5] body { background-image: var(--washi, none); background-repeat: repeat; }


.layers { position: relative; margin: var(--space-6) 14px 0 0; isolation: isolate; }
.layers::before, .layers::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: var(--radius-md, 6px); }
.layers::before { background: var(--rikyu-stone); transform: translate(14px, calc(14px + var(--drift, 0) * 10px)); opacity: .55; }
.layers::after { border: 1px solid var(--rikyu-stone); background: color-mix(in srgb, var(--rikyu-shiro) 70%, var(--rikyu-stone));
  transform: translate(7px, calc(7px + var(--drift, 0) * 5px)); }
.paper { position: relative; background: var(--rikyu-shiro); background-image: var(--washi, none); border: 1px solid var(--rikyu-stone);
  border-radius: var(--radius-md, 6px); padding: var(--space-5) var(--space-5) var(--space-4); overflow: clip; overflow-clip-margin: 6px; }
.paper .cap { font-family: var(--font-mono); font-size: var(--t-small-size); color: var(--muted-foreground); margin: 0 0 var(--space-3); }


.smap { position: relative; height: var(--h, 360px); }
.smap svg.wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.smap .wires path, .smap .wires line { fill: none; stroke: var(--rikyu-nezumi); stroke-width: 1.25; vector-effect: non-scaling-stroke; }
.smap .wires .ret { stroke-dasharray: 5 5; }
.smap .wires .soft { stroke: var(--rikyu-stone); stroke-width: 6; stroke-linecap: round; }
.smap .wires .lit { stroke: var(--rikyu-kuro); stroke-width: 2; }
.smap .wires .tall { display: none; }
.smap .trav { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--rikyu-sabi);
  border: 1px solid var(--rikyu-kuro); pointer-events: none; z-index: 1; }

.smap:has([data-step~="1"]:is(:hover, :focus-visible)) .st[data-s="1"] i, .smap:has([data-step~="2"]:is(:hover, :focus-visible)) .st[data-s="2"] i,
.smap:has([data-step~="3"]:is(:hover, :focus-visible)) .st[data-s="3"] i, .smap:has([data-step~="4"]:is(:hover, :focus-visible)) .st[data-s="4"] i,
.smap:has([data-step~="5"]:is(:hover, :focus-visible)) .st[data-s="5"] i { background: var(--rikyu-kuro); }

.smap .node.dim { color: var(--muted-foreground); border-color: var(--rikyu-nezumi); border-style: dashed; }
.smap .node.pill { width: auto; height: 36px; border-radius: 18px; padding: 0 var(--space-3); font-family: var(--font-sans); white-space: nowrap; }
html[data-r5]:not([data-dir]) 
.smap > * { --px: var(--x); --py: var(--y); }
.smap .st, .smap .node, .smap .band, .smap .chip, .smap .chev { position: absolute; left: var(--px); top: var(--py); }


.smap .st { transform: translate(-50%, calc(-100% + 7px)); display: flex; flex-direction: column-reverse; align-items: center; text-align: center; gap: var(--space-2); width: 18%; }
.smap .st i { width: 14px; height: 14px; border-radius: 50%; background: var(--rikyu-shiro); border: 1.5px solid var(--rikyu-kuro); transition: background var(--dur-base) var(--ease); }
.smap .st b { flex: 0 0 auto; white-space: nowrap; font-family: var(--font-mono); font-weight: 400; font-size: var(--t-small-size); color: var(--muted-foreground); }
.smap .st span { font-size: var(--t-body-size); line-height: 1.35; color: var(--foreground); font-weight: 500; }
.smap .st.lit i, .smap .st.on i { background: var(--rikyu-kuro); }


.smap .node { transform: translate(-50%, -50%); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--rikyu-shiro); border: 1.5px solid var(--rikyu-kuro); color: var(--foreground); text-decoration: none;
  font-family: var(--font-mono); font-size: var(--t-small-size); overflow: visible; z-index: 2;
  transition: background var(--dur-base) var(--ease), color var(--dur-base) var(--ease); }
.smap .node
.smap .node.live { background: var(--rikyu-sabi); }
.smap .node:hover, .smap .node:focus-visible, .smap .node.lit { background: var(--rikyu-kuro); color: var(--rikyu-shiro); }
.smap .node:focus-visible, .smap .band:focus-visible { outline: var(--focus-w) solid var(--ring); outline-offset: 3px; }
.smap .tip { position: absolute; top: calc(100% + 10px); left: 50%; width: min(300px, 70vw); transform: translate(-50%, 4px);
  background: var(--rikyu-kuro); color: var(--rikyu-shiro); font-family: var(--font-sans); font-size: var(--t-small-size); line-height: 1.5;
  text-align: left; white-space: normal; padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm, 4px); opacity: 0; pointer-events: none;
  transition: opacity var(--dur-base) var(--ease), transform var(--dur-base) var(--ease); z-index: 5; }
.smap .tip.up { top: auto; bottom: calc(100% + 10px); }
.smap .tip.l { left: auto; right: -8px; transform: translate(0, 4px); }
.smap .tip.r { left: -8px; transform: translate(0, 4px); }
.smap .node:hover .tip, .smap .node:focus-visible .tip, .smap .band:hover .tip, .smap .band:focus-visible .tip { opacity: 1; transform: translate(-50%, 0); }
.smap .node:hover .tip.l, .smap .node:focus-visible .tip.l, .smap .node:hover .tip.r, .smap .node:focus-visible .tip.r,
.smap .band:hover .tip.l, .smap .band:focus-visible .tip.l, .smap .band:hover .tip.r, .smap .band:focus-visible .tip.r { transform: translate(0, 0); }


.smap .band { transform: translateY(-50%); width: var(--w); height: 28px; border-radius: 14px; border: 1.5px solid var(--rikyu-kuro);
  background: color-mix(in srgb, var(--rikyu-stone) 60%, var(--rikyu-shiro)); display: flex; align-items: center; gap: var(--space-2);
  padding: 0 var(--space-3); text-decoration: none; color: var(--foreground); font-family: var(--font-mono); font-size: var(--t-small-size); z-index: 1; }
.smap .band:hover, .smap .band:focus-visible, .smap .band.lit { background: var(--rikyu-kuro); color: var(--rikyu-shiro); }
.smap .band .tip { left: var(--space-5); transform: translate(0, 4px); }
.smap .band:hover .tip, .smap .band:focus-visible .tip { transform: translate(0, 0); }


.smap .chip { transform: translate(-50%, -50%); padding: 4px var(--space-2); border: 1px solid var(--rikyu-nezumi); border-radius: var(--radius-sm, 4px);
  background: var(--rikyu-shiro); font-size: var(--t-small-size); color: var(--foreground); white-space: nowrap; }
.smap .chip.lit { background: var(--rikyu-kuro); color: var(--rikyu-shiro); border-color: var(--rikyu-kuro); }
.smap .chip.dim { color: var(--muted-foreground); border-style: dashed; }
.smap .chev { width: 0; height: 0; transform: translate(-6px, 4px); border: 6px solid transparent; border-bottom: 9px solid var(--rikyu-nezumi); }
.smap .lbl { position: absolute; left: var(--px); top: var(--py); font-family: var(--font-mono); font-size: var(--t-small-size); color: var(--muted-foreground); white-space: nowrap; }

@media (max-width: 759px) {
  .smap { height: var(--hn, 640px); }
  .smap > *, html[data-r5]:not([data-dir]) .smap > * { --px: var(--xn, var(--x)); --py: var(--yn, var(--y)); }
  .smap .wires .wide { display: none; }
  .smap .wires .tall { display: inline; }
  .smap .st { transform: translate(-7px, -7px); flex-direction: row; align-items: baseline; text-align: left; width: 62%; gap: var(--space-3); }
  .smap .st i { flex: 0 0 14px; }
  .smap .band .nm { display: none; }
  .smap .band { width: 28px; height: var(--wn); transform: translateX(-50%); flex-direction: column; padding: var(--space-2) 0; }
  .smap .band .tip { left: calc(100% + 8px); right: auto; top: 0; bottom: auto; transform: translate(0, 4px); width: min(220px, 56vw); }
  .smap .node .tip { width: min(200px, 52vw); }
  .smap .node .tip.tl { left: -8px; right: auto; transform: translate(0, 4px); }
  .smap .node .tip.tr { left: auto; right: -8px; transform: translate(0, 4px); }
  .smap .node:hover .tip, .smap .node:focus-visible .tip { transform: translate(0, 0); }
  .smap .node { width: 40px; height: 40px; }
  .smap .node.pill { width: auto; height: 34px; }
  .paper { padding: var(--space-4) var(--space-3) var(--space-3); }
  .layers { margin-right: 8px; }
  .layers::before { transform: translate(8px, 8px); } .layers::after { transform: translate(4px, 4px); }
}


html[data-r5] .decide [role="listitem"] { position: relative; overflow: hidden; }
.ring { position: absolute; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; pointer-events: none;
  border: 1px solid color-mix(in srgb, var(--rikyu-kuro) 45%, transparent); animation: ring 600ms var(--ease) forwards; }
.smap .node .ring { left: 50%; top: 50%; }
@keyframes ring { from { transform: scale(.2); opacity: 1; } to { transform: scale(7); opacity: 0; } }
[tabindex]:focus-visible { outline: var(--focus-w) solid var(--ring); }
.band-dark :focus-visible { outline: var(--focus-w) solid var(--rikyu-shiro); outline-offset: 3px; }


.garden { position: relative; margin: var(--space-7) 0 0; aspect-ratio: 21 / 8; border-radius: var(--radius-md, 6px); overflow: hidden;
  background: color-mix(in srgb, var(--rikyu-shiro) 72%, var(--rikyu-stone)); }
.garden canvas, .garden svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.garden canvas { opacity: 0; transition: opacity 600ms var(--ease); }
.garden[data-state="gl"] canvas { opacity: 1; }
.garden[data-state="gl"] svg { visibility: hidden; }
.garden .g-tall { display: none; }
.g-bed { fill: color-mix(in srgb, var(--rikyu-shiro) 72%, var(--rikyu-stone)); }
.g-line { fill: none; stroke: color-mix(in srgb, var(--rikyu-stone) 75%, var(--rikyu-nezumi)); stroke-width: 1.4; }
.g-stone { fill: color-mix(in srgb, var(--rikyu-nezumi) 70%, var(--rikyu-stone)); }
.g-face { fill: color-mix(in srgb, var(--rikyu-stone) 60%, var(--rikyu-nezumi)); }
.g-moss { fill: var(--rikyu-moss); }
.g-shadow { fill: color-mix(in srgb, var(--rikyu-kuro) 16%, transparent); }
@media (max-width: 759px) { .garden { aspect-ratio: 4 / 3.4; margin-top: var(--space-6); } .garden .g-wide { display: none; } .garden .g-tall { display: block; } }


@media (prefers-reduced-motion: reduce) {
  .ring, .smap .trav { display: none; }
  .smap .tip, .smap .node, .smap .st i, .garden canvas { transition: none; }
}
