:root {
  color-scheme: light;
  --paper: #f6f4ed;
  --ink: #18211e;
  --muted: #505b53;
  --line: #cecfc1;
  --accent: #bb472c;
  --button: #c64a2d;
  font: 16px/1.5 "Inter", "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
.rail { width: min(calc(100% - 64px), 1180px); margin-inline: auto; }
a { color: inherit; text-underline-offset: 4px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid #0564ad; outline-offset: 4px; }
.masthead { border-bottom: 1px solid var(--line); }
.masthead .rail { display: flex; align-items: center; justify-content: space-between; min-height: 76px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; font-size: 1.25rem; font-weight: 800; letter-spacing: -.055em; }
.brand-end { color: var(--accent); }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 35px; height: 31px; margin-right: 10px; color: var(--paper); background: var(--ink); font-family: "Arial Black", Arial, sans-serif; font-size: .95rem; font-weight: 900; transform: skew(-8deg); }
.brand-mark span { color: #ff9676; }
.guide-link, .actions a { font-weight: 650; font-size: .94rem; }
.guide-link { text-decoration: none; }
.guide-link span { margin-left: 4px; }
.hero { display: grid; grid-template-columns: 1.06fr 1fr; align-items: center; gap: clamp(32px, 5vw, 82px); padding-block: clamp(48px, 7vw, 98px); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: "Inter", "Segoe UI", Arial, sans-serif; }
h1 { font-size: clamp(3.2rem, 5.5vw, 5.15rem); font-weight: 780; letter-spacing: -.075em; line-height: .99; }
h1 span { color: var(--accent); }
.lead { color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.16rem); max-width: 40ch; margin: 22px 0 28px; }
label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 8px; }
.controls { display: flex; flex-wrap: wrap; gap: 8px; }
.handle-field, .controls > input { border: 1px solid #90998d; border-radius: 7px; background: #fffefa; min-height: 52px; }
.handle-field { display: flex; align-items: center; flex: 1 1 150px; max-width: 240px; }
.handle-field:focus-within { outline: 3px solid #0564ad; outline-offset: 2px; }
.handle-field span { padding-left: 14px; color: var(--muted); }
input { font: inherit; color: inherit; padding: 12px; min-width: 0; }
.handle-field input { width: 100%; padding-left: 3px; border: 0; outline: 0; background: transparent; }
button { cursor: pointer; border: 0; padding: 12px 20px; min-height: 52px; font: inherit; font-weight: 720; color: white; background: var(--button); border-radius: 7px; }
button:hover { background: #a63b24; }
button span { display: inline-block; margin-left: 6px; }
.note { color: var(--muted); margin-top: 12px; font-size: .87rem; }
.error { margin-top: 8px; color: #922e17; }
.preview { background-color: #202921; background-image: radial-gradient(#536052 1px, transparent 1px); background-size: 16px 16px; border: 1px solid #29322c; border-radius: 16px; padding: 12px; margin: 0; overflow: hidden; }
.preview figcaption { color: #f6f4ed; font-size: .8rem; font-weight: 650; padding: 2px 4px 9px; display: flex; align-items: center; gap: 7px; }
.signal { width: 8px; height: 8px; background: #eda181; display: inline-block; border-radius: 50%; }
.preview { container-type: inline-size; }
.preview-viewport { aspect-ratio: 1.28; overflow: hidden; }
.preview iframe { display: block; width: 100%; height: 100%; border: 0; background: transparent; color-scheme: dark; }
@container (max-width: 400px) {
  .preview-viewport { aspect-ratio: 1.15; }
  .preview iframe { width: 150%; height: 150%; transform-origin: top left; transform: scale(.666667); }
}
.guide { border-top: 1px solid var(--line); padding: 34px 0 60px; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.047em; line-height: 1.12; }
.guide ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; list-style: none; margin: 27px 0 0; padding: 0; counter-reset: steps; }
.guide li { counter-increment: steps; padding-left: 42px; position: relative; }
.guide li::before { content: counter(steps); position: absolute; inset: 1px auto auto 0; width: 29px; height: 29px; border-radius: 7px; display: grid; place-items: center; background: #e4e5d9; font-weight: 750; font-size: .92rem; }
h3 { font-size: 1.08rem; letter-spacing: -.028em; }
.guide p { margin-top: 5px; color: var(--muted); max-width: 36ch; font-size: .94rem; }
.setup { padding-block: clamp(42px, 7vw, 92px); }
.link-card { max-width: 660px; }
.room-name { color: var(--accent); font-weight: 700; margin-bottom: 12px; overflow-wrap: anywhere; }
.controls > input { flex: 1 1 210px; width: 100%; font-family: Consolas, monospace; font-size: .94rem; }
.copy-result { min-height: 23px; font-size: .9rem; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 22px; }
@media (max-width: 820px) {
  .hero { gap: 24px; }
  .rail { width: calc(100% - 40px); }
  .guide ol { gap: 20px; }
}
@media (max-width: 700px) {
  .hero { grid-template-columns: 1fr; padding-block: 38px; }
  .masthead .rail { min-height: 62px; }
  .brand { font-size: 1.08rem; }
  .guide-link { font-size: .85rem; }
  .preview { max-width: 480px; width: 100%; }
  .guide ol { grid-template-columns: 1fr; gap: 20px; }
  .guide p { max-width: none; }
  .guide { padding-block: 28px 40px; }
}
