@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  color-scheme: light;
  font-family: 'DM Sans', 'Apple SD Gothic Neo', sans-serif;
  color: #193c4f;
  background: #f5f4ed;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: #f5f4ed; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid #4d9ab0;
  outline-offset: 3px;
}

.topbar {
  position: relative;
  z-index: 5;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 clamp(14px, 3vw, 42px);
  background: #f7f6ef;
  color: #244a59;
  box-shadow: 0 2px 14px #10202726;
}
.brand { display: flex; align-items: center; gap: 9px; min-width: 0; color: inherit; text-decoration: none; }
.brand img { width: 26px; height: 26px; object-fit: contain; }
.brand-name { font-size: 13px; font-weight: 750; white-space: nowrap; }
.brand-caption { margin-left: 2px; color: #789096; font: 600 8px 'Space Grotesk', sans-serif; letter-spacing: .8px; white-space: nowrap; }
.account-actions { display: flex; align-items: center; gap: 8px; }
.signed-in { max-width: 210px; overflow: hidden; border: 0; padding: 0; background: transparent; color: #42646e; cursor: pointer; font-size: 10px; text-overflow: ellipsis; text-align: right; white-space: nowrap; }
.login-link, .logout-button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #d2e0da;
  border-radius: 999px;
  padding: 0 12px;
  background: #fffefa;
  color: #254b58;
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .18s, background .18s;
}
.login-link:hover, .logout-button:hover { transform: translateY(-1px); background: #edf5f1; }
.google-mark { color: #4285f4; font: 800 14px 'Space Grotesk', sans-serif; }
.logout-button { border-radius: 8px; background: #fffefa; }

#app.assembly-app {
  position: relative;
  isolation: isolate;
  min-height: calc(100dvh - 52px);
  overflow: clip;
  color: #f4f0e4;
}
#app.assembly-app::before, #app.assembly-app::after {
  position: fixed;
  z-index: -2;
  inset: 52px 0 0;
  content: "";
  pointer-events: none;
}
#app.assembly-app::before {
  background: url('/images/un-assembly-chamber.png') center 54% / cover no-repeat;
  filter: saturate(.82) contrast(1.06);
  transform: scale(1.01);
}
#app.assembly-app::after {
  z-index: -1;
  background:
    linear-gradient(180deg, #0b121654 0%, #0c151624 28%, #0a11146e 100%),
    linear-gradient(90deg, #0b12164f 0%, transparent 19%, transparent 81%, #0b12164f 100%);
}
.page-frame { width: min(1460px, 100%); margin: 0 auto; padding: 15px clamp(14px, 3vw, 42px) 16px; }
.intro-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.title-plate {
  position: relative;
  width: min(620px, 100%);
  border: 1px solid #e0d6bb;
  border-radius: 13px;
  padding: 11px 17px 12px;
  background: linear-gradient(125deg, rgba(250,249,241,.97), rgba(225,224,208,.94));
  color: #1c333b;
  box-shadow: inset 0 1px #fff, 0 13px 28px #0911154a;
}
.title-plate::after { position: absolute; top: 10px; right: 12px; width: 34px; height: 34px; border: 1px solid #a9915b55; border-radius: 50%; content: ""; }
.title-kicker { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; color: #617e81; font: 600 8px 'Space Grotesk', sans-serif; letter-spacing: 1.2px; }
.title-kicker img { width: 15px; height: 15px; object-fit: contain; }
.title-kicker i { width: 14px; height: 1px; background: #ab9a70; }
.title-plate h1 { margin: 6px 0 2px; font: 650 clamp(22px, 3vw, 33px)/1.12 'DM Sans', 'Apple SD Gothic Neo', sans-serif; letter-spacing: -.7px; }
.title-plate p { margin: 0; color: #667575; font-size: 10px; line-height: 1.5; }
.phase-chip { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; border: 1px solid #d7c69061; border-radius: 999px; padding: 8px 11px; background: #111b206e; color: #f4e8c9; font: 600 9px 'Space Grotesk', sans-serif; letter-spacing: .5px; text-shadow: 0 2px 8px #000; }
.phase-dot { width: 7px; height: 7px; border-radius: 50%; background: #d6b36f; box-shadow: 0 0 9px #e5cb8d; }

.primary-menu { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin: 10px 0 8px; }
.primary-menu button {
  min-width: 0;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #d6d4c8;
  border-radius: 9px;
  background: rgba(249,248,241,.96);
  color: #31535b;
  font-size: 10px;
  font-weight: 700;
  box-shadow: 0 5px 13px #06101429;
  transition: transform .17s, background .17s, border-color .17s;
}
.primary-menu button:hover { transform: translateY(-2px); background: #fffdf4; }
.primary-menu button[aria-current="page"] { border-color: #d9bf7d; background: #e8e1ce; color: #24383e; }
.primary-menu svg { width: 14px; height: 14px; flex: 0 0 auto; }
.committee-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.committee-button {
  min-width: 0;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #596364;
  border-radius: 8px;
  padding: 0 11px;
  background: linear-gradient(140deg, #202b30ed, #121c21ed);
  color: #ece6d8;
  text-align: left;
  box-shadow: inset 0 1px #ffffff0d, 0 4px 12px #0004;
  transition: transform .17s, border-color .17s;
}
.committee-button:hover { transform: translateY(-1px); }
.committee-button.is-active { border-color: #e2ca91; background: linear-gradient(125deg, #f0ead8, #d8d1be); color: #223237; }
.committee-index { color: #ddc88f; font: 600 9px 'Space Grotesk', sans-serif; }
.committee-button.is-active .committee-index { color: #806d42; }
.committee-name { min-width: 0; overflow: hidden; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.committee-state { margin-left: auto; color: #abb3ac; font: 600 7px 'Space Grotesk', sans-serif; white-space: nowrap; }
.committee-button.is-active .committee-state { color: #6f6c5e; }

.scene-shell {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: calc(100dvh - 218px);
  min-height: 490px;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid #c5b78a80;
  border-radius: 15px;
  background: rgba(14,24,29,.12);
  box-shadow: 0 18px 55px #03090b76, inset 0 1px #ffffff1c;
}
.scene-wash { position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, #0b121624, #0a11163c 56%, #0a11166c); pointer-events: none; }
.scene-label { position: absolute; z-index: 2; top: 13px; display: flex; align-items: center; gap: 7px; color: #f2e8cc; font: 600 8px 'Space Grotesk', sans-serif; letter-spacing: .8px; text-shadow: 0 2px 7px #000; }
.scene-label.left { left: 15px; }
.scene-label.right { right: 15px; }
.scene-label i { width: 6px; height: 6px; border-radius: 50%; background: #d2ac65; box-shadow: 0 0 8px #f3d189; }
.scene-label .line { width: 16px; height: 1px; background: #e1d3b380; }
.table-ring { position: absolute; top: 53%; left: 50%; width: min(77%, 1040px); height: 65%; border: 1px solid #e5d19b70; border-radius: 50%; box-shadow: 0 0 0 10px #e6d5a210, 0 13px 35px #0006; transform: translate(-50%, -50%); pointer-events: none; }
.delegates-orbit { position: absolute; inset: 0; }
.country-seat {
  position: absolute;
  z-index: 3;
  width: 76px;
  min-height: 78px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 4px 3px;
  transform: translate(-50%, -50%);
  background: transparent;
  color: #f8f0dc;
  text-shadow: 0 2px 6px #000;
  transition: left .72s cubic-bezier(.2,.8,.25,1), top .72s cubic-bezier(.2,.8,.25,1), background .18s, border-color .18s, transform .18s;
}
.country-seat:hover { border-color: #ead9ad70; background: #10191c80; }
.country-seat.is-selected { z-index: 6; border-color: #efe2bf; background: linear-gradient(145deg, #f5efdf, #d9ddcf); color: #1c3036; transform: translate(-50%, -50%) scale(1.11); text-shadow: none; box-shadow: 0 8px 25px #020607a6; }
.seat-number { color: #ecd7a1; font: 600 8px 'Space Grotesk', sans-serif; }
.country-seat.is-selected .seat-number { color: #806e48; }
.flag-medallion { width: 36px; height: 36px; display: grid; overflow: hidden; place-items: center; border: 2px solid #f4ead2; border-radius: 50%; background: #ddd; box-shadow: 0 3px 9px #0009; }
.flag-medallion img { width: 100%; height: 100%; object-fit: cover; }
.seat-country { max-width: 76px; overflow: hidden; margin-top: 4px; font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.seat-caption { margin-top: 2px; color: #e2d7bb; font: 6px 'Space Grotesk', sans-serif; letter-spacing: 1px; }
.country-seat.is-selected .seat-caption { color: #6c736b; }
.dais {
  position: absolute;
  z-index: 2;
  top: 52%;
  left: 50%;
  width: 208px;
  height: 112px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #ddc58b;
  border-radius: 50%;
  background: radial-gradient(ellipse at 40% 25%, #64665a, #273238 70%, #111a1e);
  box-shadow: inset 0 3px 10px #fff2, 0 0 0 7px #e5d09b1c, 0 15px 35px #0009;
  transform: translate(-50%, -50%);
  pointer-events: none;
  text-align: center;
}
.dais small { color: #d8c89e; font: 600 7px 'Space Grotesk', sans-serif; letter-spacing: 1.4px; }
.dais b { color: #f7efdc; font-size: 16px; letter-spacing: 2px; }
.dais span { max-width: 150px; color: #cbd0c4; font-size: 8px; }

.country-bubble, .detail-panel {
  position: absolute;
  z-index: 10;
  width: min(330px, calc(100% - 30px));
  border: 1px solid #dfd1a8;
  border-radius: 13px;
  padding: 14px;
  background: linear-gradient(145deg, #f6f1e5, #e0d8c3);
  color: #1c3036;
  box-shadow: inset 0 1px #fff, 0 16px 42px #000b;
  animation: appear .2s ease-out both;
}
.country-bubble { left: 50%; top: 76%; transform: translate(-50%, -105%); }
.bubble-close, .close-panel {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid #8c8b7c66;
  border-radius: 50%;
  background: #fffaf0;
  color: #35464a;
}
.bubble-head { display: flex; align-items: center; gap: 9px; border-bottom: 1px solid #c7bea7; padding: 0 27px 10px 0; }
.bubble-head .flag-medallion { width: 32px; height: 32px; border-color: #a99568; flex: 0 0 auto; }
.bubble-head span:last-child { display: flex; flex-direction: column; gap: 2px; }
.bubble-head small, .micro-label { color: #777361; font: 600 7px 'Space Grotesk', sans-serif; letter-spacing: .7px; }
.bubble-head strong { font-size: 12px; }
.output-status { display: flex; align-items: center; gap: 8px; margin-top: 10px; border-left: 2px solid #ab8650; border-radius: 4px; padding: 8px 9px; background: #ffffff8a; color: #53594e; }
.output-status svg { flex: 0 0 auto; color: #997649; }
.output-status span { display: flex; flex-direction: column; gap: 3px; }
.output-status strong { font-size: 9px; line-height: 1.4; }
.delegate-output { margin-top: 7px; border: 1px solid #d9cfb3; border-radius: 8px; padding: 8px 9px; background: #fffaf07a; color: #3b4c4b; }
.delegate-output > strong { font-size: 9px; }
.delegate-output > p { margin: 4px 0 0; color: #68736d; font-size: 8px; line-height: 1.5; white-space: pre-wrap; }
.investment-box { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 10px; margin-top: 8px; border: 1px solid #d5e2dc; border-radius: 9px; padding: 9px 10px; background: #f2f7f2; }
.investment-value { display: flex; flex-direction: column; gap: 2px; }
.investment-value small { color: #718784; font-size: 8px; }
.investment-value strong { color: #345e68; font: 700 14px 'Space Grotesk', sans-serif; }
.investment-pill { border-radius: 999px; padding: 5px 8px; background: #e2ebe5; color: #667c74; font-size: 8px; font-weight: 700; }
.investment-pill.positive { background: #d9eee4; color: #246954; }
.investment-chart { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 5px; }
.investment-chart label { display: flex; align-items: center; gap: 5px; color: #637b76; font-size: 8px; font-weight: 700; }
.investment-track { height: 6px; overflow: hidden; border-radius: 999px; background: #dfe9e3; }
.investment-track span { display: block; height: 100%; border-radius: inherit; background: #4d8b98; transition: width .25s; }
.chart-axis { display: flex; justify-content: space-between; gap: 8px; color: #82918a; font: 7px 'Space Grotesk', sans-serif; }
.empty-note { grid-column: 1 / -1; margin: 0; color: #74827c; font-size: 8px; }
.bubble-copy { margin: 9px 0 0; color: #656253; font-size: 9px; line-height: 1.5; }
.bubble-action { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; border: 1px solid #85806e66; border-radius: 7px; padding: 7px 9px; background: #fffbf1; color: #29464d; font-size: 9px; font-weight: 700; }
.file-links { display: flex; flex-direction: column; gap: 5px; margin-top: 9px; }
.file-link { display: flex; align-items: center; gap: 7px; color: #355c65; font-size: 9px; font-weight: 700; text-decoration: none; }
.file-link:hover { text-decoration: underline; }
.file-links.file-gallery { display: grid; grid-template-columns: repeat(auto-fill,minmax(104px,1fr)); align-items: start; }
.file-preview { min-width: 0; margin: 0; overflow: hidden; border: 1px solid #d4e0da; border-radius: 8px; background: #f8faf6; }
.file-preview-image { display: block; aspect-ratio: 4 / 3; background: #e9efec; }
.file-preview-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.file-preview figcaption { padding: 5px 6px; }
.file-preview .file-link { align-items: flex-start; overflow-wrap: anywhere; font-size: 8px; line-height: 1.35; }
.file-preview .file-link span { min-width: 0; overflow-wrap: anywhere; }
.status-note { margin: 8px 0 0; color: #6d776f; font-size: 8px; line-height: 1.5; }
.country-bubble > .investment-form { margin-top: 9px; }
.bubble-login { margin: 9px 0 0; font-size: 8px; }
.bubble-login a { color: #315f6c; font-weight: 700; }

.detail-panel { top: 17px; right: 17px; max-height: calc(100% - 42px); overflow: auto; width: min(370px, calc(100% - 34px)); }
.panel-kicker { display: flex; align-items: center; gap: 7px; color: #786541; font: 700 8px 'Space Grotesk', sans-serif; letter-spacing: 1px; }
.detail-panel h2 { margin: 7px 28px 4px 0; color: #1e3439; font-size: 20px; letter-spacing: -.5px; }
.panel-description { margin: 0 0 12px; color: #6e6e61; font-size: 9px; line-height: 1.5; }
.empty-state { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; border: 1px dashed #9d957c; border-radius: 10px; padding: 14px; background: #fffaf04e; color: #65706a; }
.empty-state b { color: #36484b; font-size: 10px; }
.empty-state p { margin: 0; font-size: 9px; line-height: 1.55; }
.form-stack { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.form-label { display: flex; flex-direction: column; gap: 5px; color: #5f695f; font-size: 9px; font-weight: 700; }
.form-control, .investment-form input, .admin-card input, .admin-card textarea, .admin-card select {
  width: 100%;
  min-width: 0;
  border: 1px solid #b9c8be;
  border-radius: 7px;
  padding: 8px 9px;
  background: #fffdf7;
  color: #253c42;
  font-size: 10px;
}
.form-control[type="file"] { padding: 7px; }
textarea.form-control, .admin-card textarea { min-height: 72px; resize: vertical; line-height: 1.5; }
.form-helper { color: #7a796c; font-size: 8px; line-height: 1.45; }
.primary-action, .secondary-action, .subtle-action {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 8px;
  padding: 0 11px;
  background: #1d3439;
  color: #fbf5e7;
  font-size: 9px;
  font-weight: 700;
  transition: transform .16s, background .16s;
}
.primary-action:hover, .secondary-action:hover { transform: translateY(-1px); background: #2b5158; }
.primary-action:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.secondary-action, .subtle-action { border: 1px solid #a79e84; background: #fffaf0; color: #4e5b55; }
.form-stack .primary-action { align-self: flex-start; }
.inline-alert { margin: 8px 0; border: 1px solid #b97b6e66; border-radius: 7px; padding: 8px 9px; background: #fff0e8; color: #8c4037; font-size: 9px; }
.success-alert { border-color: #82a996; background: #e9f4ec; color: #2d6957; }
.team-summary { margin-top: 8px; border: 1px solid #b8ad8e66; border-radius: 9px; padding: 11px; background: #fffaf04d; }
.team-summary > strong { display: block; color: #334347; font-size: 12px; }
.team-summary p { margin: 5px 0 0; color: #6d6d61; font-size: 9px; line-height: 1.5; }
.team-grid, .data-list { display: flex; flex-direction: column; gap: 6px; margin: 9px 0 0; padding: 0; list-style: none; }
.join-option, .data-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid #a79d7d66; border-radius: 8px; padding: 8px 9px; background: #fffaf080; }
.join-option strong { display: block; color: #36484b; font-size: 9px; }
.join-option small { display: block; margin-top: 2px; color: #777568; font-size: 8px; }
.approval-pending { margin-top: 10px; border: 1px solid #d5c89f; border-radius: 8px; padding: 10px; background: #f7f2e4; color: #5a695f; font-size: 9px; line-height: 1.5; }
.data-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; min-height: 42px; }
.rank-number { color: #89764e; font: 700 9px 'Space Grotesk', sans-serif; }
.row-title { overflow: hidden; color: #334246; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.row-subtitle { display: block; margin-top: 2px; color: #777668; font-size: 8px; font-weight: 400; }
.row-value { color: #685738; font: 700 10px 'Space Grotesk', sans-serif; white-space: nowrap; }
.row-finalist { color: #28705c; }
.investment-form { grid-column: 2 / -1; display: flex; align-items: center; gap: 5px; margin-top: 3px; }
.investment-form input { width: 90px; padding: 6px 7px; }
.notice-card { border-top: 1px solid #b9ae8e80; padding: 11px 0; }
.notice-card:first-child { border-top: 0; }
.notice-card h3 { margin: 0; color: #2c3e41; font-size: 12px; }
.notice-card p { margin: 5px 0 0; color: #5f665e; font-size: 9px; line-height: 1.55; white-space: pre-wrap; }
.notice-date { display: block; margin-top: 6px; color: #8c8062; font: 600 7px 'Space Grotesk', sans-serif; }
.data-list { max-height: 54vh; overflow: auto; padding-right: 3px; }
.admin-dashboard { position: absolute; z-index: 10; inset: 10px 10px 32px; overflow: auto; border: 1px solid #dfd1a8; border-radius: 13px; padding: 14px; background: #eee7d5ee; color: #1c3036; box-shadow: 0 16px 42px #0009; }
.admin-toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.admin-toolbar button { border: 1px solid #a79e84; border-radius: 999px; padding: 7px 10px; background: #fffaf0; color: #4e5b55; font-size: 8px; font-weight: 700; }
.admin-toolbar button[aria-current="true"] { border-color: #4c879b; background: #e7f2f3; color: #19445a; }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.admin-card { min-width: 0; border: 1px solid #b8ad8e66; border-radius: 9px; padding: 11px; background: #fffaf08c; }
.admin-card h3 { margin: 0 0 8px; color: #334347; font-size: 12px; }
.admin-card h3:not(:first-child) { margin-top: 14px; }
.admin-card p { margin: 5px 0; color: #6d6d61; font-size: 8px; line-height: 1.5; }
.admin-card label { display: block; margin: 8px 0 4px; color: #5f695f; font-size: 8px; font-weight: 700; }
.admin-card form { display: flex; flex-direction: column; gap: 6px; }
.admin-card .primary-action, .admin-card .secondary-action { align-self: flex-start; }
.admin-card .data-row { margin: 4px 0; }
.admin-danger-action {
  min-height: 31px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #8c302b;
  border-radius: 7px;
  padding: 0 9px;
  background: #a9433b;
  color: #fff !important;
  font-size: 8px;
  font-weight: 700;
  cursor: pointer;
}
.admin-danger-action:hover:not(:disabled) { background: #87352f; }
.admin-danger-action:disabled { opacity: .52; cursor: not-allowed; }
.admin-danger-card { border-color: #bd766b99; background: #fff4edb8; }
.admin-saved-files { display: flex; flex-direction: column; gap: 6px; max-height: 35vh; overflow: auto; }
.admin-saved-file { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; border: 1px solid #b8ad8e66; border-radius: 7px; padding: 7px; background: #fffaf080; }
.admin-saved-file-info { min-width: 0; }
.admin-saved-file-link { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; color: #334347; font-size: 8px; font-weight: 700; text-decoration: none; }
.admin-saved-file-link span { overflow-wrap: anywhere; }
.admin-saved-file-info > small { display: block; margin-top: 3px; color: #777568; font-size: 7px; }
.admin-saved-file .admin-danger-action { white-space: nowrap; }
.admin-audit { max-height: 150px; overflow: auto; }
.drive-connect-link, .account-admin-link { width: fit-content; text-decoration: none; }
.drive-folder-status { margin-top: 8px !important; color: #334347 !important; font-weight: 700; }
.drive-picker-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.drive-picker-actions .secondary-action { min-height: 27px; padding: 0 8px; font-size: 8px; }
.drive-callback { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 5px 8px; margin-top: 10px; border-top: 1px solid #b8ad8e66; padding-top: 8px; }
.drive-callback > span { grid-column: 1 / -1; color: #5f695f; font-size: 8px; font-weight: 700; }
.drive-callback code { min-width: 0; overflow-wrap: anywhere; color: #40585e; font-size: 8px; }
.drive-callback .secondary-action { min-height: 27px; padding: 0 8px; font-size: 8px; }
.account-admin-link { margin: 0 8px 10px 0; }
.scene-caption { position: absolute; right: 14px; bottom: 10px; left: 14px; z-index: 2; display: flex; align-items: center; gap: 8px; border-top: 1px solid #e0d6bd42; padding-top: 7px; color: #e2dcc9; font: 600 7px 'Space Grotesk', sans-serif; letter-spacing: .8px; text-shadow: 0 1px 5px #000; }
.scene-caption b { color: #eddaa8; }
.scene-caption span { width: 15px; height: 1px; background: #d1ba8877; }
.loading-skeleton { min-height: 120px; border-radius: 12px; background: linear-gradient(100deg, #ffffff14 30%, #ffffff33 45%, #ffffff14 60%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.error-panel { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid #e3b5a3; border-radius: 9px; padding: 13px; background: #fff1e7; color: #753e35; font-size: 10px; }
.site-footer { display: flex; justify-content: space-between; gap: 18px; padding: 15px clamp(14px, 3vw, 42px); background: #f7f6ef; color: #687c7e; font-size: 9px; }
.site-footer a { color: #315f6c; font-weight: 700; text-decoration: none; }
#toast { position: fixed; z-index: 30; right: 16px; bottom: 16px; max-width: min(460px, calc(100vw - 32px)); display: none; border: 1px solid #315e75; border-radius: 12px; padding: 12px 16px; background: #e1f5fe; color: #102c3a; box-shadow: 0 8px 24px #0004; font-size: 12px; }
dialog { width: min(420px, calc(100vw - 28px)); border: 1px solid #d4c395; border-radius: 16px; padding: 22px; background: #f6f1e5; color: #1c3036; box-shadow: 0 20px 60px #0009; }
dialog::backdrop { background: #0009; }
.account-dialog-close { float: right; border: 0; background: none; color: #35464a; font-size: 22px; }
.account-dialog h2 { margin: 8px 0; font-size: 18px; }
.account-dialog p { margin: 5px 0; color: #65706a; font-size: 10px; }
.account-dialog .amount { margin: 12px 0; color: #345e68; font: 700 26px 'Space Grotesk', sans-serif; }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (max-width: 760px) {
  .topbar { height: 48px; padding: 0 10px; }
  .brand { gap: 6px; }
  .brand img { width: 22px; height: 22px; }
  .brand-name { font-size: 11px; }
  .brand-caption, .signed-in { display: none; }
  .login-link, .logout-button { min-height: 31px; padding: 0 9px; font-size: 9px; }
  #app.assembly-app { min-height: calc(100dvh - 48px); }
  #app.assembly-app::before, #app.assembly-app::after { inset: 48px 0 0; }
  .page-frame { padding: 10px 9px 12px; }
  .intro-row { align-items: flex-start; gap: 7px; }
  .title-plate { padding: 9px 10px; border-radius: 9px; }
  .title-kicker { gap: 4px; font-size: 6px; letter-spacing: .45px; }
  .title-kicker img { width: 12px; height: 12px; }
  .title-plate h1 { font-size: clamp(18px, 5vw, 25px); }
  .title-plate p { font-size: 8px; }
  .phase-chip { gap: 5px; padding: 6px 7px; font-size: 7px; white-space: nowrap; }
  .primary-menu { gap: 4px; margin: 7px 0 6px; }
  .primary-menu button { min-height: 35px; gap: 4px; padding: 0 3px; font-size: 8px; }
  .primary-menu svg { width: 12px; height: 12px; }
  .committee-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
  .committee-button { min-height: 36px; padding: 4px 6px; gap: 5px; }
  .committee-index { font-size: 7px; }
  .committee-name { font-size: 8px; }
  .committee-state { font-size: 6px; }
  .scene-shell { height: min(610px, 66svh); min-height: 485px; margin-top: 7px; border-radius: 10px; }
  .scene-label { top: 9px; font-size: 6px; letter-spacing: .35px; }
  .scene-label.left { left: 8px; }
  .scene-label.right { right: 8px; gap: 4px; }
  .scene-label .line { width: 8px; }
  .table-ring { top: 51%; width: 112%; height: 59%; }
  .country-seat { width: 58px; min-height: 65px; padding: 2px; }
  .flag-medallion { width: 29px; height: 29px; }
  .seat-number { font-size: 7px; }
  .seat-country { max-width: 57px; font-size: 7px; }
  .seat-caption { font-size: 5px; }
  .dais { top: 51%; width: 126px; height: 84px; gap: 5px; }
  .dais small { font-size: 5px; }
  .dais b { font-size: 12px; }
  .dais span { max-width: 105px; font-size: 6px; }
  .country-bubble { top: auto; bottom: 10px; left: 50%; transform: translateX(-50%); width: min(315px, calc(100% - 20px)); max-height: 65%; overflow: auto; }
  .detail-panel { top: 8px; right: 8px; bottom: 8px; left: 8px; width: auto; max-height: none; padding: 13px; }
  .admin-dashboard { inset: 7px 7px 28px; padding: 9px; }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-card { padding: 9px; }
  .scene-caption { right: 8px; left: 8px; bottom: 7px; font-size: 6px; }
  .site-footer { flex-wrap: wrap; padding: 12px 10px 18px; font-size: 8px; }
  #toast { right: 10px; bottom: 10px; left: 10px; max-width: none; }
}
@media (max-width: 390px) {
  .title-plate h1 { font-size: 18px; }
  .title-plate p { max-width: 220px; }
  .phase-chip { gap: 4px; padding: 6px 5px; font-size: 6px; }
  .primary-menu button { font-size: 7px; }
  .committee-name { font-size: 7px; }
  .country-seat { width: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
