.room-roles { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0 0 30px; }
.room-roles button { display: flex; align-items: center; gap: 8px; border: 0; border-bottom: 1px solid transparent; padding: 8px 0; background: transparent; color: #a7beba; font: 400 12px "Ubuntu", sans-serif; }
.room-roles button[aria-pressed="true"] { color: #e8f2df; border-bottom-color: #b0d6c1; }
.room-roles button:hover { color: #80d4df; }
.life-world[data-pixel][data-screen="casting"] { background: var(--studio-paper); color: var(--studio-ink); font-family: var(--studio-sans); }
.life-world[data-pixel][data-screen="casting"] .life-world-topbar { flex-shrink: 0; font-family: "Ubuntu", sans-serif; }
.life-world[data-pixel][data-screen="casting"] .life-content { height: auto; }
.life-world[data-pixel][data-screen="casting"] .life-tools button { color: var(--studio-ink); width: 40px; height: 40px; }
.story-casting { height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: 42px 24px 48px; }
.story-casting-inner { width: min(1120px, 100%); margin: auto; }
.story-casting h1 { margin: 0 0 12px; font: 400 36px/1.2 var(--studio-serif); color: var(--studio-ink); }
.story-casting-intro { max-width: 72ch; margin: 0 0 30px; font: 400 15px/1.7 var(--studio-sans); color: var(--studio-muted); }
.story-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.story-card { min-width: 0; overflow: hidden; border: 1px solid rgba(10, 141, 211, .16); border-radius: 8px; background: linear-gradient(180deg, rgba(255,255,255,.74), rgba(240,248,255,.48)), rgba(255,255,255,.52); box-shadow: inset 0 1px rgba(255,255,255,.86), 0 8px 24px rgba(15,23,42,.035); backdrop-filter: blur(18px) saturate(160%); }
.story-card-start { display: flex; flex-direction: column; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; text-align: left; color: var(--studio-ink); font-family: var(--studio-sans); }
.story-card-image { display: block; width: 100%; aspect-ratio: 39 / 28; position: relative; overflow: hidden; background: var(--studio-line); }
.story-card-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.story-card-copy { display: flex; flex-direction: column; flex: 1; padding: 23px 24px 25px; }
.story-card-person { font-size: 12px; color: var(--studio-muted); margin-bottom: 10px; }
.story-card-title { font: 400 27px/1.2 var(--studio-serif); margin-bottom: 14px; }
.story-card-description { font-size: 14px; line-height: 1.7; color: var(--studio-muted); margin-bottom: 24px; }
.story-card-command { display: flex; align-items: center; justify-content: space-between; font-size: 13px; margin-top: auto; color: var(--studio-ink); }
.story-card-command i { color: var(--studio-blue); }
.story-card-start:hover .story-card-title { color: var(--studio-blue); }
.life-world[data-pixel] .story-card-start:focus-visible { outline-offset: -4px; }
.life-world[data-pixel] .date-clock,
.life-world[data-pixel] [data-room-hint] { display: none; }
.game-pause-tools { display: flex; justify-content: center; gap: 16px; margin-top: 26px; }
.game-pause-tools button { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #b5d0cc55; border-radius: 6px; color: #e0eee4; background: #b5d0cc0e; font-size: 20px; }
.game-pause-tools button:hover { background: #b5d0cc2b; }
.life-world[data-pixel] .date-hud { top: 74px; }
.life-world[data-pixel] .room-glasses { top: auto; bottom: 83px; padding: 8px; width: 38px; height: 38px; justify-content: center; }
.life-world[data-pixel] .room-glasses span { display: none; }
@media (max-width: 760px) {
    .story-casting { padding: 28px 20px; }
    .story-casting h1 { font-size: 30px; }
    .story-casting-intro { font-size: 14px; margin-bottom: 24px; }
    .story-card-grid { grid-template-columns: 1fr; gap: 16px; }
    .story-card-start { display: grid; grid-template-columns: 105px minmax(0, 1fr); height: auto; min-height: 210px; }
    .story-card-image { aspect-ratio: auto; height: 100%; min-height: 210px; }
    .story-card-copy { padding: 17px 18px; }
    .story-card-person { font-size: 11px; margin-bottom: 7px; }
    .story-card-title { font-size: 23px; margin-bottom: 10px; }
    .story-card-description { font-size: 12px; line-height: 1.6; margin-bottom: 17px; }
    .story-card-command { font-size: 12px; }
}
@media (max-width: 360px) {
    .story-casting { padding-inline: 16px; }
    .story-card-start { grid-template-columns: 80px minmax(0, 1fr); }
    .story-card-copy { padding: 16px; }
}
.room-menu h2 { max-width: 500px; }
.life-world[data-pixel] .date-menu { overflow-y: auto; }
.room-reserve { display: flex; gap: 8px; align-items: center; font-size: 11px; white-space: nowrap; }
.room-reserve i { color: #dfce9d; }
.room-reserve strong { font-variant-numeric: tabular-nums; font-weight: 500; }
.room-reserve > div { display: flex; gap: 8px; align-items: center; }
[data-story="mother"] .room-reserve { margin-left: auto; padding: 11px 16px; min-width: 202px; border-radius: 4px; background: #14363780; backdrop-filter: blur(16px); box-shadow: inset 0 1px #dcecdc40; }
[data-story="mother"] .room-reserve > div { display: grid; grid-template-columns: 1fr auto; gap: 2px 20px; }
[data-story="mother"] .room-reserve strong { font-size: 25px; line-height: 1.15; }
[data-story="mother"] .room-reserve small { grid-column: 1 / -1; font-size: 10px; color: #d3e2c9; }
[data-story="mother"] .room-reserve[data-low="true"] strong { color: #f0a4a1; }
.room-ledger { width: min(490px, 100%); margin: 14px 0 18px; font-size: 13px; font-variant-numeric: tabular-nums; }
.room-ledger > div { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; }
.room-ledger dt { color: #bfd6cc; }
.room-ledger dd { margin: 0; color: #e9f2da; white-space: nowrap; }
.room-ledger-total { border-top: 1px solid #a8ccbc38; margin-top: 5px; padding-top: 9px !important; font-weight: 500; }
.room-cash-result > span { font-size: 12px; color: #bdd7c6; }
.room-cash-result h2 { font-size: 38px; margin: 8px 0 !important; font-variant-numeric: tabular-nums; }
.room-cash-result h2 small { font-size: 15px; font-weight: 400; }
.room-cash-result p { font-size: 12px; color: #bdd7c6; margin: 0 0 24px; }
.room-game .date-ending-copy > h3 { font-size: 19px; font-weight: 500; margin-bottom: 12px; }
.room-game .date-hud { color: #f3f5e8; text-shadow: 0 1px 3px #244136, 0 0 12px #29443d; }
.room-game .date-objective { max-width: 460px; }
.room-assistant { position: absolute; z-index: 6; top: max(28%, var(--room-feedback-bottom, 0px)); right: 32px; width: min(340px, 35%); padding: 14px 16px; border-radius: 4px; background: #183b3ce3; border-left: 2px solid #85d3c4; color: #ecf6e8; backdrop-filter: blur(14px); pointer-events: none; max-height: max(0px, calc(100% - var(--room-talk-height, 0px) - var(--room-assistant-top, 0px) - 16px)); overflow: auto; }
.room-assistant > span { display: flex; align-items: center; gap: 8px; color: #a1dcd1; font-size: 11px; }
.room-assistant small { margin-left: auto; white-space: nowrap; font-variant-numeric: tabular-nums; }
.room-assistant p { font-size: 14px; line-height: 1.6; margin: 10px 0 0; }
.room-feedback { top: 175px; }
.room-policies { grid-template-columns: 1fr 1fr; gap: 4px 28px; }
.room-policies button { align-items: flex-start; }
.room-policies small { display: block; color: #a2c4b6; font-size: 11px; line-height: 1.5; margin-top: 5px; }
.room-policies button:disabled { opacity: .66; }
.room-policies button i { margin-top: 3px; }
.room-build-tools { display: flex; gap: 8px; margin-top: 10px; }
.room-build-tools button { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #a5cabc55; border-radius: 4px; background: #b0d6c117; color: #c7e9d8; font-size: 17px; }
.room-build-tools button:disabled { opacity: .4; }
.room-game [data-build="true"] .date-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 24px; }
[data-story="elder"] .date-dialogue[data-build="true"] { padding-top: 18px; padding-bottom: 32px; }
[data-story="elder"] .date-dialogue[data-build="true"] .date-lines > p { font-size: 13px; line-height: 1.5; margin: 6px 0 12px; }
[data-story="elder"] .date-dialogue[data-build="true"] .date-choices button { padding-top: 9px; padding-bottom: 9px; font-size: 12px; line-height: 1.45; }
.room-diagram { --brick: #498fa8; width: 170px; height: 58px; position: relative; margin: 10px 0 36px; background: var(--brick); border-radius: 2px; display: flex; align-items: flex-start; justify-content: space-around; box-shadow: inset 0 -10px #00000012; }
.room-diagram[data-brick="white"] { --brick: #e5e8de; }
.room-diagram[data-brick="yellow"] { --brick: #dcb75c; }
.room-diagram[data-brick="red"] { --brick: #b36570; }
.room-diagram[data-brick="green"] { --brick: #67957a; }
.room-diagram i { width: 24px; height: 9px; margin-top: -5px; background: var(--brick); box-shadow: inset 0 2px #ffffff55; border-radius: 2px; }
.room-diagram span { position: absolute; top: 66px; left: 0; font-size: 11px; color: #bfdbce; white-space: nowrap; }
.room-game [data-room-capture] { display: block; }
.room-glasses { position: absolute; z-index: 7; top: 132px; left: 32px; display: flex; align-items: center; gap: 9px; padding: 8px 11px; border: 1px solid #b6cfc33b; border-radius: 4px; background: #183b3c9c; backdrop-filter: blur(14px); color: #e4eddf; font: 400 11px "Ubuntu",sans-serif; }
.room-glasses i { font-size: 19px; }
.room-glasses[aria-pressed="true"] { color: #b8e1de; border-color: #b8e1de70; }
.room-glasses:disabled { opacity: .6; }
.room-page-tools, .room-alignment-tools { display: flex; align-items: center; gap: 8px; margin: 10px 0 12px; color: #d0e5d5; font-size: 11px; }
.room-page-tools button, .room-alignment-tools button { display: grid; place-items: center; flex: none; width: 34px; height: 32px; border: 1px solid #a5cabc55; border-radius: 4px; background: #b0d6c117; color: #d0e5d5; font-size: 17px; }
.room-page-tools button:disabled { opacity: .4; }
.room-page-tools button[data-studied="true"] { color: #b3e6c6; border-color: #b3e6c68a; }
.room-manual-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.room-manual-bar .room-page-tools { margin: 0; }
.room-game .date-dialogue[data-manual="true"] { padding: 18px 32px 38px; background: linear-gradient(transparent, #143034e8); pointer-events: none; }
[data-story="elder"] .date-dialogue[data-ambient="true"] { padding-top: 32px; padding-bottom: 38px; }
.room-alignment-tools span { margin-left: auto; }
[data-story="elder"] .date-mood > span:last-child { font-size: 20px; width: 35px; }
.room-mood-result { display: flex; align-items: baseline; gap: 24px; margin-bottom: 22px; color: #d0e5d5; font-size: 12px; }
.room-mood-result strong { font-size: 34px; font-variant-numeric: tabular-nums; }
.room-mood-result small { font-size: 13px; font-weight: 400; }
.room-workbench-tools { position: absolute; z-index: 7; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; gap: 8px; padding: 6px; background: #193537b8; backdrop-filter: blur(14px); border: 1px solid #b6cfc33b; border-radius: 6px; }
.room-workbench-tools button { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 4px; background: transparent; color: #dbeadc; font-size: 20px; }
.room-workbench-tools button:hover { background: #b0d6c125; }
.room-workbench-tools button:disabled { opacity: .4; }
[data-story="elder"][data-workshop="pieces"] .room-feedback,
[data-story="elder"][data-workshop="pieces"] .room-assistant { top: auto; bottom: 92px; max-height: 128px; }
@media(max-width:700px) {
    [data-story="elder"] .date-objective { flex-basis: 100%; }
    [data-story="elder"] .date-mood { margin-left: 0; }
    .room-glasses { left: 16px; top: 173px; }
    [data-story="elder"] .room-assistant { top: max(225px, var(--room-feedback-bottom, 0px)); }
    [data-story="elder"] .room-feedback { top: 225px; }
    .room-alignment-tools { gap: 5px; }
    .room-alignment-tools button { width: 31px; height: 30px; }
    .room-alignment-tools span { font-size: 10px; }
    [data-story="elder"] .date-dialogue[data-manual="true"] { padding: 12px 16px 32px; }
}
@media (max-width:700px) {
    .room-roles { gap: 7px 16px; margin-bottom: 22px; }
    .room-roles button { font-size: 11px; gap: 6px; }
    .room-reserve { font-size: 10px; }
    .room-game .date-hud { gap: 9px 14px; }
    [data-story="mother"] .date-objective { flex-basis: 100%; }
    [data-story="mother"] .room-reserve { margin-left: 0; padding: 8px 12px; min-width: 172px; }
    [data-story="mother"] .room-reserve strong { font-size: 22px; }
    [data-story="mother"] .date-clock { margin-left: auto; }
    .room-ledger { font-size: 11px; margin: 10px 0 12px; }
    .room-game .date-mood { margin-left: auto; }
    .room-game .date-clock { min-width: 42px; }
    .room-game .date-mood progress { width: 48px; }
    .room-game .date-mood { gap: 5px; }
    .room-assistant { top: max(185px, var(--room-feedback-bottom, 0px)); right: 16px; width: min(300px, calc(100% - 32px)); padding: 10px 12px; }
    .room-assistant p { font-size: 12px; }
    .room-assistant > span { font-size: 10px; }
    [data-story="mother"] .room-assistant { top: max(225px, var(--room-feedback-bottom, 0px)); }
    [data-story="mother"] .room-feedback { top: 225px; }
    .room-game .date-dialogue { max-height: calc(100% - 180px); }
    .room-policies { grid-template-columns: 1fr; gap: 3px; }
    .room-policies small { font-size: 10px; }
    .room-game [data-build="true"] .date-choices { gap: 4px 18px; }
    [data-story="elder"] .date-dialogue[data-build="true"] { padding-top: 14px; padding-bottom: 28px; }
    [data-story="elder"] .date-dialogue[data-build="true"] .date-lines > p { font-size: 12px; margin-bottom: 9px; }
    [data-story="elder"] .date-dialogue[data-build="true"] .date-choices button { font-size: 11px; padding-top: 7px; padding-bottom: 7px; }
    .room-game [data-room-capture] { display: none; }
}
@media (max-height:620px) {
    .room-roles { margin-bottom: 12px; }
    .room-menu { overflow-y: auto; align-items: flex-start; }
    .life-world[data-pixel] .date-menu { align-items: flex-start; }
    .room-menu h2 { font-size: 32px; }
    .room-game .date-dialogue { max-height: calc(100% - 148px); overflow-y: auto; }
    .room-assistant { top: max(155px, var(--room-feedback-bottom, 0px)); }
}
.room-time-fade { position: absolute; inset: 0; background: #11191d; opacity: 0; pointer-events: none; z-index: 3; }
.room-game .date-dialogue[data-instruction="true"] .date-choices:empty { display: none; }
.room-game .date-dialogue[data-instruction="true"] p { overflow-wrap: anywhere; }
[data-story="mother"] .date-lines > p { padding-inline-end: .5em; }
.room-thinking { display: flex; align-items: center; gap: 12px; margin-top: 12px; color: #a1dcd1; font-size: 12px; }
.room-thinking small { font-variant-numeric: tabular-nums; }
.room-thinking .date-glasses-thinking { margin: 0; align-items: center; }
[data-story="elder"] .date-dialogue[data-instruction="true"] { pointer-events: none; padding-top: 26px; }
.room-phone-layer { position: absolute; z-index: 2; inset: 0; pointer-events: none; }
.room-phone-screen { box-sizing: border-box; display: flex; flex-direction: column; width: 320px; height: 565px; overflow: hidden; padding: 16px; background: #163239; color: #e2eee8; font: 400 22px/1.5 "Ubuntu", sans-serif; pointer-events: auto; }
.room-phone-screen * { box-sizing: border-box; letter-spacing: 0; }
.room-phone-screen header { display: flex; align-items: center; gap: 10px; flex: 0 0 48px; font-size: 19px; color: #cce5df; }
.room-phone-screen button { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border: 0; padding: 0; border-radius: 4px; background: transparent; color: #cce5df; font-size: 25px; cursor: pointer; touch-action: manipulation; }
.room-phone-screen button:focus-visible, .room-phone-screen textarea:focus-visible { outline: 2px solid #9dd6da; outline-offset: 3px; }
.room-phone-screen button:hover { background: #36545b; }
.room-phone-chat { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 4px; scrollbar-width: thin; }
.room-phone-chat p { margin: 0 0 20px; font-size: 22px; line-height: 1.5; overflow-wrap: anywhere; }
.room-phone-chat [data-phone-message] { padding-left: 26px; color: #83bdc7; }
.room-phone-chat [data-phone-photo] { display: block; width: 112px; height: 149px; margin: 0 0 10px auto; object-fit: cover; border-radius: 3px; }
.room-phone-screen form { position: relative; flex: none; padding: 10px 0 4px; border-top: 1px solid #36545b; }
.room-phone-screen textarea { display: block; width: 100%; height: 145px; resize: none; padding: 12px 46px 48px 10px; border: 0; border-radius: 4px; background: #213e44; color: #e2eee8; font: 400 25px/1.45 "Ubuntu", sans-serif; }
.room-phone-screen [data-phone-camera] { position: absolute; left: 3px; bottom: 9px; color: #a1dcd1; }
.room-phone-screen textarea::placeholder { color: #9cb9b9; opacity: 1; }
.room-phone-screen [data-phone-send] { position: absolute; right: 3px; bottom: 9px; color: #163239; background: #a1dcd1; }
.room-phone-screen [data-phone-send]:disabled { color: #829b9d; background: #36545b; cursor: default; }
.room-phone-camera { display: flex; flex: 1; min-height: 0; flex-direction: column; }
.room-phone-viewfinder { position: relative; flex: 1; min-height: 0; overflow: hidden; border-radius: 3px; background: #11262c; }
.room-phone-viewfinder canvas { display: block; width: 100%; height: 100%; object-fit: cover; }
.room-phone-viewfinder [data-phone-photo-flash] { position: absolute; inset: 0; background: #e2eee8; opacity: 0; pointer-events: none; }
.room-phone-camera footer { display: grid; place-items: center; flex: none; height: 72px; }
.room-phone-camera [data-phone-shutter] { width: 56px; height: 56px; border: 2px solid #a1dcd1; border-radius: 50%; color: #cce5df; font-size: 40px; }
.room-phone-camera [data-phone-shutter]:disabled { opacity: .4; cursor: default; }
