/* 日陰の台帳: the pieces of this game on top of style.css (the heat band, the chat, the puzzle boards) */
:root { --heat: #ff9a4a; --cool: #5aa8ff; }
.paper.note { font-family: var(--hand); background: #eef2ea; border-left: 6px solid #9fb8c8; }
/* the heat band (暑熱バンド): left top, under the room name */
#heat { position: absolute; left: 14px; top: 82px; display: flex; align-items: center; gap: 8px; background: rgba(14, 10, 8, 0.66); padding: 5px 10px; border-radius: 4px; border-left: 3px solid var(--heat); color: #ffe0c8; font-size: 0.82em; }
#heat .bar { position: relative; width: 140px; height: 9px; background: rgba(255, 255, 255, 0.14); border-radius: 5px; overflow: hidden; }
#heat .bar i { position: absolute; inset: 0; background: linear-gradient(90deg, #f0c060, #ff6a2a); transform-origin: left; transform: scaleX(0); transition: transform 0.25s; }
#heat .bar u { position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(255, 255, 255, 0.7); }
#heat .bar u.w { left: 60%; }
#heat .bar u.l { left: 85%; }
#heat b { min-width: 2em; text-align: right; font-size: 1.15em; }
#heat em { font-style: normal; color: #ffd0a8; }
#heat.warn { border-left-color: #ff6a2a; }
#heat.limit { border-left-color: #ff2a1a; background: rgba(40, 8, 4, 0.75); }
#heat.limit b { color: #ff8a6a; }
#photocard { top: 124px; }
#caught { position: fixed; inset: 0; z-index: 41; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; pointer-events: none; color: #f0e8e0; text-shadow: 0 2px 6px #000; font-family: var(--serif); text-align: center; padding: 0 16px; }
#caught b { font-size: clamp(30px, 7vw, 54px); letter-spacing: 0.3em; }
#caught span { font-size: calc(14px * var(--text-scale)); color: #c8beb4; }
#mirrorframe { border-color: #b8c4cc; box-shadow: 0 0 0 2px #4a5660, 0 6px 14px rgba(0, 0, 0, 0.6); }
#mirrorframe span { color: #c8d4dc; }
/* the chat (業務端末) */
.chatwin { min-width: min(520px, 86vw); }
.chatwin .msgs { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow: auto; padding: 8px; background: #e8ece8; border-radius: 6px; }
.chatwin .msg { max-width: 82%; padding: 7px 11px; border-radius: 10px; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15); line-height: 1.55; }
.chatwin .msg b { display: block; font-size: 0.75em; color: #5a6a62; }
.chatwin .msg p { margin: 0; }
.chatwin .msg.me { align-self: flex-end; background: #d8f0e0; }
.chatwin .msg.typing p { letter-spacing: 0.3em; color: #8a948e; }
.chatwin .replies { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.chatwin .reply { text-align: left; }
/* the exit choices */
.choices { display: flex; flex-direction: column; gap: 8px; }
.choice { text-align: left; }
.choice.locked { opacity: 0.62; display: flex; flex-direction: column; gap: 2px; }
.choice.locked small { color: #7a4a3a; font-size: 0.8em; }
.journal .tasks { list-style: none; padding: 0; }
.journal .tasks li { padding: 2px 0; }
.journal .tasks li i { display: inline-block; width: 1.6em; color: var(--warn); font-style: normal; font-weight: 700; }
.journal .tasks li.ok { color: var(--accent); }
.quest .cnt { position: absolute; right: 6px; top: 4px; color: #8a948e; font-size: 0.8em; }
/* P01 */
.p01 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.p01 .screen { background: #0e1a1e; color: #bfe8d8; border-radius: 4px; padding: 6px 8px; font-size: 0.84em; overflow-x: auto; }
.p01 .screen .cap { margin: 0 0 4px; color: #7fd0b0; }
.p01 table.reg { border-collapse: collapse; width: 100%; }
.p01 table.reg td, .p01 table.reg th { border-bottom: 1px solid #2a4040; padding: 2px 6px; text-align: left; white-space: nowrap; }
.p01 .slips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 56px; }
.slip { background: #fffdf2; border: 1px solid #c8bea4; border-radius: 3px; padding: 4px 8px; display: flex; flex-direction: column; text-align: left; cursor: grab; min-height: 44px; color: var(--ink); font-size: 0.85em; touch-action: none; }
.slip span { font-size: 0.82em; color: #5a625e; }
.slip.picked { box-shadow: 0 0 0 3px #e8c060; }
.p01 .trays { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tray2 { border: 2px dashed #9aa49e; border-radius: 6px; min-height: 90px; padding: 6px; display: flex; flex-wrap: wrap; gap: 5px; align-content: flex-start; background: #f2f0e6; }
.tray2 h5 { width: 100%; margin: 0 0 2px; font-size: 0.85em; color: #3a4a42; }
.tray2.hover, .drop.hover { border-color: #e8a040; background: #fff4dc; }
.ghost { opacity: 0.85; transform: rotate(-2deg); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35); }
/* P02 */
.p02 .crates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.crate { border: 2px dashed #9aa49e; border-radius: 6px; padding: 6px; min-height: 120px; background: #eef2f4; }
.crate.cur { border-style: solid; border-color: var(--accent); }
.crate h5 { margin: 0 0 4px; font-size: 0.85em; display: flex; justify-content: space-between; }
.crate .in { display: flex; flex-wrap: wrap; gap: 4px; min-height: 52px; }
.crate .sum { margin: 4px 0 0; font-weight: 700; }
.sum.ok { color: var(--accent); }
.sum.over { color: var(--warn); }
.p02 .shelf { display: flex; gap: 18px; justify-content: center; margin-top: 10px; }
.p02 .stock { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 0.8em; }
.bot { border: 0; border-radius: 10px 10px 5px 5px; background: linear-gradient(180deg, #c8e4f4, #8ab8d8); color: #133; font-weight: 700; cursor: grab; touch-action: none; min-width: 44px; min-height: 44px; }
.bot.s1 { width: 44px; }
.bot.s2 { height: 56px; width: 46px; }
.bot.s4 { height: 70px; width: 52px; }
.bot:disabled { opacity: 0.35; }
/* P03 */
.p03 { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.p03 figure { margin: 0; text-align: center; }
.p03 canvas { width: min(220px, 38vw); height: auto; border-radius: 50%; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); display: block; }
.p03 .gview { filter: blur(0.4px) contrast(0.95); }
.dialwrap { display: inline-block; border-radius: 50%; cursor: grab; touch-action: none; outline-offset: 4px; }
.dialwrap.turning { cursor: grabbing; }
.p03 figcaption { font-size: 0.82em; color: #45514b; margin-top: 4px; }
/* P04 */
.p04 .pipes { width: 100%; max-width: 520px; display: block; margin: 0 auto; background: #182024; border-radius: 6px; }
.p04 .valve { cursor: pointer; }
.p04 .valve:focus { outline: none; }
.p04 .valve:focus circle { stroke-width: 8; }
/* P05 */
.p05 .line { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.tslot { border: 2px dashed #9aa49e; border-radius: 5px; min-height: 96px; padding: 3px; position: relative; background: #f2f0e6; }
.tslot i { position: absolute; left: 4px; top: 2px; font-style: normal; color: #8a948e; font-size: 0.75em; }
.tslot em { display: block; margin-top: 30px; text-align: center; color: #9aa49e; font-size: 0.75em; font-style: normal; }
.rec { background: #fffdf2; border: 1px solid #c8bea4; border-radius: 3px; padding: 4px 6px; text-align: left; font-size: 0.74em; line-height: 1.35; cursor: grab; color: var(--ink); touch-action: none; display: flex; flex-direction: column; gap: 2px; width: 100%; min-height: 44px; }
.rec time { font-weight: 700; color: #2a5a7a; }
.rec.picked { box-shadow: 0 0 0 3px #d04a2a; }
.recs2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin-top: 8px; }
.slipnote { display: flex; gap: 10px; align-items: center; margin-top: 8px; background: #f4ecd2; padding: 6px; border-radius: 4px; }
.slipnote .sn { width: 90px; height: 64px; object-fit: cover; border-radius: 3px; }
/* P06 */
.sliders6 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.zone { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 0.8em; }
.zone b { font-size: 0.9em; text-align: center; min-height: 2.4em; }
.track6 { position: relative; width: 44px; height: 150px; background: #1e2a2e; border-radius: 6px; cursor: grab; touch-action: none; overflow: hidden; }
.track6 i { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(0deg, #2a7ad8, #8ac8f4); }
.track6 u { position: absolute; left: 0; right: 0; height: 2px; background: #fff; }
.zone.low .track6 { box-shadow: 0 0 0 2px var(--warn); }
.zone .val { font-weight: 700; font-size: 1.1em; }
.zone .temp.hot { color: var(--warn); }
.zone .pm { display: flex; gap: 2px; }
.zone .pm button { min-width: 44px; min-height: 44px; }
/* P07 */
.grid7 { display: grid; grid-template-columns: repeat(5, minmax(44px, 1fr)); gap: 4px; max-width: 420px; margin: 0 auto; touch-action: none; }
.cell7 { aspect-ratio: 1.2; border: 0; border-radius: 4px; background: #5a3a2a; color: #ffd8b8; font-weight: 700; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 44px; }
.cell7.niche { background: #2a5a8a; color: #d8ecff; }
.cell7.start, .cell7.exit { background: #3a5a4a; color: #e8f4ec; }
.cell7.on { box-shadow: inset 0 0 0 3px #ffe08a; }
.cell7 small { font-size: 0.72em; color: #fff; }
.p07roll .names { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
.nm { min-height: 44px; border-radius: 4px; border: 1px solid #a7b0a8; background: #fffdf2; color: var(--ink); }
.nm.hand { background: #f6eedc; }
.nm small { display: block; font-size: 0.7em; color: #8a6a4a; }
.nm.ok { background: #d8f0e0; border-color: var(--accent); font-weight: 700; }
/* P08 */
.p08 .rail { border: 2px dashed #9aa49e; border-radius: 6px; padding: 10px; text-align: center; background: #e8ece8; min-height: 56px; }
.p08 .hooked { color: var(--accent); }
.p08 .hook { display: flex; align-items: center; gap: 8px; margin: 8px auto; cursor: grab; touch-action: none; min-height: 44px; }
.p08 .hookimg { width: 52px; height: 52px; object-fit: cover; border-radius: 4px; }
.p08 .rope { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-top: 8px; padding: 8px; background: linear-gradient(180deg, transparent 46%, #e07a28 46%, #e07a28 54%, transparent 54%); }
.p08 .rope.dim { opacity: 0.4; }
.knot { width: 44px; height: 44px; border-radius: 50%; border: 0; background: #c86a20; color: #fff; font-weight: 700; }
.knot.on { background: #ffe08a; color: #3a2a10; }
.signbox p { margin: 4px 0; }
@media (max-width: 560px) {
  .track6 { width: 36px; height: 120px; }
  .p01 .trays, .p02 .crates { grid-template-columns: 1fr; }
  .p05 .line { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #heat .bar { width: 90px; }
}
