/* あかりリモコン — 暗い部屋に灯る光 */
:root {
  --night: #0c0b0a;
  --s1: #15120f;
  --s2: #1e1914;
  --s3: #2a231b;
  --line: #3b3228;
  --text: #f4ede2;
  --text2: #c9bdab;
  --amber: #ffb257;
  --ember: #ff8a3d;
  --on-amber: #2a1500;
  --cool: #9db4dc;
  --danger: #ff8f7a;

  --ff-head: 'Shippori Antique B1', 'M PLUS 2', serif;
  --ff: 'M PLUS 2', 'Hiragino Sans', 'Yu Gothic', system-ui, sans-serif;
  --ff-num: 'Jost', 'M PLUS 2', system-ui, sans-serif;

  --r-card: 26px;
  --r-btn: 16px;
  --warm: cubic-bezier(.22, .8, .24, 1);
  --glow-t: 620ms;
  --dock-h: 76px;
  --sb: env(safe-area-inset-bottom, 0px);
  --st: env(safe-area-inset-top, 0px);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--night);
  color: var(--text);
  font-family: var(--ff);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.65;
  line-break: strict;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
svg { width: 24px; height: 24px; flex: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.nw { white-space: nowrap; }
.num { font-family: var(--ff-num); font-variant-numeric: tabular-nums; }
@supports (word-break: auto-phrase) {
  .phr { word-break: auto-phrase; }
}

/* ---- 家（アプリ全体） ---- */
.house {
  position: relative; width: 100%; max-width: 430px; height: 100vh; height: 100dvh;
  margin: 0 auto; overflow: hidden; background: var(--night);
}
@media (min-width: 600px) {
  body { background: #060505; }
  .house { box-shadow: 0 0 0 1px #221d17, 0 0 120px rgba(255, 150, 60, .08); }
}
.views { position: absolute; inset: 0; display: block; }
.view {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  background: var(--night);
  transform-origin: var(--ox, 50%) var(--oy, 40%);
}
.view.is-enter { animation: litIn 420ms var(--warm) both; z-index: 2; }
.view.is-leave { animation: dimOut 300ms ease-in both; z-index: 1; pointer-events: none; }
.view.is-enter-back { animation: backIn 360ms var(--warm) both; z-index: 1; }
.view.is-leave-back { animation: backOut 320ms ease-in both; z-index: 2; pointer-events: none; }
@keyframes litIn { from { opacity: 0; transform: scale(.9); filter: brightness(.3); } to { opacity: 1; transform: none; filter: none; } }
@keyframes dimOut { to { opacity: 0; filter: brightness(.3); } }
@keyframes backIn { from { opacity: 0; filter: brightness(.4); } to { opacity: 1; filter: none; } }
@keyframes backOut { to { opacity: 0; transform: scale(.92); } }
.pane {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--dock-h) + var(--sb) + 30px);
}
.view.no-dock .pane { padding-bottom: calc(var(--sb) + 32px); }

/* 上のバー */
.bar {
  flex: none; position: relative; z-index: 4;
  display: flex; align-items: center; gap: 6px;
  min-height: calc(60px + var(--st)); padding: var(--st) 10px 0;
  background: var(--night);
  transition: box-shadow 300ms;
}
.view.is-scrolled .bar { box-shadow: 0 1px 0 var(--line); }
.bar__t { flex: 1; min-width: 0; text-align: center; font-weight: 500; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar__t small { display: block; font-size: 12px; color: var(--text2); font-weight: 400; line-height: 1.3; }
.round {
  width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: var(--s2); color: var(--text);
  text-decoration: none; transition: transform 160ms var(--warm), background-color 200ms;
}
.round:active { transform: scale(.88); }
.round--ghost { background: transparent; }

/* 大見出し */
.hello { padding: calc(var(--st) + 22px) 22px 6px; display: flex; align-items: flex-start; gap: 12px; }
.hello__t { flex: 1; font-family: var(--ff-head); font-size: 30px; line-height: 1.35; font-weight: 400; letter-spacing: .02em; font-feature-settings: "palt"; }
.hello__t small { display: block; margin-top: 2px; font-family: var(--ff); font-size: 14px; color: var(--text2); letter-spacing: 0; }
.status {
  margin: 14px 16px 0; padding: 14px 16px; border-radius: 22px;
  display: flex; align-items: center; gap: 14px;
  background: var(--s1); box-shadow: inset 0 0 0 1px var(--line);
}
.status__n { font-family: var(--ff-num); font-weight: 200; font-size: 44px; line-height: 1; color: var(--amber); }
.status__l { flex: 1; font-size: 13px; color: var(--text2); line-height: 1.5; }
.status__l b { display: block; color: var(--text); font-size: 15px; font-weight: 500; }
.alloff {
  flex: none; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--s3); color: var(--text); font-size: 14px; font-weight: 500;
  transition: transform 160ms var(--warm);
}
.alloff:active { transform: scale(.94); }
.alloff svg { width: 18px; height: 18px; }

/* シーンの行 */
.strip { display: flex; gap: 10px; overflow-x: auto; padding: 16px 16px 4px; scrollbar-width: none; scroll-padding-inline: 16px; }
.strip::-webkit-scrollbar { display: none; }
.pill {
  flex: none; position: relative; overflow: hidden;
  min-height: 48px; padding: 0 18px 0 12px; border: 0; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--s2); color: var(--text); font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: transform 160ms var(--warm), box-shadow 300ms;
}
.pill:active { transform: scale(.95); }
.pill i { width: 26px; height: 26px; border-radius: 50%; flex: none; box-shadow: 0 0 14px var(--c, #ffb257); background: var(--g, #ffb257); }
.pill.is-on { box-shadow: inset 0 0 0 1.5px var(--amber); }

/* 部屋カード */
.sect { display: flex; align-items: baseline; justify-content: space-between; padding: 26px 22px 10px; }
.sect h2 { font-family: var(--ff-head); font-size: 19px; font-weight: 400; letter-spacing: .04em; }
.sect span { font-size: 13px; color: var(--text2); }
.rooms { display: flex; flex-direction: column; gap: 14px; padding: 0 16px; }
.roomcard {
  position: relative; display: block; border-radius: var(--r-card); overflow: hidden;
  background: var(--s1); text-decoration: none; color: inherit;
  box-shadow: 0 0 0 1px var(--line);
  transition: transform 200ms var(--warm), box-shadow var(--glow-t);
}
.roomcard:active { transform: scale(.98); }
.roomcard.is-lit { box-shadow: 0 0 0 1px #4a3b2a, 0 18px 50px -24px var(--glow, rgba(255, 170, 80, .5)); }
.photo { position: relative; overflow: hidden; background: #000; }
.photo img { width: 100%; height: 100%; object-fit: cover; transition: filter var(--glow-t) var(--warm); }
.photo .tint, .photo .hue { position: absolute; inset: 0; pointer-events: none; transition: background-color var(--glow-t), opacity var(--glow-t); }
.photo .tint { mix-blend-mode: soft-light; }
.photo .hue { mix-blend-mode: color; }
.roomcard .photo { aspect-ratio: 16 / 8.6; }
.roomcard__bar { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 18px; background: var(--s1); }
.roomcard__name { font-family: var(--ff-head); font-size: 20px; line-height: 1.3; }
.roomcard__sub { font-size: 13px; color: var(--text2); }
.roomcard__meter { margin-top: 6px; width: 120px; height: 4px; border-radius: 2px; background: var(--s3); overflow: hidden; }
.roomcard__meter i { display: block; height: 100%; border-radius: 2px; background: var(--amber); transition: width var(--glow-t) var(--warm); }
.roomcard__info { flex: 1; min-width: 0; }

/* 電源ボタン（光る） */
.pwr {
  flex: none; width: 56px; height: 56px; border: 0; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--s3); color: var(--text2);
  transition: background-color 300ms, color 300ms, box-shadow var(--glow-t), transform 160ms var(--warm);
}
.pwr:active { transform: scale(.9); }
.pwr[aria-pressed="true"] { background: var(--amber); color: var(--on-amber); box-shadow: 0 0 0 4px rgba(255, 178, 87, .16), 0 0 26px rgba(255, 178, 87, .55); }
.pwr--sm { width: 44px; height: 44px; }
.pwr--sm svg { width: 20px; height: 20px; }

/* ---- 部屋 ---- */
.hero { margin: 0 16px; border-radius: var(--r-card); overflow: hidden; }
.hero .photo { aspect-ratio: 3 / 2; }
.roomhead { display: flex; align-items: center; gap: 12px; padding: 18px 22px 4px; }
.roomhead h1 { flex: 1; font-family: var(--ff-head); font-size: 28px; font-weight: 400; line-height: 1.3; }
.roomhead p { font-size: 13px; color: var(--text2); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px 16px 0; }
.tile {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  min-height: 132px; padding: 14px; border-radius: 22px; border: 0; text-align: left;
  background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); color: var(--text);
  transition: background-color 400ms, box-shadow var(--glow-t), transform 160ms var(--warm);
}
.tile:active { transform: scale(.96); }
.tile.is-on { background: #241c13; box-shadow: inset 0 0 0 1px #5a4630; }
.tile__ic {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--s3); color: var(--text2);
  transition: background-color var(--glow-t), box-shadow var(--glow-t), color 300ms;
}
.tile.is-on .tile__ic { background: var(--lc, #ffb257); color: #1c1006; box-shadow: 0 0 22px var(--lc, #ffb257); }
.tile__n { font-size: 14px; font-weight: 500; line-height: 1.45; }
.tile__v { font-size: 12px; color: var(--text2); }
.tile__open {
  position: absolute; right: 6px; top: 6px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; color: var(--text2); text-decoration: none;
}
.tile__open svg { width: 20px; height: 20px; }
.tile--add { align-items: center; justify-content: center; text-decoration: none; color: var(--text2); border: 1.5px dashed var(--line); background: transparent; box-shadow: none; }

/* 横スライダー（部屋全体） */
.hslider { padding: 6px 16px 0; }
.hslider__lbl { display: flex; justify-content: space-between; align-items: baseline; padding: 0 6px 8px; font-size: 13px; color: var(--text2); }
.hslider__lbl b { font-family: var(--ff-num); font-weight: 300; font-size: 22px; color: var(--text); }
.track {
  position: relative; height: 56px; border-radius: 999px; overflow: hidden;
  background: var(--s2); box-shadow: inset 0 0 0 1px var(--line);
  touch-action: none; cursor: ew-resize;
}
.track__fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: linear-gradient(90deg, #5c3a14, var(--amber)); box-shadow: 0 0 24px rgba(255, 178, 87, .35); }
.track svg { position: absolute; top: 16px; color: var(--text2); pointer-events: none; }
.track .sun-s { left: 18px; color: var(--on-amber); }
.track .sun-l { right: 18px; }
.track:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

/* ---- 照明の操作 ---- */
.stage { display: flex; gap: 12px; padding: 4px 16px 0; }
.column {
  position: relative; flex: none; width: 104px; height: 318px; border-radius: 40px; overflow: hidden;
  background: var(--s2); box-shadow: inset 0 0 0 1px var(--line);
  touch-action: none; cursor: ns-resize;
}
.column__fill {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(0deg, var(--lc2, #8a4a10), var(--lc, #ffb257));
  box-shadow: 0 -8px 40px var(--lc, #ffb257);
  transition: background 300ms;
}
.column__cap { position: absolute; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: rgba(255, 255, 255, .85); pointer-events: none; }
.column:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.column.is-off .column__fill { opacity: .18; box-shadow: none; }
.stage__r { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.stage .photo { flex: 1; border-radius: 30px; }
.readout { padding: 10px 14px; border-radius: 22px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); }
.readout__n { font-family: var(--ff-num); font-weight: 200; font-size: 48px; line-height: 1.05; }
.readout__n small { font-size: 20px; margin-left: 2px; }
.readout__t { font-size: 13px; color: var(--text2); display: flex; align-items: center; gap: 6px; }
.readout__t i { width: 10px; height: 10px; border-radius: 50%; background: var(--lc, #ffb257); box-shadow: 0 0 10px var(--lc, #ffb257); flex: none; }

.tabs { display: flex; margin: 20px 16px 0; padding: 4px; border-radius: 999px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); }
.tabs button {
  flex: 1; min-height: 44px; border: 0; border-radius: 999px; background: transparent; color: var(--text2);
  font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: background-color 300ms, color 300ms;
}
.tabs button[aria-selected="true"] { background: var(--s3); color: var(--text); }
.tabs button svg { width: 18px; height: 18px; }
.panel { padding: 16px 16px 0; }

.ktrack {
  position: relative; height: 52px; border-radius: 999px; touch-action: none; cursor: ew-resize;
  background: linear-gradient(90deg, rgb(255, 147, 41), rgb(255, 180, 107) 22%, rgb(255, 209, 163) 40%, rgb(255, 228, 206) 58%, rgb(255, 243, 239) 76%, rgb(235, 238, 255));
}
.ktrack__knob {
  position: absolute; top: 4px; width: 44px; height: 44px; margin-left: -22px; border-radius: 50%;
  background: var(--kc, #ffd1a3); box-shadow: 0 0 0 4px var(--night), 0 0 0 6px rgba(255, 255, 255, .8), 0 4px 16px rgba(0, 0, 0, .5);
  pointer-events: none;
}
.ktrack:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; }
.kends { display: flex; justify-content: space-between; padding: 8px 4px 0; font-size: 12px; color: var(--text2); }
.presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.preset {
  min-height: 64px; border: 0; border-radius: 18px; padding: 8px 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); font-size: 12px; font-weight: 500;
  transition: box-shadow 200ms, transform 160ms var(--warm);
}
.preset:active { transform: scale(.94); }
.preset i { width: 18px; height: 18px; border-radius: 50%; background: var(--pc); box-shadow: 0 0 10px var(--pc); }
.preset.is-on { box-shadow: inset 0 0 0 1.5px var(--amber); }
.wheelbox { display: flex; flex-direction: column; align-items: center; }
.wheel { position: relative; width: 264px; height: 264px; touch-action: none; cursor: crosshair; }
.wheel canvas { width: 100%; height: 100%; border-radius: 50%; }
.wheel__knob {
  position: absolute; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%;
  border: 4px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .4), 0 6px 18px rgba(0, 0, 0, .55);
  pointer-events: none;
}
.wheel:focus-visible { outline: 2px solid var(--amber); outline-offset: 6px; border-radius: 50%; }
.swatches { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; justify-content: center; }
.swatch { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--sc); box-shadow: 0 0 0 1px rgba(255, 255, 255, .15), 0 0 14px var(--sc); transition: transform 160ms var(--warm); }
.swatch:active { transform: scale(.88); }
.onlydim { padding: 18px; border-radius: 22px; background: var(--s1); color: var(--text2); font-size: 14px; line-height: 1.7; }

.rows { margin: 22px 16px 0; border-radius: 22px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.rowi {
  display: flex; align-items: center; gap: 14px; width: 100%;
  min-height: 60px; padding: 10px 16px; border: 0; background: transparent; color: var(--text); text-align: left; text-decoration: none; font-size: 15px;
}
.rowi + .rowi { box-shadow: inset 0 1px 0 var(--line); }
.rowi > svg:first-child { color: var(--amber); }
.rowi__t { flex: 1; min-width: 0; }
.rowi__t small { display: block; color: var(--text2); font-size: 12.5px; line-height: 1.5; }
.rowi > svg:last-child { color: var(--text2); width: 20px; height: 20px; }
.rowi--warn { color: var(--danger); }
.rowi--warn > svg:first-child { color: var(--danger); }

/* スイッチ */
.sw { position: relative; flex: none; width: 54px; height: 32px; border: 0; border-radius: 16px; padding: 0; background: var(--s3); box-shadow: inset 0 0 0 1px var(--line); transition: background-color 300ms, box-shadow 300ms; }
.sw::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #8f8474; transition: transform 300ms var(--warm), background-color 300ms, box-shadow 300ms; }
.sw[aria-checked="true"] { background: #5c3a14; box-shadow: inset 0 0 0 1px #8a5a22; }
.sw[aria-checked="true"]::after { transform: translateX(22px); background: var(--amber); box-shadow: 0 0 12px var(--amber); }

/* ---- シーン ---- */
.scenes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 16px; }
.scene {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px;
  min-height: 168px; padding: 14px; border: 0; border-radius: 24px; text-align: left; color: var(--text);
  background: var(--s1); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line);
  transition: transform 180ms var(--warm), box-shadow 400ms;
}
.scene:active { transform: scale(.96); }
.scene__lights { position: absolute; left: 0; right: 0; top: 0; height: 92px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.scene__lights i { width: var(--sz, 20px); height: var(--sz, 20px); border-radius: 50%; background: var(--c); box-shadow: 0 0 24px 6px var(--c); opacity: var(--o, 1); }
.scene__lights.is-dark i { background: #3a3128; box-shadow: none; }
.scene__n { font-family: var(--ff-head); font-size: 19px; line-height: 1.3; }
.scene__d { font-size: 12.5px; color: var(--text2); line-height: 1.55; }
.scene.is-on { box-shadow: inset 0 0 0 1.5px var(--amber), 0 0 30px -10px var(--amber); }
.scene__badge { position: absolute; right: 10px; top: 10px; padding: 1px 9px; border-radius: 999px; background: var(--amber); color: var(--on-amber); font-size: 11px; font-weight: 700; }
.scene__del { position: absolute; right: 4px; top: 4px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; display: grid; place-items: center; color: var(--text); }
.scene__del span { width: 30px; height: 30px; border-radius: 50%; background: #5a1f17; display: grid; place-items: center; }
.scene__del svg { width: 16px; height: 16px; }
.scene--new { align-items: center; justify-content: center; text-align: center; background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); color: var(--text2); }
.scene--new svg { color: var(--amber); }
.editbtn { min-height: 44px; padding: 0 12px; border: 0; background: transparent; color: var(--amber); font-weight: 500; font-size: 14px; border-radius: 12px; }

/* ---- タイマー ---- */
.dialwrap { display: flex; flex-direction: column; align-items: center; padding: 6px 16px 0; }
.dial { position: relative; width: 272px; height: 272px; touch-action: none; }
.dial svg.ring { width: 100%; height: 100%; }
.dial__center { position: absolute; inset: 52px; border-radius: 50%; background: var(--s1); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; }
.dial__n { font-family: var(--ff-num); font-weight: 200; font-size: 54px; line-height: 1; }
.dial__n small { font-size: 20px; }
.dial__s { margin-top: 6px; font-size: 13px; color: var(--text2); }
.dial:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 50%; }
.scope { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 16px; }
.chip {
  min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px;
  background: var(--s2); color: var(--text); font-size: 14px; font-weight: 500; box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow 200ms, background-color 200ms;
}
.chip[aria-pressed="true"] { background: #33261a; box-shadow: inset 0 0 0 1.5px var(--amber); color: var(--text); }
.lamp {
  min-height: 52px; padding: 0 26px; border: 0; border-radius: var(--r-btn);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--amber); color: var(--on-amber); font-weight: 700; font-size: 15px; text-decoration: none;
  box-shadow: 0 0 30px -6px rgba(255, 178, 87, .6);
  transition: transform 160ms var(--warm), box-shadow 300ms;
}
.lamp:active { transform: scale(.96); box-shadow: 0 0 40px 0 rgba(255, 178, 87, .7); }
.lamp svg { width: 20px; height: 20px; }
.lamp--wide { width: 100%; }
.ghost {
  min-height: 52px; padding: 0 22px; border: 0; border-radius: var(--r-btn);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--s2); color: var(--text); font-weight: 500; font-size: 15px; text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: transform 160ms var(--warm);
}
.ghost:active { transform: scale(.96); }
.ghost--wide { width: 100%; }
.dialbtns { display: flex; gap: 10px; width: 100%; margin-top: 18px; }
.dialbtns > * { flex: 1; }
.sched { margin: 0 16px; border-radius: 22px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.schedrow { position: relative; overflow: hidden; }
.schedrow + .schedrow { box-shadow: inset 0 1px 0 var(--line); }
.schedrow__in { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--s1); transition: transform 260ms var(--warm); touch-action: pan-y; }
.schedrow__time { font-family: var(--ff-num); font-weight: 300; font-size: 30px; line-height: 1; min-width: 86px; }
.schedrow__b { flex: 1; min-width: 0; }
.schedrow__t { font-size: 15px; font-weight: 500; }
.schedrow__d { font-size: 12.5px; color: var(--text2); line-height: 1.5; }
.schedrow__days { margin-top: 4px; display: flex; gap: 3px; }
.schedrow__days span { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; color: var(--text2); background: var(--s2); }
.schedrow__days span.on { background: #4a361f; color: var(--text); }
.schedrow__del { position: absolute; right: 0; top: 0; bottom: 0; width: 88px; border: 0; background: #7a2a1f; color: #fff; font-size: 14px; font-weight: 700; }
.schedrow.is-off .schedrow__time, .schedrow.is-off .schedrow__t { color: var(--text2); }
.hint { padding: 10px 22px 0; font-size: 12.5px; color: var(--text2); }

/* ---- デバイス追加 ---- */
.pair { padding: 0 20px; text-align: center; }
.pair__vis { position: relative; width: 240px; height: 240px; margin: 4px auto 18px; display: grid; place-items: center; }
.pair__vis img { width: 168px; height: 168px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 60px -10px rgba(255, 178, 87, .55); }
.pair__vis img.is-blink { animation: blink 1.5s steps(1) 2; }
@keyframes blink { 0%, 33%, 66% { filter: brightness(1.15); } 16%, 50%, 83% { filter: brightness(.25); } }
.radar { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; }
.radar i { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--amber); opacity: 0; animation: radar 2.4s ease-out infinite; }
.radar i:nth-child(2) { animation-delay: .8s; }
.radar i:nth-child(3) { animation-delay: 1.6s; }
@keyframes radar { from { transform: scale(.55); opacity: .8; } to { transform: scale(1.15); opacity: 0; } }
.pair h1 { font-family: var(--ff-head); font-size: 24px; font-weight: 400; line-height: 1.45; }
.pair__d { margin: 10px auto 0; max-width: 320px; font-size: 14px; color: var(--text2); line-height: 1.8; text-align: left; }
.steps3 { margin: 18px 0 0; padding: 0; list-style: none; text-align: left; display: flex; flex-direction: column; gap: 8px; }
.steps3 li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 18px; background: var(--s1); font-size: 14px; line-height: 1.6; }
.steps3 b { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--s3); color: var(--amber); font-family: var(--ff-num); font-weight: 500; }
.pair__acts { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.found { margin-top: 6px; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.dev {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 72px; padding: 12px 14px; border: 0; border-radius: 20px;
  background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); text-align: left;
  animation: litIn 420ms var(--warm) both;
  transition: transform 160ms var(--warm);
}
.dev:active { transform: scale(.97); }
.dev__ic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: #3b2a17; color: var(--amber); box-shadow: 0 0 18px -4px var(--amber); }
.dev__b { flex: 1; min-width: 0; }
.dev__n { font-size: 15px; font-weight: 500; }
.dev__s { font-size: 12.5px; color: var(--text2); }
.sig { display: flex; align-items: flex-end; gap: 2px; height: 16px; }
.sig i { width: 4px; border-radius: 1px; background: var(--s3); }
.sig i.on { background: var(--amber); }
.field { display: flex; align-items: center; min-height: 54px; padding: 0 16px; border-radius: 16px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); text-align: left; }
.field:focus-within { box-shadow: inset 0 0 0 1.5px var(--amber); }
.field input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 16px; padding: 14px 0; color: var(--text); }
.lbl { margin: 18px 0 8px; font-size: 13px; color: var(--text2); text-align: left; font-weight: 500; }
.err { margin-top: 8px; font-size: 13px; color: var(--danger); text-align: left; }
.note {
  margin-top: 16px; padding: 12px 14px; border-radius: 16px; display: flex; gap: 10px; align-items: flex-start;
  background: #1f1a13; box-shadow: inset 0 0 0 1px #4a3b2a; color: var(--text2); font-size: 13px; line-height: 1.7; text-align: left;
}
.note svg { width: 18px; height: 18px; color: var(--amber); margin-top: 2px; }

/* ---- 設定・アプリについて ---- */
.pagehead { padding: calc(var(--st) + 22px) 22px 10px; font-family: var(--ff-head); font-size: 30px; font-weight: 400; }
.about { padding: 4px 16px 0; }
.about__top { display: flex; align-items: center; gap: 16px; padding: 4px 6px 18px; }
.about__top img { width: 78px; height: 78px; border-radius: 20px; box-shadow: 0 0 30px -8px rgba(255, 178, 87, .6); }
.about__top b { display: block; font-family: var(--ff-head); font-size: 22px; font-weight: 400; }
.about__top span { font-size: 13px; color: var(--text2); }
.card { padding: 16px; border-radius: 22px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; line-height: 1.8; }
.card + .card { margin-top: 12px; }
.card h2 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.card ul { margin: 0; padding-left: 1.2em; }
.card .lamp { margin-top: 14px; }
.empty { padding: 10px 24px 20px; text-align: center; }
.empty img { width: 100%; max-width: 320px; aspect-ratio: 1; object-fit: cover; margin: 0 auto 16px; border-radius: 50% 50% 26px 26px; }
.empty h2 { font-family: var(--ff-head); font-size: 21px; font-weight: 400; }
.empty p { margin: 8px auto 18px; max-width: 300px; font-size: 14px; color: var(--text2); }

/* ---- ドック ---- */
.dock {
  position: absolute; z-index: 20; left: 14px; right: 14px; bottom: calc(10px + var(--sb));
  height: var(--dock-h); padding: 0 6px;
  display: flex; align-items: stretch;
  border-radius: 28px; background: #17130f; box-shadow: 0 0 0 1px #2e271f, 0 18px 40px rgba(0, 0, 0, .6);
  transition: transform 360ms var(--warm), opacity 260ms;
}
.dock.is-away { transform: translateY(140%); opacity: 0; pointer-events: none; }
.dock a {
  flex: 1; position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  text-decoration: none; color: var(--text2); font-size: 11.5px; font-weight: 500;
  transition: color 300ms;
}
.dock a svg { transition: transform 300ms var(--warm); }
.dock a.is-here { color: var(--amber); }
.dock a.is-here svg { transform: translateY(-2px); }
.dock a:active svg { transform: scale(.86); }
.dock__glow {
  position: absolute; top: 6px; width: 34px; height: 3px; border-radius: 2px; margin-left: -17px;
  background: var(--amber); box-shadow: 0 0 12px 2px var(--amber), 0 12px 30px 8px rgba(255, 178, 87, .2);
  transition: left 420ms var(--warm), opacity 300ms;
}

/* ---- 下から出る引き出し ---- */
.veil { position: absolute; inset: 0; z-index: 40; background: rgba(0, 0, 0, .62); animation: fadeIn 260ms both; }
.veil.is-off { animation: fadeOut 220ms both; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
.drawer {
  position: absolute; z-index: 41; left: 8px; right: 8px; bottom: calc(8px + var(--sb));
  max-height: 86%; display: flex; flex-direction: column;
  border-radius: 30px; background: #1a1611; box-shadow: 0 0 0 1px #352c22, 0 -10px 60px rgba(0, 0, 0, .6);
  animation: rise 380ms var(--warm) both;
}
.drawer.is-off { animation: sink 260ms ease-in both; }
@keyframes rise { from { transform: translateY(105%); } }
@keyframes sink { to { transform: translateY(105%); } }
.drawer__h { flex: none; display: flex; align-items: center; gap: 8px; padding: 14px 10px 6px 22px; }
.drawer__h h2 { flex: 1; font-family: var(--ff-head); font-size: 20px; font-weight: 400; }
.drawer__b { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 18px 8px; }
.drawer__f { flex: none; padding: 10px 18px 16px; display: flex; gap: 10px; }
.drawer__f > * { flex: 1; }
.drawer .card { background: var(--s2); }
.drawer p.desc { font-size: 14px; color: var(--text2); line-height: 1.75; }
.checks { display: flex; flex-direction: column; gap: 6px; }
.check {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 0 14px; border: 0; border-radius: 16px;
  background: var(--s2); color: var(--text); text-align: left; font-size: 15px;
}
.check i { width: 24px; height: 24px; border-radius: 8px; box-shadow: inset 0 0 0 1.5px #8f8474; display: grid; place-items: center; flex: none; }
.check[aria-checked="true"] i { background: var(--amber); box-shadow: none; color: var(--on-amber); }
.check i svg { width: 16px; height: 16px; opacity: 0; }
.check[aria-checked="true"] i svg { opacity: 1; }
.check small { margin-left: auto; color: var(--text2); font-size: 12.5px; }
.timein { font-family: var(--ff-num); font-size: 34px; font-weight: 300; background: transparent; border: 0; color: var(--text); color-scheme: dark; outline: none; width: 100%; padding: 8px 0; }

/* トースト（上から、光の帯） */
.glowtoast {
  position: absolute; z-index: 60; left: 50%; top: calc(12px + var(--st));
  width: max-content; max-width: calc(100% - 32px); padding: 10px 18px; border-radius: 999px;
  background: #2b2117; color: var(--text); font-size: 14px; font-weight: 500; line-height: 1.5;
  box-shadow: 0 0 0 1px #5a4630, 0 8px 30px rgba(0, 0, 0, .6), 0 0 30px -8px rgba(255, 178, 87, .5);
  transform: translate(-50%, -160%); opacity: 0; pointer-events: none;
  transition: transform 420ms var(--warm), opacity 260ms;
  display: flex; align-items: center; gap: 10px;
}
.glowtoast.is-on { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.glowtoast button { border: 0; background: transparent; color: var(--amber); font-weight: 700; min-height: 36px; padding: 0 6px; }

/* 起動・はじめに */
.boot { position: absolute; inset: 0; z-index: 90; background: var(--night); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.boot img { position: relative; border-radius: 24px; animation: ignite 900ms var(--warm) both; }
.boot__orb { position: absolute; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 178, 87, .35), rgba(255, 138, 61, 0) 65%); animation: warmup 1s var(--warm) both; }
.boot__name { position: relative; font-family: var(--ff-head); font-size: 22px; letter-spacing: .1em; animation: fadeIn 600ms 250ms both; }
.boot.is-off { animation: fadeOut 300ms both; }
@keyframes ignite { from { filter: brightness(.1); transform: scale(.85); } to { filter: none; transform: none; } }
@keyframes warmup { from { opacity: 0; transform: scale(.4); } }
.intro { position: absolute; inset: 0; z-index: 80; background: var(--night); display: flex; flex-direction: column; }
.intro.is-off { animation: fadeOut 300ms both; }
.intro__pic { flex: 1; min-height: 0; background: #0c0b0a url(/app-development/apps/a085/img/welcome.webp) center 78% / cover no-repeat; transition: filter 700ms var(--warm); }
.intro__panel { flex: none; padding: 22px 24px calc(20px + var(--sb)); background: var(--night); }
.intro__step { font-family: var(--ff-num); font-size: 13px; color: var(--amber); letter-spacing: .14em; }
.intro__t { margin-top: 6px; font-family: var(--ff-head); font-size: 25px; font-weight: 400; line-height: 1.45; }
.intro__d { margin-top: 10px; min-height: 5.4em; font-size: 15px; color: var(--text2); line-height: 1.8; }
.intro__btns { margin-top: 14px; display: flex; justify-content: space-between; gap: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .radar i { display: none; }
}
