.item-view-window[data-key="ha-dog-door-incident-log"] { --item-accent: #9b461b; }
.item-view-window[data-key="ha-household-dashboards"] { --item-accent: #3553a0; }
.item-view-window[data-key="ha-apple-watch-complications"] { --item-accent: #69358b; }
.item-view-window[data-key="ha-tesla-cards"] { --item-accent: #a42e38; }
.item-view-window[data-key="ha-plant-care-dashboard"] { --item-accent: #316445; }
.item-view-window[data-key="ha-achievement-unlocked"] { --item-accent: #52630c; }
.item-view-window[data-key="ha-september-comedy-pack"] { --item-accent: #873152; }
.item-view-window[data-key="ha-shady-mlm-pitch"] { --item-accent: #8d4d16; }
.item-view-window[data-key="ha-home-assistant-union"] { --item-accent: #973e31; }
.item-view-window[data-key="ha-reverse-netflix-prompt"] { --item-accent: #91284c; }
.item-view-window[data-key="ha-pet-translator"] { --item-accent: #326463; }
.item-view-window[data-key="ha-game-show-mode"] { --item-accent: #725508; }
.item-view-window[data-key="ha-haunted-house"] { --item-accent: #56457e; }
.item-view-window[data-key="ha-sarcasm-announcer"] { --item-accent: #365985; }
.item-view-window[data-key="ha-brainstormed-gags"] { --item-accent: #7c435e; }
.item-view-window[data-key="small-widgets-and-conversions"] { --item-accent: #255d79; }
.item-view-window[data-key="ha-roast-action"] { --item-accent: #f4b24d; }
.item-view-window[data-key="ha-meta-evil-roast-persona"] { --item-accent: #f2a581; }
.item-view-window[data-key="ha-rotating-voice-personas"] { --item-accent: #99db8b; }
.item-view-window[data-key="ha-ai-prompts-and-conductor"] { --item-accent: #8bd2ed; }

.item-view {
  container-type: inline-size;
  --paper: #f7f4ed;
  --ink: #242421;
  --panel: color-mix(in srgb, var(--item-accent) 9%, var(--paper));
  --line: color-mix(in srgb, var(--ink) 36%, var(--paper));
  background: var(--paper);
  color: var(--ink);
  padding: 1rem;
  overflow-wrap: anywhere;
}
.item-view.terminal { --paper: #17140f; --ink: #f7e7cb; }
.item-view .trail a { color: inherit; }
.item-view header { margin-bottom: .65rem; }
.item-view h1 { margin: 0 0 .35rem; font-size: 1.55rem; line-height: 1.14; }
.item-view.terminal h1 { color: var(--item-accent); }
.item-view p, .item-view dl, .item-view dd { margin: 0; }
.item-view small { display: block; }
.item-view .item-reconstruction, .item-view .item-capture { font-size: .78rem; }
.item-view .item-reconstruction { margin: 0 0 .65rem; }
.item-view .item-capture { margin: .7rem 0 0; }
.item-view summary, .item-view button, .item-switches > label, .buzzer-round > label { cursor: pointer; }
.item-view summary { min-height: 2rem; padding: .35rem .45rem; }
.item-view summary:hover, .item-switches > label:hover { background: var(--panel); }
.item-view details > div, .item-view details > p { padding: .35rem .6rem .6rem; }
.item-view :focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.item-switches { border: 0; padding: 0; margin: 0; min-inline-size: 0; display: flex; flex-wrap: wrap; gap: .3rem; }
.item-switches > input, .buzzer-round > input { position: absolute; opacity: 0; pointer-events: none; }
.item-switches > label, .buzzer-round > label {
  color: inherit;
  border: 1px solid var(--line);
  padding: .4rem .55rem;
}
.item-switches > input:focus-visible + label, .buzzer-round > input:focus-visible + label { outline: 2px solid currentColor; }
.item-switches > input:checked + label { color: white; background: var(--item-accent); }
.item-view.terminal .item-switches > input:checked + label { color: var(--paper); }
.item-readout { display: none; order: 1; flex-basis: 100%; padding: .65rem; background: var(--panel); }
.item-switches > input:checked + label + .item-readout { display: block; }
.item-panes { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; }
.item-panes dt { margin-bottom: .35rem; font-weight: 700; }

.door-still { margin: 0 0 .55rem; background: #202623; color: #f5f2dc; }
.door-still div {
  height: 5rem;
  background: linear-gradient(90deg,#38463e 28%,#727361 28% 67%,#38463e 67%);
  position: relative;
}
.door-still div::after {
  content: '';
  position: absolute;
  inset: 22% 44% 0;
  border: 4px solid #222821;
  background: linear-gradient(#171d19 68%, #a7a18b 68% 74%, #35392c 74%);
}
.door-still figcaption { padding: .3rem .55rem; font: .75rem var(--mono); }
.item-security table { width: 100%; border-collapse: collapse; text-align: left; }
.item-security caption { text-align: left; font-weight: 700; }
.item-security td, .item-security th { border-bottom: 1px solid var(--line); padding: .2rem .4rem; }
.item-security td:first-child { font-family: var(--mono); vertical-align: top; white-space: nowrap; }
.item-security summary { padding-inline: 0; }

.room-status, .garage-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: .35rem; }
.room-status div { background: #253a57; color: #fff; padding: .6rem; }
.room-status dd { font-size: 1.13rem; font-weight: 700; }
.room-cards { margin-top: .55rem; display: grid; gap: .25rem; }
.room-cards details { border-bottom: 1px solid var(--line); }

.watch-strap { margin-inline: auto; max-width: 21rem; padding-block: .6rem; background: linear-gradient(90deg,transparent 24%,#6b5273 24% 76%,transparent 76%); }
.watch-face { background: #25212c; color: #fff; border: 5px solid #766681; border-radius: 2rem; padding: .65rem .8rem 1rem; }
.watch-face time { font: 700 2.4rem/1.1 var(--mono); display: block; margin-bottom: .35rem; }
.watch-face .item-switches label { border-radius: 1rem; font-size: .8rem; }
.watch-face .item-readout, .watch-face .item-switches label:hover { background: #42374e; }

.item-garage { --paper: #e8e8e9; }
.garage-grid { grid-template-columns: 1.4fr 1fr; margin-bottom: .65rem; }
.garage-grid div { background: #29292d; color: white; padding: .75rem .65rem; }
.garage-grid strong { display: block; font-size: 1.12rem; }
.garage-grid meter { width: 3.5rem; }

.item-plants { --paper: #eef4e8; }
.plant-gauges { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .5rem; }
.plant-gauges article { background: #fff; border: 1px solid var(--line); padding: .5rem; }
.plant-gauges label, .plant-gauges meter { display: block; width: 100%; }
.plant-gauges strong { font-size: 1.5rem; color: #1f5334; }

.chore-medals, .trace-steps, .drawer-files, .conductor-run { margin: 0; padding: 0; list-style: none; }
.chore-medals li { border-block-end: 1px solid var(--line); }
.chore-medals summary > span:last-child { display: inline-block; vertical-align: middle; }
.medal-mark { display: inline-block; width: 1.2rem; height: 1.2rem; margin-inline: .3rem; background: #daba58; border: 3px double #725508; border-radius: 50%; vertical-align: middle; }

.item-cart { --paper: #f0e3e8; }
.item-cart .item-switches { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
.item-cart .item-switches > label { background: #faf4f7; border: 1px solid #87546a; min-height: 2.5rem; }
.item-cart .item-switches > input:checked + label { background: var(--item-accent); }
.item-cart .item-readout { grid-column: 1 / -1; background: #33232d; color: #ffe7f3; }
.item-cart .cue-trigger { font-family: var(--mono); margin-bottom: .35rem; }

.item-pitch { --paper: #faecd2; }
.pitch-stage { text-align: center; background: #5d2920; color: #fff6dc; padding: 1rem; }
.pitch-stage blockquote { margin: .25rem 0 .7rem; font: 700 1.9rem/1.02 Georgia,serif; }
.pitch-stage summary, .item-autoplay summary { display: list-item; width: fit-content; margin-inline: auto; }
.pitch-stage summary:hover { background: #783b2d; }

.grievance { background: #fffdf6; border: 1px solid #a9584a; padding: .65rem; }
.grievance dl { display: grid; grid-template-columns: max-content 1fr; gap: .15rem .65rem; border-bottom: 2px solid #973e31; padding-bottom: .35rem; }
.grievance dt { font-weight: 700; }
.grievance details[open] strong { display: block; font-family: Georgia,serif; }

.autoplay-player { background: #2f1723; color: #fff4f7; padding: .8rem; text-align: center; }
.autoplay-player time { display: block; font: 700 2rem var(--mono); }
.autoplay-player blockquote { margin: .4rem 0; }
.item-autoplay > details { background: var(--panel); }

.item-translator { --paper: #eaf3f1; }
.translator-languages { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; font-weight: 700; padding: .5rem; background: #214a47; color: white; }
.item-translator .item-switches { margin-top: .35rem; }
.item-translator .item-readout { background: white; }
.item-translator .item-panes div + div { border-inline-start: 1px solid var(--line); padding-inline-start: .6rem; }

.buzzer-round { background: #392944; color: #fff9e7; padding: .65rem; text-align: center; }
.buzzer-score { background: #211924; padding: .4rem; margin-bottom: .65rem; }
.buzzer-score strong { display: block; color: #ffdb68; font: 700 2.3rem var(--mono); }
.buzzer-round > label { display: inline-block; border: 2px solid #e6a322; background: #825217; }
.buzzer-round .round-state { margin: .5rem 0; }
.buzzer-round button { padding: .28rem .5rem; color: #fff9e7; background: #392944; border: 1px solid #dec1e8; }
.buzzer-round :is(.buzzer-score strong, .round-state) span + span,
.buzzer-round:has(input:checked) :is(.buzzer-score strong, .round-state) span:first-child { display: none; }
.buzzer-round:has(input:checked) :is(.buzzer-score strong, .round-state) span + span { display: inline; }

.item-scenes { --paper: #241e30; --ink: #fff0ff; }
.scene-light { height: 4.5rem; background: radial-gradient(ellipse at bottom,#9777bc,#292036 67%); margin-bottom: .45rem; }
.item-scenes:has(input:nth-of-type(2):checked) .scene-light { background: repeating-linear-gradient(110deg,#332841 0 12%,#261e33 12% 24%); }
.item-scenes:has(input:nth-of-type(3):checked) .scene-light { background: radial-gradient(ellipse at top,#ba7c79,#292036 73%); }

.forecast-slot { display: flex; align-items: center; gap: .75rem; background: #dce8f5; padding: .65rem; }
.forecast-slot time { font: 700 1.75rem var(--mono); }
.forecast-slot blockquote { margin: .2rem 0; }

.drawer-filter { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: .4rem; }
.drawer-files li { background: #efe1cc; margin-bottom: .18rem; }
.drawer-files li:nth-child(even) { background: #f2e8da; }
.item-drawer:has([data-written-only]:checked) .drawer-files li:not([data-written-line]) { display: none; }

.widget-shelf { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .55rem; }
.widget-shelf article { border: 1px solid var(--line); padding: .5rem; }
.widget-shelf h2 { font-size: 1rem; margin: .35rem 0; }
.widget-art { height: 3.7rem; background: #d6e5ec; display: grid; place-items: center; }
.widget-art-0::before { content: ''; width: 2rem; height: 2.6rem; background: repeating-linear-gradient(#1d4356 0 3px,#acc5d2 3px 5px); border: 4px solid #1d4356; }
.widget-art-1::before { content: ''; width: 3rem; height: 2.4rem; background: #2e6480; clip-path: polygon(0 53%,100% 0,77% 100%,55% 67%,44% 90%,38% 64%); }

.trace-command { color: var(--item-accent); border-bottom: 1px solid var(--line); padding-bottom: .35rem; }
.trace-steps { counter-reset: trace; }
.trace-steps li { counter-increment: trace; display: grid; grid-template-columns: 2.1rem 1fr; align-items: start; }
.trace-steps li::before { content: "0" counter(trace); padding-top: .4rem; color: var(--item-accent); }
.prompt-limits, .casting-label { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .55rem; }
.prompt-limits code, .casting-label code { padding: .3rem .45rem; background: var(--panel); color: var(--item-accent); }
.item-casting .item-switches { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
.item-casting .item-readout { grid-column: 1 / -1; border: 1px dashed var(--item-accent); }
.conductor-run > li { border-bottom: 1px solid var(--line); padding: .5rem 0; }
.conductor-run > li > strong { color: var(--item-accent); }

@container (max-width: 340px) {
  .plant-gauges { grid-template-columns: 1fr; }
  .plant-gauges article { display: grid; grid-template-columns: 1fr auto; gap: .25rem .5rem; }
  .plant-gauges details { grid-column: 1 / -1; }
  .item-cart .item-switches { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
