:root { color-scheme: light; --ink:#26313a; --paper:#f3f0e9; --card:#fffcf6; --edge:#dfded4; --blue:#254b62; --muted:#536169; }
* { box-sizing:border-box; }
body { margin:0; background:var(--paper); color:var(--ink); font:15px/1.55 system-ui,sans-serif; }
button,input,textarea { font:inherit; }
button { border:1px solid var(--edge); border-radius:9px; background:var(--card); color:var(--ink); padding:.55rem .8rem; cursor:pointer; }
button:disabled { cursor:default; opacity:.48; }
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible { outline:2px solid #3b7c9b; outline-offset:2px; }
.primary { background:var(--blue); color:white; border-color:var(--blue); }
.masthead { display:flex; align-items:center; justify-content:space-between; padding:clamp(.8rem,2vw,1.6rem) clamp(1rem,4vw,3rem); gap:.85rem; }
h1,h2,p { margin:0; }
h1,h2 { font-family:Georgia,"Noto Serif SC",serif; line-height:1.24; }
h1 { font-size:clamp(1.65rem,5vw,2.65rem); }
h2 { font-size:1.16rem; }
.layout { margin:0 clamp(.65rem,3vw,2.6rem); display:grid; grid-template-columns:minmax(0,1fr) minmax(265px,315px); gap:1rem; align-items:start; }
.scene { position:relative; min-height:500px; height:calc(100dvh - 140px); max-height:920px; overflow:hidden; background:#c6d3d6; border-radius:16px; }
#street { position:absolute; inset:0; }
.scene-empty { position:absolute; inset:0; display:grid; place-items:center; padding:1.5rem; background:linear-gradient(152deg,#b4cbd2,#e4e1d2 74%); pointer-events:none; text-align:center; }
.scene-empty p { max-width:36ch; border-radius:12px; background:#fffdf5df; padding:.85rem 1rem; }
.side { display:grid; gap:1rem; }
.controls,.favorites { display:grid; gap:.7rem; padding:1rem; background:var(--card); border:1px solid var(--edge); border-radius:13px; }
.controls p { color:var(--muted); }
.actions { display:flex; gap:.5rem; flex-wrap:wrap; }
input,textarea { min-width:0; max-width:100%; width:100%; border:1px solid var(--edge); border-radius:8px; padding:.45rem .55rem; background:white; }
textarea { resize:vertical; }
#save-form .actions { flex-wrap:nowrap; }
#destination { flex-wrap:nowrap; }
#pair-code:not(:empty) { font-family:monospace; overflow-wrap:anywhere; background:#edf2f0; padding:.5rem; border-radius:7px; }
#guide-status:empty,#reply:empty,#pair-code:empty,#favorites:empty,[hidden] { display:none !important; }
#reply:not(:empty) { border-left:2px solid #718e99; padding-left:.7rem; color:var(--ink); overflow-wrap:anywhere; }
#favorites { list-style:none; display:grid; gap:.45rem; padding:0; margin:0; }
#favorites li { display:flex; gap:.42rem; }
.favorite { flex:1; overflow-wrap:anywhere; text-align:left; }
footer { margin:1rem 2rem; color:var(--muted); font-size:.82rem; }
footer a { color:inherit; }
.login { display:grid; place-content:center; min-height:90dvh; padding:1rem; gap:1rem; }
.login form { display:grid; gap:.55rem; }
@media (max-width:740px) {
  .layout { grid-template-columns:minmax(0,1fr); }
  .scene { min-height:320px; height:56dvh; }
}
