:root{
  --bg:#030504;
  --panel:#0b120f;
  --gold:#b99355;
  --muted:#9f9788;
  --line:rgba(185,147,85,.35);
  --green:#16382d;
}

*{box-sizing:border-box}

body{
  margin:0;
  min-height:100vh;
  background:radial-gradient(circle at 40% -10%,#173226,#030504 55%,#000);
  color:#efe6d2;
  font-family:Georgia,"Times New Roman",serif;
}

#app{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:28px;
}

.panel{
  width:min(820px,92vw);
  border:1px solid var(--line);
  background:rgba(5,9,7,.94);
  padding:36px;
  box-shadow:0 40px 120px #000;
}

.seal{
  text-align:center;
  color:var(--gold);
  letter-spacing:5px;
  font-size:13px;
  margin-bottom:18px;
}

h1{
  color:var(--gold);
  font-size:44px;
  letter-spacing:3px;
  text-align:center;
  margin:0 0 12px;
}

h2{
  text-align:center;
  color:#d8c59b;
  font-weight:normal;
  letter-spacing:2px;
  margin:0 0 26px;
}

.notice{
  border:1px solid var(--line);
  background:rgba(255,255,255,.04);
  padding:22px;
  margin:28px 0;
  line-height:1.7;
}

.muted{color:var(--muted)}

.terminal{
  font-family:monospace;
  background:#020403;
  border:1px solid #1c5b3c;
  color:#9efac4;
  padding:16px;
  white-space:pre-line;
  line-height:1.6;
}

.center{text-align:center}

.btn{
  margin-top:28px;
  background:var(--green);
  border:1px solid var(--gold);
  color:white;
  padding:13px 18px;
  cursor:pointer;
  font:inherit;
  letter-spacing:1px;
}
label{
  display:block;
  color:var(--gold);
  margin:18px 0 8px;
  letter-spacing:1px;
}

.field{
  width:100%;
  background:#020403;
  border:1px solid var(--line);
  color:#efe6d2;
  padding:13px;
  font:inherit;
}

.area{
  min-height:130px;
  resize:vertical;
}

.government-panel{
  width:min(1120px,94vw);
}

.government-constitution,
.government-summary,
.candidate-grid,
.sovereign-controls{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
  gap:16px;
  margin:24px 0;
}

.government-office{
  position:relative;
  overflow:hidden;
  min-height:220px;
  padding:24px;
  border:1px solid var(--line);
  background:linear-gradient(145deg,rgba(25,35,30,.95),rgba(3,5,4,.98));
}

.government-office::after{
  content:"";
  position:absolute;
  width:150px;
  height:150px;
  right:-45px;
  bottom:-65px;
  border:1px solid rgba(185,147,85,.23);
  border-radius:50%;
  box-shadow:0 0 0 18px rgba(185,147,85,.04);
}

.sovereign-office{
  border-color:#d2aa62;
  background:
    radial-gradient(circle at 85% 15%,rgba(185,147,85,.22),transparent 34%),
    linear-gradient(145deg,#241b10,#060706 75%);
}

.minister-office{
  border-color:#326f57;
}

.government-office h3,
.candidate-card h3,
.government-decree h3,
.sovereign-console h3{
  color:var(--gold);
  letter-spacing:1px;
}

.government-office small,
.portal-card small{
  display:block;
  color:var(--muted);
  line-height:1.6;
}

.government-kicker{
  color:var(--gold);
  font-family:monospace;
  font-size:12px;
  letter-spacing:2px;
}

.government-summary .portal-card{
  min-height:150px;
}

.government-election,
.government-decrees,
.sovereign-console{
  margin:34px 0;
  padding:24px;
  border:1px solid var(--line);
  background:rgba(0,0,0,.22);
}

.government-election-heading{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:24px;
  border-bottom:1px solid var(--line);
  padding-bottom:18px;
}

.government-election-heading h2,
.government-decrees h2,
.sovereign-console h2{
  text-align:left;
  margin:5px 0;
}

.election-dates{
  display:grid;
  gap:7px;
  color:var(--muted);
  font-size:14px;
}

.candidate-card,
.government-decree{
  border:1px solid var(--line);
  background:rgba(255,255,255,.035);
  padding:20px;
  line-height:1.7;
}

.candidate-card.selected{
  border-color:#68aa86;
  box-shadow:inset 0 0 0 1px rgba(104,170,134,.24);
}

.candidate-votes{
  color:#9efac4;
  font-family:monospace;
}

.ballot-secrecy{
  border-left:3px solid #68aa86;
  padding:12px 16px;
  color:#b9d7c7;
}

.consent-check{
  display:flex;
  align-items:flex-start;
  gap:10px;
  color:#d8c59b;
  line-height:1.5;
}

.consent-check input{
  margin-top:5px;
}

.sovereign-console{
  border-color:#d2aa62;
  background:
    radial-gradient(circle at 50% 0,rgba(185,147,85,.13),transparent 38%),
    rgba(6,5,3,.78);
}

.sovereign-controls .portal-card{
  min-height:auto;
}

.sovereign-controls .btn{
  width:100%;
}

.government-privacy{
  border-left:4px solid #326f57;
}

.sovereign-status{
  display:inline-block;
  margin-top:6px;
  color:#f2cf86;
  font-size:12px;
  letter-spacing:1px;
  text-transform:uppercase;
}

@media(max-width:700px){
  .government-panel{
    width:94vw;
    padding:22px 16px;
  }

  .government-election,
  .government-decrees,
  .sovereign-console{
    padding:17px;
  }

  .government-election-heading{
    display:grid;
  }

  .government-constitution,
  .government-summary,
  .candidate-grid,
  .sovereign-controls{
    grid-template-columns:1fr;
  }
}
.choice{
  display:block;
  width:100%;
  margin:12px 0;
  padding:14px;
  background:rgba(0,0,0,.28);
  border:1px solid var(--line);
  color:#efe6d2;
  text-align:left;
  cursor:pointer;
  font:inherit;
}

.choice:hover{
  background:rgba(22,56,45,.7);
  border-color:var(--gold);
}
.id-card{
  margin:28px auto;
  max-width:680px;
  border:2px solid var(--gold);
  background:
    radial-gradient(circle at 20% 20%, rgba(185,147,85,.16), transparent 35%),
    linear-gradient(135deg, rgba(16,24,21,.95), rgba(4,6,5,.98));
  box-shadow:0 24px 60px rgba(0,0,0,.55);
}

.id-header{
  text-align:center;
  padding:14px;
  color:var(--gold);
  letter-spacing:3px;
  border-bottom:1px solid var(--line);
  font-size:13px;
}

.id-body{
  display:flex;
  gap:22px;
  padding:24px;
  align-items:stretch;
}

.id-photo{
  width:160px;
  min-height:190px;
  display:grid;
  place-items:center;
  text-align:center;
  background:#111;
  border:8px solid #2b2015;
  color:#d9c59b;
  font-family:monospace;
  letter-spacing:2px;
}

.id-info{
  flex:1;
}

.id-info p{
  display:grid;
  grid-template-columns:140px 1fr;
  gap:12px;
  margin:0;
  padding:9px 0;
  border-bottom:1px solid rgba(185,147,85,.18);
}

.id-info b{
  color:var(--gold);
}

.id-footer{
  padding:12px;
  text-align:center;
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size:12px;
  letter-spacing:2px;
}

@media(max-width:700px){
  .id-body{
    flex-direction:column;
  }

  .id-photo{
    width:100%;
  }

  .id-info p{
    grid-template-columns:1fr;
  }
}
.dashboard-panel{
  width:min(1100px,94vw);
}

.portal-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
  gap:14px;
  margin-top:24px;
}

.portal-card{
  border:1px solid var(--line);
  background:rgba(255,255,255,.04);
  padding:18px;
  min-height:140px;
}

.portal-card h3{
  color:var(--gold);
  margin-top:0;
  letter-spacing:1px;
}

.portal-card p{
  color:#efe6d2;
  line-height:1.6;
}
.office-screen{
  width:min(1180px,94vw);
  min-height:86vh;
  border:1px solid var(--line);
  background:
    radial-gradient(circle at 80% 10%, rgba(185,147,85,.12), transparent 30%),
    linear-gradient(135deg, rgba(8,14,11,.96), rgba(2,3,3,.98));
  padding:28px;
  box-shadow:0 40px 120px #000;
}

.office-header{
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:flex-start;
  border-bottom:1px solid var(--line);
  padding-bottom:20px;
  margin-bottom:24px;
}

.office-header h1{
  text-align:left;
  margin:8px 0;
}

.office-header h2{
  text-align:left;
  margin:0;
}

.office-status{
  border:1px solid var(--line);
  padding:14px;
  color:var(--muted);
  min-width:230px;
  text-align:right;
}

.office-status b{
  color:var(--gold);
}

.office-room{
  min-height:430px;
  position:relative;
  border:1px solid rgba(185,147,85,.22);
  background:
    radial-gradient(circle at 50% 0%, rgba(185,147,85,.10), transparent 35%),
    linear-gradient(180deg, rgba(60,35,18,.28), rgba(0,0,0,.28));
  overflow:hidden;
  padding:26px;
}

.office-room::before{
  content:"";
  position:absolute;
  left:8%;
  right:8%;
  bottom:0;
  height:190px;
  background:
    linear-gradient(135deg, rgba(80,45,22,.95), rgba(32,18,10,.98));
  border:1px solid rgba(185,147,85,.22);
  box-shadow:0 -20px 60px rgba(0,0,0,.45);
}

.desk-item{
  position:absolute;
  z-index:2;
  width:180px;
  min-height:116px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  background:rgba(5,9,7,.88);
  border:1px solid var(--line);
  color:#efe6d2;
  cursor:pointer;
  font:inherit;
  box-shadow:0 18px 40px rgba(0,0,0,.45);
}

.desk-item:hover{
  border-color:var(--gold);
  transform:translateY(-4px);
  filter:brightness(1.12);
}

.desk-item span{
  color:var(--gold);
  font-weight:bold;
}

.desk-item small{
  color:var(--muted);
}

.mail{left:8%;top:70px}
.casefile{left:36%;top:120px}
.prophet{right:10%;top:80px}
.cabinet{left:18%;bottom:45px}
.profile{right:16%;bottom:55px}

@media(max-width:800px){
  .office-header{
    flex-direction:column;
  }

  .office-status{
    text-align:left;
    width:100%;
  }

  .office-room{
    display:grid;
    gap:12px;
    min-height:auto;
  }

  .office-room::before{
    display:none;
  }

  .desk-item{
    position:relative;
    left:auto;
    right:auto;
    top:auto;
    bottom:auto;
    width:100%;
  }
}
.npc-dialogue{
  border-left:4px solid var(--gold);
}

.npc-dialogue p{
  font-size:18px;
}
#dialogueBtn:disabled{
  opacity:.45;
  cursor:not-allowed;
}
.dialogue-panel{
  width:min(980px,94vw);
}

.dialogue-layout{
  display:grid;
  grid-template-columns:260px 1fr;
  gap:24px;
  align-items:stretch;
}

.npc-portrait{
  border:1px solid var(--line);
  background:rgba(255,255,255,.04);
  padding:20px;
  text-align:center;
}

.portrait-frame{
  height:260px;
  display:grid;
  place-items:center;
  border:8px solid #2b2015;
  background:
    radial-gradient(circle at 50% 25%, rgba(185,147,85,.22), transparent 35%),
    linear-gradient(135deg,#111,#030504);
  box-shadow:inset 0 0 40px rgba(0,0,0,.7);
}

.portrait-frame span{
  font-size:64px;
  color:var(--gold);
  letter-spacing:4px;
}

.npc-portrait h2{
  margin:16px 0 6px;
}

.npc-portrait p{
  color:var(--muted);
}

.dialogue-box{
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}

.dialogue-box h1{
  text-align:left;
}

@media(max-width:760px){
  .dialogue-layout{
    grid-template-columns:1fr;
  }

  .portrait-frame{
    height:180px;
  }
}
.office-scene{
  width:min(1180px,94vw);
  min-height:88vh;
  border:1px solid var(--line);
  background:
    radial-gradient(circle at 50% 0%, rgba(185,147,85,.16), transparent 30%),
    linear-gradient(180deg, rgba(8,14,11,.96), rgba(1,2,2,.99));
  padding:24px;
  box-shadow:0 40px 120px #000;
  position:relative;
  overflow:hidden;
}

.office-window{
  height:150px;
  border:1px solid rgba(185,147,85,.28);
  background:
    linear-gradient(180deg, rgba(22,37,42,.8), rgba(3,5,7,.95));
  position:relative;
  overflow:hidden;
  margin-bottom:20px;
}

.office-window::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(90deg, transparent 24%, rgba(185,147,85,.18) 25%, transparent 26%),
    linear-gradient(0deg, transparent 48%, rgba(185,147,85,.18) 49%, transparent 50%);
}

.window-text{
  position:absolute;
  left:18px;
  bottom:14px;
  color:var(--muted);
  letter-spacing:2px;
  font-size:12px;
}

.rain{
  position:absolute;
  inset:-40px;
  background-image:
    linear-gradient(120deg, rgba(255,255,255,.18) 0 1px, transparent 1px 14px);
  background-size:18px 28px;
  animation:rainMove 1.2s linear infinite;
  opacity:.45;
}

@keyframes rainMove{
  from{transform:translateY(-20px)}
  to{transform:translateY(20px)}
}

.office-topbar{
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:flex-start;
  border-bottom:1px solid var(--line);
  padding-bottom:18px;
  margin-bottom:22px;
}

.office-topbar h1{
  text-align:left;
  margin:8px 0;
}

.office-topbar h2{
  text-align:left;
  margin:0;
}

.shared-world-status{
  border:1px solid var(--line);
  background:rgba(3,8,6,.86);
  padding:18px;
  margin:0 0 20px;
}

.shared-world-heading{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
}

.shared-world-heading h3{
  color:#efe6d2;
  margin:5px 0 0;
  letter-spacing:1px;
}

.shared-world-kicker,
.shared-world-event-meta{
  color:var(--gold);
  font-size:12px;
  letter-spacing:2px;
  margin:0;
}

.shared-world-badge{
  border:1px solid var(--line);
  color:#efe6d2;
  padding:7px 10px;
  font-family:monospace;
  font-size:12px;
  letter-spacing:1px;
}

.shared-world-badge.status-normal{
  border-color:#3f8a62;
  color:#baf4d1;
}

.shared-world-badge.status-heightened,
.shared-world-badge.status-restricted{
  border-color:#b99355;
  color:#f4cf83;
}

.shared-world-badge.status-emergency{
  border-color:#9f5f5f;
  color:#ffd0d0;
}

.shared-world-events{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:12px;
  margin-top:15px;
}

.shared-world-event{
  border-left:3px solid var(--line);
  background:rgba(255,255,255,.035);
  padding:13px 14px;
}

.shared-world-event.severity-priority,
.shared-world-event.severity-emergency{
  border-left-color:#9f5f5f;
}

.shared-world-event h3{
  color:#efe6d2;
  font-size:17px;
  margin:8px 0;
}

.shared-world-event p{
  line-height:1.55;
  margin-bottom:0;
}

.shared-world-personal-date{
  margin-bottom:0;
  font-size:13px;
}

.desk-scene{
  min-height:390px;
  position:relative;
  border:1px solid rgba(185,147,85,.22);
  background:
    radial-gradient(circle at 50% 25%, rgba(185,147,85,.10), transparent 32%),
    linear-gradient(180deg, rgba(40,24,13,.45), rgba(7,4,3,.95));
  overflow:hidden;
}

.desk-scene::before{
  content:"";
  position:absolute;
  left:6%;
  right:6%;
  bottom:0;
  height:230px;
  background:
    linear-gradient(135deg, rgba(80,45,22,.96), rgba(30,16,8,.98));
  border:1px solid rgba(185,147,85,.25);
  box-shadow:0 -24px 60px rgba(0,0,0,.55);
}

.object{
  position:absolute;
  z-index:2;
  min-width:145px;
  min-height:95px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:6px;
  background:rgba(4,7,6,.88);
  border:1px solid var(--line);
  color:#efe6d2;
  cursor:pointer;
  font:inherit;
  box-shadow:0 20px 40px rgba(0,0,0,.5);
  transition:.18s ease;
}

.object:hover{
  transform:translateY(-5px) scale(1.02);
  border-color:var(--gold);
  filter:brightness(1.15);
}

.object span{
  color:var(--gold);
  font-weight:bold;
}

.object small{
  color:var(--muted);
}

.employee-id{left:9%;bottom:78px}
.owl-mail{left:34%;bottom:138px}
.assignment{left:47%;bottom:62px}
.prophet{right:10%;bottom:145px}
.coffee{right:33%;bottom:78px;min-width:100px}
.cabinet{right:7%;top:175px}

.cabinet.locked{
  opacity:.6;
}

.cabinet.unlocked{
  box-shadow:0 0 28px rgba(185,147,85,.28), 0 20px 40px rgba(0,0,0,.5);
}

.office-terminal{
  margin-top:20px;
}

@media(max-width:820px){
  .office-topbar{
    flex-direction:column;
  }

  .shared-world-heading{
    flex-direction:column;
  }

  .desk-scene{
    display:grid;
    gap:12px;
    min-height:auto;
    padding:16px;
  }

  .desk-scene::before{
    display:none;
  }

  .object{
    position:relative;
    left:auto;
    right:auto;
    top:auto;
    bottom:auto;
    width:100%;
  }
}
.desk-scene{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:16px;
  min-height:auto;
  padding:24px;
}

.desk-scene::before{
  display:none;
}

.object{
  position:relative;
  left:auto;
  right:auto;
  top:auto;
  bottom:auto;
  width:100%;
  min-height:110px;
  opacity:1;
}

@media(max-width:820px){
  .desk-scene{
    grid-template-columns:1fr;
    padding:16px;
  }
}

.cabinet{
  position:relative;
}
.case-list{
  display:grid;
  gap:12px;
  margin:24px 0;
}

.case-entry{
  display:grid;
  gap:6px;
  text-align:left;
  padding:18px;
  background:rgba(0,0,0,.28);
  border:1px solid var(--line);
  color:#efe6d2;
  font:inherit;
  cursor:pointer;
}

.case-entry b{
  color:var(--gold);
  letter-spacing:2px;
}

.case-entry span{
  font-size:20px;
}

.case-entry small{
  color:var(--muted);
}

.case-entry.available:hover{
  background:rgba(22,56,45,.65);
  border-color:var(--gold);
}

.case-entry.locked{
  opacity:.45;
  cursor:not-allowed;
}
.evidence-document{
  white-space:pre-wrap;
  color:#efe6d2;
  font-family:monospace;
  line-height:1.7;
  background:rgba(0,0,0,.22);
  border:1px solid rgba(185,147,85,.22);
  padding:16px;
}
.ministry-document{
  background:#efe6d2;
  color:#1d1710;
  border:2px solid var(--gold);
  padding:28px;
  margin:22px 0;
  box-shadow:0 24px 70px rgba(0,0,0,.55);
}

.doc-seal{
  text-align:center;
  color:#7b1f1f;
  letter-spacing:3px;
  font-weight:bold;
  border-bottom:2px solid #7b1f1f;
  padding-bottom:12px;
  margin-bottom:18px;
}

.doc-header h2{
  color:#1d1710;
  text-align:center;
  margin:0;
}

.doc-header p{
  text-align:center;
  color:#5b4a36;
}

.doc-meta{
  border-top:1px solid #8b785f;
  border-bottom:1px solid #8b785f;
  padding:12px 0;
  margin:18px 0;
}

.doc-meta p{
  display:grid;
  grid-template-columns:160px 1fr;
  margin:6px 0;
  color:#1d1710;
}

.doc-body{
  white-space:pre-wrap;
  font-family:Georgia,"Times New Roman",serif;
  line-height:1.8;
  color:#1d1710;
  background:rgba(0,0,0,.04);
  padding:18px;
  border:1px solid #b59b73;
}

.doc-footer{
  text-align:center;
  margin-top:18px;
  color:#5b4a36;
  letter-spacing:2px;
  font-size:12px;
}
.notice-board{
  position:relative;
  left:auto;
  top:auto;
}

.network-panel{
  width:min(920px,94vw);
}

.network-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:14px;
  margin:24px 0;
}

.network-actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:12px;
  margin-top:22px;
}

.network-actions .btn{
  margin-top:0;
}

.btn.secondary{
  background:rgba(255,255,255,.04);
}

.btn.danger{
  background:#3a1515;
  border-color:#9f5f5f;
}

.network-message{
  border:1px solid var(--line);
  padding:14px 16px;
  margin:18px 0;
  text-align:center;
  line-height:1.5;
}

.network-message.success{
  border-color:#3f8a62;
  background:rgba(22,80,48,.35);
  color:#baf4d1;
}

.network-message.error{
  border-color:#9f5f5f;
  background:rgba(94,25,25,.35);
  color:#ffd0d0;
}

.hidden-file{
  display:none;
}

.record-safety{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:14px;
  margin:26px 0 8px;
  padding:18px;
  border:1px solid var(--line);
  background:rgba(0,0,0,.22);
}

.record-safety > div{
  min-width:0;
  padding:4px 8px;
}

.record-safety h3{
  margin:0 0 8px;
  color:var(--gold);
  letter-spacing:1px;
}

.record-safety p{
  margin:6px 0;
  line-height:1.5;
}

.record-safety-links{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  gap:14px;
}

.btn.compact{
  margin-top:10px;
  padding:10px 12px;
  font-size:12px;
}

.privacy-link{
  color:#d8c59b;
  letter-spacing:1px;
  text-underline-offset:4px;
}

.privacy-link:hover{
  color:var(--gold);
}

.portal-privacy{
  margin-top:22px;
}

.destructive-panel .notice{
  border-color:#9f5f5f;
}

.deletion-message{
  min-height:24px;
  margin-top:12px;
  color:#ffd0d0;
}

.privacy-panel{
  width:min(900px,94vw);
}

.privacy-panel .btn{
  display:inline-block;
  text-decoration:none;
}

.privacy-section{
  border-top:1px solid var(--line);
  padding:20px 0;
  line-height:1.7;
}

.privacy-section h2{
  text-align:left;
  margin:0 0 12px;
  color:var(--gold);
  font-size:24px;
}

.privacy-section ul{
  margin:10px 0;
  padding-left:24px;
}

@media(max-width:600px){
  .record-safety{
    grid-template-columns:1fr;
  }

  .record-safety-links{
    align-items:stretch;
  }

  .record-safety-links .btn{
    width:100%;
  }
}

.operations-metrics{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
  gap:14px;
  margin:24px 0;
}

.operations-metric{
  display:grid;
  gap:12px;
  padding:18px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.035);
}

.operations-metric h3,
.operations-metric p{
  margin:0;
}

.operations-metric h3{
  color:var(--gold);
}

.operations-metric p,
.operations-metric strong{
  color:#d8c59b;
}

.operations-metric meter{
  width:100%;
  min-height:18px;
  accent-color:#3f8a62;
}

.analysis-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
  margin:24px 0;
}

.analysis-record{
  display:grid;
  align-content:start;
  gap:10px;
  padding:18px;
  border:1px solid var(--line);
  background:rgba(0,0,0,.24);
}

.analysis-record h3{
  margin:0 0 6px;
  color:var(--gold);
  letter-spacing:1px;
}

.analysis-fact{
  display:grid;
  gap:5px;
  min-height:68px;
  padding:12px 14px;
  border:1px solid rgba(185,147,85,.28);
  background:rgba(255,255,255,.035);
  color:#efe6d2;
  text-align:left;
  cursor:pointer;
  font:inherit;
}

.analysis-fact b{
  color:#d8c59b;
  font-size:12px;
  letter-spacing:1px;
}

.analysis-fact.selected,
.analysis-fact:hover{
  border-color:#f4cf83;
  background:rgba(22,56,45,.72);
  box-shadow:0 0 0 2px rgba(244,207,131,.14);
}

@media(max-width:700px){
  .analysis-grid{
    grid-template-columns:1fr;
  }
}

/* =========================================================
   INSTALLABLE PORTAL · ACCESSIBILITY · SMALL SCREENS
========================================================= */

html{
  color-scheme:dark;
  -webkit-text-size-adjust:100%;
}

body{
  overflow-wrap:anywhere;
}

.skip-link{
  position:fixed;
  z-index:1000;
  top:12px;
  left:12px;
  padding:12px 16px;
  border:2px solid #efe6d2;
  background:#030504;
  color:#efe6d2;
  transform:translateY(-180%);
  transition:transform .16s ease;
}

.skip-link:focus{
  transform:translateY(0);
}

.app-utility{
  position:fixed;
  z-index:40;
  right:max(12px, env(safe-area-inset-right));
  bottom:max(12px, env(safe-area-inset-bottom));
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:8px;
  max-width:min(390px, calc(100vw - 24px));
  pointer-events:none;
}

.network-status,
.utility-button,
.locale-control{
  margin:0;
  border:1px solid var(--gold);
  background:rgba(3,5,4,.97);
  color:#efe6d2;
  padding:11px 14px;
  box-shadow:0 12px 32px rgba(0,0,0,.55);
  line-height:1.4;
  pointer-events:auto;
}

.network-status{
  color:#d8c59b;
}

.utility-button{
  min-height:44px;
  cursor:pointer;
  font:inherit;
  letter-spacing:.5px;
}

.utility-button:disabled{
  opacity:.58;
  cursor:wait;
}

.locale-control{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 10px;
}

.locale-label{
  color:#d8c59b;
  font:11px/1.3 monospace;
  letter-spacing:.45px;
  text-transform:uppercase;
}

.locale-select{
  min-height:44px;
  border:1px solid rgba(185,139,66,.72);
  border-radius:0;
  background:#030504;
  color:#efe6d2;
  padding:8px 32px 8px 10px;
  font:inherit;
  cursor:pointer;
}

.release-badge{
  margin:0;
  color:var(--muted);
  font:11px/1.4 monospace;
  letter-spacing:.5px;
  pointer-events:auto;
}

.noscript-notice{
  position:fixed;
  inset:auto 12px 12px;
  z-index:100;
  margin:0;
  border:1px solid #9f5f5f;
  background:#180909;
  color:#fff;
  padding:14px;
  text-align:center;
}

.offline-panel{
  width:min(760px,92vw);
}

.offline-panel .btn{
  display:inline-block;
  text-decoration:none;
}

.terminal,
.ministry-document,
.record-comparison{
  max-width:100%;
  overflow-wrap:anywhere;
}

.btn,
.choice,
.desk-item,
.object,
.utility-button,
.locale-select,
.field,
.privacy-link{
  min-height:44px;
}

.btn:focus-visible,
.choice:focus-visible,
.desk-item:focus-visible,
.object:focus-visible,
.utility-button:focus-visible,
.locale-select:focus-visible,
.field:focus-visible,
.privacy-link:focus-visible,
.skip-link:focus-visible{
  outline:3px solid #f4cf83;
  outline-offset:4px;
}

#app:focus,
#app h1[tabindex="-1"]:focus,
#offlineNotice:focus{
  outline:none;
}

@media(max-width:600px){

  #app{
    place-items:start center;
    padding:
      max(14px, env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right))
      max(84px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
  }

  .panel,
  .dashboard-panel,
  .dialogue-panel,
  .office-screen,
  .office-scene{
    width:100%;
    min-width:0;
    padding:20px 16px;
  }

  h1{
    font-size:clamp(30px,10vw,40px);
    letter-spacing:1px;
  }

  h2{
    font-size:clamp(18px,6vw,24px);
    letter-spacing:1px;
  }

  .notice{
    margin:20px 0;
    padding:16px;
  }

  .center .btn,
  .center > .privacy-link{
    width:100%;
    margin-right:0;
    margin-left:0;
  }

  .app-utility{
    left:max(12px, env(safe-area-inset-left));
    right:max(12px, env(safe-area-inset-right));
    align-items:stretch;
    max-width:none;
  }

  .network-status,
  .utility-button,
  .locale-control{
    width:100%;
  }

  .locale-control{
    justify-content:space-between;
  }

  .locale-select{
    flex:1;
    max-width:210px;
  }

  .seal{
    letter-spacing:3px;
  }
}

@media(prefers-reduced-motion:reduce){

  *,
  *::before,
  *::after{
    scroll-behavior:auto !important;
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
  }

  .rain{
    display:none;
  }
}

@media(forced-colors:active){

  .panel,
  .office-screen,
  .office-scene,
  .notice,
  .terminal,
  .btn,
  .choice,
  .desk-item,
  .object{
    border:1px solid CanvasText;
  }
}
