/* KINORA Live Mode. A person, a next action, and a whole world beyond them. */
:root {
  --live-paper: #faf5e9;
  --live-ink: #263f34;
  --live-muted: #5d6b5d;
  --live-emerald: #285d46;
  --live-peach: #e7b394;
  --live-edge: #42624c26;
  --live-shadow: 0 8px 24px #18372e24, 0 1px 3px #0f30271c;
}

/* Compact, named navigation. The secondary notebooks keep their own shelf. */
.aster-rail, .interface-inspection .aster-rail {
  left: 24px; top: 92px; bottom: auto; width: auto; height: auto;
  display: block; padding: 6px; border-radius: 18px;
  background: #203e34f5; border: 1px solid #e7f1df35;
  box-shadow: var(--live-shadow); overflow: visible; z-index: 24;
}
.kinora-main-notebooks { display: flex; gap: 3px; }
.aster-rail .kinora-main-notebooks > button {
  width: 56px; min-width: 0; height: 51px; min-height: 51px;
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  border-radius: 12px; color: #e7efe1; padding: 6px 4px;
}
.aster-rail button span, .aster-rail button:hover span, .aster-rail button:focus-visible span {
  display: block; position: static; transform: none; white-space: nowrap;
  padding: 0; border: 0; border-radius: 0; background: none;
  box-shadow: none; color: inherit; font-size: 10px; line-height: 1;
}
.aster-rail button :where(svg,.kinora-image-icon) { width: 18px; height: 18px; flex: none; }
.aster-rail button:hover, .aster-rail button[aria-pressed="true"], .aster-rail button[aria-expanded="true"] {
  color: #fff8e8; background: #9ac8a82b; border-color: #b4dcc540; box-shadow: none;
}
.aster-rail button:focus-visible { outline: 2px solid #e7c89b; outline-offset: 1px; }
.aster-rail .kinora-extra-notebooks > button:focus-visible { outline-color: #52794e; }
.kinora-extra-notebooks {
  position: absolute; top: calc(100% + 8px); right: 0; width: 230px;
  padding: 13px; border: 1px solid var(--live-edge); border-radius: 19px;
  background: var(--live-paper); box-shadow: var(--live-shadow); color: var(--live-ink);
}
.kinora-extra-notebooks > small { display: block; padding: 3px 7px 11px; color: var(--live-muted); font-size: 10px; }
.aster-rail .kinora-extra-notebooks > button {
  display: flex; align-items: center; justify-content: flex-start; gap: 12px;
  width: 100%; height: 42px; min-height: 42px; padding: 10px 8px; color: var(--live-ink);
}
.aster-rail .kinora-extra-notebooks > button span { font-size: 12px; }
.aster-rail .kinora-extra-notebooks > button:is(:hover,[aria-pressed="true"]) { color: var(--live-emerald); background: #dce9d9; border-color: #7ea58733; }
.aster-rail:has(.kinora-extra-notebooks [aria-pressed="true"]) .kinora-notebook-more { background: #9ac8a82b; color: #fff8e8; }
.aster-caption { display: none !important; }
.aster-sheet { left: 24px; top: 166px; bottom: 244px; width: min(470px, calc(100vw - 48px)); }

/* The resident is the visual anchor. Their six needs are readable at rest. */
.life-dock {
  left: 24px; bottom: max(22px, env(safe-area-inset-bottom)); width: 354px;
  padding: 17px; gap: 0 13px; border-radius: 24px;
  grid-template-columns: 62px minmax(0, 1fr) 39px;
  background: var(--live-paper); color: var(--live-ink); border: 1px solid #fffaf2;
  box-shadow: var(--live-shadow); backdrop-filter: none;
}
.life-dock .avatar { width: 62px; height: 70px; border-radius: 17px; background: #d4dfc4; box-shadow: 0 0 0 1px #829b6a40; }
.life-dock .avatar img { border-radius: 17px; }
.life-dock .avatar > span { border-color: var(--live-paper); background: var(--resident-mood, #9cd8bc); color: var(--live-ink); }
.life-dock .character-summary #player-title { color: var(--live-muted); letter-spacing: 1.25px; font-size: 7px; line-height: 1.5; }
.life-dock .character-summary strong { color: var(--live-ink); font-size: 22px; letter-spacing: -.6px; line-height: 1.15; margin: 5px 0; }
.life-dock .mood, :root[data-theme="dark"] .life-dock .mood { color: #366348; font-size: 11px; font-weight: 600; }
.life-dock .mood.low { color: #9e4e3c; }
.life-dock .phone-launch { color: var(--live-emerald); background: #dce8d6; border: 1px solid #799d722e; height: 45px; box-shadow: none; }
.life-dock .needs-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 15px; margin-top: 17px; }
.life-dock .need { display: grid; grid-template-columns: 15px minmax(0,1fr); align-items: center; gap: 5px 5px; padding: 1px 0; text-align: left; }
.life-dock .need > :where(svg,.kinora-image-icon) { width: 14px; height: 14px; color: #63816b; grid-column: 1; grid-row: 1; }
.life-dock .need-label, .life-dock .need:hover .need-label, .life-dock .need:focus-visible .need-label {
  display: flex; justify-content: space-between; align-items: baseline; gap: 3px;
  grid-column: 2; grid-row: 1; position: static; transform: none;
  white-space: nowrap; padding: 0; border: 0; border-radius: 0; background: none;
  box-shadow: none; color: var(--live-ink); font-size: 10px; line-height: 1.2;
}
.life-dock .need-label b { color: var(--live-muted); font-size: 9px; font-variant-numeric: tabular-nums; font-weight: 500; }
.life-dock .need-track { grid-column: 1 / -1; grid-row: 2; height: 5px; background: #dedfce; }
.life-dock .need-track > span { background: #5c9c71; }
.life-dock .need.low .need-track > span { background: #cb955e; }
.life-dock .need.critical .need-track > span { background: #bf6651; }
.life-dock .need.critical .need-label, .life-dock .need.critical > :where(svg,.kinora-image-icon) { color: #a14e3c; }
.life-dock .need:focus-visible { outline: 2px solid #628c69; outline-offset: 4px; border-radius: 4px; }
.kinora-moodlets { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 5px; margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--live-edge); }
.kinora-moodlet { display: inline-flex; align-items: center; gap: 5px; color: #526b59; font-size: 9px; line-height: 1.5; }
.kinora-moodlet + .kinora-moodlet { margin-left: 4px; }
.kinora-moodlet i { width: 6px; height: 6px; border-radius: 50%; box-shadow: 0 0 0 1px #213a2520; }

/* The running activity and cancellable queue are adjacent to the person. */
.action-dock { left: 394px; bottom: 22px; width: min(290px, calc(100vw - 730px)); }
@media(min-width:1101px) { .action-dock { width: 360px; } }
.activity-panel { padding: 16px 17px; border-radius: 19px; background: var(--live-paper); border: 1px solid #fffcf2; box-shadow: var(--live-shadow); color: var(--live-ink); }
.activity-copy strong { color: var(--live-ink); font-size: 13px; line-height: 1.4; }
.activity-copy small { color: var(--live-muted); font-size: 10px; line-height: 1.6; white-space: normal; }
.activity-track { height: 4px; margin-top: 12px; background: #dce1d0; }
.activity-track > span { background: #689b73; }
/* The legacy theme applies a more specific :root[data-theme] .glass rule.
   These two opaque paper surfaces keep their matched ink in every theme. */
#game :is(.life-dock,.activity-panel) { background: var(--live-paper); color: var(--live-ink); border-color: #fffaf2; box-shadow: var(--live-shadow); backdrop-filter: none; -webkit-backdrop-filter: none; }
#action-queue { bottom: calc(100% + 9px); gap: 7px; max-width: 100%; padding: 2px 0 4px; }
.queue-item { position: relative; flex: 0 0 173px; max-width: 173px; display: grid; grid-template-columns: 31px minmax(0,1fr) 14px; grid-template-rows: 12px 19px; align-items: center; gap: 1px 8px; padding: 10px; border-radius: 14px; background: var(--live-paper); color: var(--live-ink); border-color: #d0d8c4; box-shadow: 0 3px 8px #1e332c16; text-align: left; }
.queue-item.active { border-color: #72a27e; background: #edf3e6; }
.queue-item .queue-order { grid-column: 2; grid-row: 1; color: #516c58; font-size: 8px; font-weight: 700; letter-spacing: 1px; }
.queue-item > :where(svg,.kinora-image-icon), .queue-item > .action-art { grid-column: 1; grid-row: 1 / 3; width: 30px; height: 30px; }
.queue-item > span:not(.cancel) { grid-column: 2; grid-row: 2; max-width: none; font-size: 10px; }
.queue-item .cancel { grid-column: 3; grid-row: 1 / 3; color: #6a7e6d; font-size: 16px; }
.queue-item:focus-visible { outline: 2px solid #2c7552; outline-offset: -3px; }

/* A small observation-driven invitation, never an omniscient town feed. */
.kinora-nearby { position: absolute; top: 98px; right: 24px; width: 252px; padding: 15px; border-radius: 22px; background: #faf5e9f7; color: var(--live-ink); border: 1px solid #fffaf0; box-shadow: var(--live-shadow); z-index: 12; }
.kinora-nearby > header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.kinora-nearby header small { display: block; font-size: 7px; font-weight: 600; letter-spacing: 1.55px; color: var(--live-muted); }
.kinora-nearby h2 { font: 400 24px/1.1 var(--os-display,Georgia,serif); letter-spacing: -.6px; margin: 5px 0 0; }
.kinora-nearby-count { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #e7ddca; color: #56624d; font-size: 10px; }
.kinora-nearby-items { display: grid; gap: 6px; }
.kinora-nearby-card { display: flex; align-items: center; width: 100%; min-height: 57px; gap: 10px; padding: 9px; text-align: left; border: 1px solid #c6d5bc55; border-radius: 13px; background: #e9eddf; color: var(--live-ink); }
.kinora-nearby-card.person { background: #f1e5d9; border-color: #ddbea76b; }
.kinora-nearby-card:hover { background: #dbe7d3; border-color: #94b388; }
.kinora-nearby-card:disabled { cursor: default; opacity: .72; }
.kinora-nearby-card:focus-visible { outline: 2px solid #4a805b; outline-offset: 2px; }
.kinora-nearby-art { display: grid; place-items: center; width: 31px; flex: 0 0 31px; color: #687f5a; }
.kinora-nearby-art > :where(svg,.kinora-image-icon) { width: 28px; height: 28px; }
.kinora-nearby-copy { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.kinora-nearby-copy strong { font-size: 11px; font-weight: 600; line-height: 1.3; }
.kinora-nearby-copy small { font-size: 9px; color: var(--live-muted); line-height: 1.35; }
.kinora-nearby-open { font-size: 14px; color: #71846b; }
.kinora-nearby-open :where(svg,.kinora-image-icon) { display: block; width: 12px; height: 12px; }
.kinora-nearby > p { font-size: 9px; line-height: 1.5; margin: 12px 0 0; color: var(--live-muted); }

/* Named scales make it easy to return from a city view to a person's life. */
.camera-controls { top: auto; right: 24px; bottom: 86px; padding: 7px; gap: 2px; border-radius: 17px; background: #203e34f5; box-shadow: var(--live-shadow); }
#game .camera-controls { background: #203e34f5; border-color: #d6e8ce35; box-shadow: var(--live-shadow); color: #dce6d5; }
#game .camera-controls > button { color: #dce6d5; }
.camera-controls[data-live-mode-controls="true"] { display: flex; flex-wrap: wrap; justify-content: center; width: 280px; }
.camera-controls[data-live-mode-controls="true"] > :is(#home-camera,#follow-camera) { display: none; }
.kinora-camera-presets { display: flex; width: 100%; gap: 4px; padding-bottom: 6px; margin-bottom: 3px; border-bottom: 1px solid #bcd8c02b; }
.camera-controls .kinora-camera-presets button { flex: 1; width: auto; height: 30px; padding: 0 10px; border-radius: 9px; background: transparent; color: #dce6d5; font-size: 10px; }
.camera-controls .kinora-camera-presets button[aria-pressed="true"] { background: #cce2c3; color: #2c503b; }
.camera-controls button:focus-visible { outline: 2px solid #e7c89b; outline-offset: 1px; }
.kinora-return-life { position: absolute; right: 24px; bottom: 189px; z-index: 13; display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-radius: 13px; background: var(--live-paper); color: var(--live-emerald); border: 1px solid #fff9e8; box-shadow: var(--live-shadow); font-size: 11px; }
.kinora-return-life :where(svg,.kinora-image-icon) { width: 16px; height: 16px; }
.controls-hint { bottom: 69px; font-size: 8px; opacity: .75; }

:is(.kinora-nearby,.kinora-moodlets,.kinora-extra-notebooks,.kinora-return-life)[hidden] { display: none !important; }
body:has(:is(#loading,#error,#title-screen,#welcome,#pause-menu):not([hidden])) :is(.kinora-nearby,.kinora-return-life,.aster-rail) { visibility: hidden; pointer-events: none; }
body:has(:is(#drawer,.aster-sheet,#conversation):not([hidden])) .kinora-nearby { display: none; }

@media(min-width:1320px) {
  .aster-rail, .interface-inspection .aster-rail { left: 50%; top: 22px; transform: translateX(-50%); }
  .aster-sheet { top: 98px; }
}
@media(max-width:1100px) {
  .life-dock { width: 332px; padding: 15px; grid-template-columns: 57px minmax(0,1fr) 35px; gap: 0 10px; }
  .life-dock .avatar { width: 57px; height: 65px; }
  .life-dock .character-summary strong { font-size: 21px; }
  .action-dock { left: 373px; width: calc(100vw - 694px); min-width: 190px; }
  .kinora-nearby { width: 235px; }
}
@media(max-width:900px) {
  .aster-rail { top: 86px; }
  .kinora-nearby { display: none; }
  .life-dock { width: 320px; }
  .action-dock { left: 360px; width: calc(100vw - 384px); min-width: 0; }
  .camera-controls { bottom: 174px; }
  .kinora-return-life { bottom: 275px; }
  .time-dock { bottom: 124px; }
  .controls-hint { display: none; }
  .aster-sheet { top: 158px; bottom: 233px; }
}
@media(max-width:600px) {
  .aster-rail, .interface-inspection .aster-rail { left: 12px; right: 12px; top: 78px; bottom: auto; transform: none; width: auto; padding: 5px; border-radius: 15px; }
  .kinora-main-notebooks { justify-content: space-between; gap: 1px; }
  .aster-rail .kinora-main-notebooks > button { flex: 1; width: auto; height: 43px; min-height: 43px; border-radius: 10px; gap: 4px; }
  .aster-rail button :where(svg,.kinora-image-icon) { width: 16px; height: 16px; }
  .aster-rail button span { font-size: 9px; }
  .kinora-extra-notebooks { width: 215px; }
  .life-dock { left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); width: auto; padding: 12px 14px; border-radius: 20px; grid-template-columns: 47px minmax(0,1fr) 36px; gap: 0 11px; }
  .life-dock .avatar { width: 47px; height: 53px; border-radius: 13px; }
  .life-dock .avatar img { border-radius: 13px; }
  .life-dock .character-summary strong { font-size: 20px; }
  .life-dock .character-summary #player-title { font-size: 6px; }
  .life-dock .mood { font-size: 10px; }
  .life-dock .needs-grid { margin-top: 12px; gap: 10px 15px; }
  .life-dock .need-label { font-size: 10px; }
  .life-dock .need > :where(svg,.kinora-image-icon) { width: 12px; height: 12px; }
  .kinora-moodlets { margin-top: 9px; padding-top: 8px; }
  .action-dock { left: 12px; bottom: 182px; width: calc(100vw - 197px); }
  body:has(.kinora-moodlets:not([hidden])) .action-dock { bottom: 213px; }
  .activity-panel { padding: 11px 13px; border-radius: 15px; }
  .activity-copy strong { font-size: 11px; }
  .activity-copy small { font-size: 9px; line-height: 1.45; max-height: 27px; overflow: hidden; }
  .activity-track { margin-top: 9px; height: 3px; }
  #action-queue { bottom: calc(100% + 6px); }
  .queue-item { flex-basis: 154px; max-width: 154px; padding: 8px; }
  .time-dock { right: 12px; bottom: 184px; gap: 1px; padding: 5px; }
  body:has(.kinora-moodlets:not([hidden])) .time-dock { bottom: 215px; }
  .time-dock button { width: 27px; height: 28px; }
  .camera-controls[data-live-mode-controls="true"] { width: 166px; right: 12px; bottom: 233px; gap: 0; padding: 5px; border-radius: 14px; }
  body:has(.kinora-moodlets:not([hidden])) .camera-controls { bottom: 264px; }
  .camera-controls .kinora-camera-presets button { font-size: 9px; padding: 0 5px; height: 27px; }
  .camera-controls .kinora-camera-presets { gap: 2px; padding-bottom: 5px; }
  .camera-controls #wall-mode { width: 70px; padding: 0 5px; font-size: 8px; justify-content: center; }
  .camera-controls .icon-button { width: 20px; height: 25px; }
  .camera-controls > .separator { display: none; }
  .kinora-return-life { right: 12px; bottom: 318px; font-size: 10px; padding: 9px 11px; }
  body:has(.kinora-moodlets:not([hidden])) .kinora-return-life { bottom: 349px; }
  .aster-sheet { left: 12px; right: 12px; width: auto; top: 142px; bottom: 198px; border-radius: 20px; }
}
@media(max-height:650px) and (min-width:601px) {
  .life-dock { padding: 12px 14px; }
  .life-dock .avatar { width: 47px; height: 53px; }
  .life-dock .needs-grid { margin-top: 11px; gap: 9px 13px; }
  .kinora-moodlets { margin-top: 8px; padding-top: 7px; }
  .kinora-nearby { top: 87px; }
  .kinora-nearby-items { gap: 4px; }
  .kinora-nearby-card { min-height: 49px; padding: 7px; }
  .aster-sheet { bottom: 202px; }
}
@media(prefers-reduced-transparency:reduce) { .kinora-nearby { background: var(--live-paper); } }
/* Illustrated Life: give raster silhouettes enough room to read. */
.aster-rail button .kinora-image-icon{width:24px;height:24px}
.aster-rail .kinora-main-notebooks>button{gap:3px}
.life-dock .need{grid-template-columns:20px minmax(0,1fr)}
.life-dock .need>.kinora-image-icon{width:20px;height:20px}
.wallet .kinora-image-icon,.audience .kinora-image-icon{width:22px;height:22px}
.camera-controls .kinora-image-icon,.time-dock .kinora-image-icon{width:20px;height:20px}
.phone-launch .kinora-image-icon{width:27px;height:30px}
.phone-app .kinora-image-icon{width:32px;height:32px}
.kinora-nearby-art>.kinora-image-icon{width:34px;height:34px}
@media(max-width:560px){.aster-rail button .kinora-image-icon{width:22px;height:22px}.life-dock .need{grid-template-columns:18px minmax(0,1fr)}.life-dock .need>.kinora-image-icon{width:18px;height:18px}.wallet .kinora-image-icon,.audience .kinora-image-icon{width:19px;height:19px}}
