#gr-economics-app {
  --gr-ink: #edf5ff;
  --gr-muted: #afc1d9;
  --gr-blue: #42b5ff;
  --gr-border: #284a6d;
  --gr-card: #0d2138;
  box-sizing: border-box;
  color: var(--gr-ink);
  background: radial-gradient(ellipse at 75% 0, #103756 0, #08192c 44%, #050e1b 90%);
  border: 1px solid #1d3958;
  border-radius: 22px;
  padding: clamp(16px, 3vw, 30px);
  margin: 24px auto;
  max-width: 1040px;
  font: 16px/1.85 "Yu Gothic UI", Meiryo, system-ui, sans-serif;
  isolation: isolate;
  text-align: left;
}
#gr-economics-app *, #gr-economics-app *::before, #gr-economics-app *::after { box-sizing: border-box; }
/* Only the designated standalone app page uses an edge-to-edge dark shell. */
html.gr-economics-standalone-document { margin: 0 !important; padding: 0 !important; background: #050e1b; color-scheme: dark; }
body.gr-economics-standalone { margin: 0; padding: 0; min-height: 100vh; background: #050e1b; }
body.gr-economics-standalone #gr-economics-main { width: 100%; max-width: none; margin: 0; padding: 0; }
body.gr-economics-standalone #gr-economics-app { width: 100%; max-width: none; min-height: 100vh; margin: 0 !important; border: 0; border-radius: 0; box-shadow: none; }
@supports (min-height: 100dvh) {
  body.gr-economics-standalone, body.gr-economics-standalone #gr-economics-app { min-height: 100dvh; }
}
#gr-economics-startup { --gr-startup-room: calc(100vh - 150px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); position: fixed; inset: 0; z-index: 2147483647; display: flex; flex-direction: column; justify-content: center; align-items: center; color: #e5ecf5; background: #000; padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); font: 16px/1.6 "Yu Gothic UI", Meiryo, system-ui, sans-serif; opacity: 1; transition: opacity .25s ease; }
#gr-economics-startup, #gr-economics-startup * { box-sizing: border-box; }
#gr-economics-startup .gr-startup-video { display: block; flex: 0 0 auto; width: min(100%, 1080px, max(1px, var(--gr-startup-room))); height: auto; aspect-ratio: 1; object-fit: contain; background: #000; border: 0; border-radius: 0; margin: 0; }
#gr-economics-startup .gr-startup-controls { display: flex; flex: 0 0 auto; flex-direction: column; align-items: center; gap: 10px; margin-top: 16px; text-align: center; }
#gr-economics-startup .gr-startup-status { color: #e5ecf5; font-size: .9rem; line-height: 1.6; margin: 0; }
#gr-economics-startup.gr-startup-leaving { opacity: 0; pointer-events: none; }
@supports (height: 100dvh) { #gr-economics-startup { --gr-startup-room: calc(100dvh - 150px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); } }
@media (prefers-reduced-motion: reduce) { #gr-economics-startup { transition: none; } }
#gr-economics-app :is(h1,h2,h3,h4,p,ul,ol,blockquote,figure) { color: inherit; margin: 0 0 1em; }
#gr-economics-app h1 { font-size: clamp(1.7rem, 4vw, 2.45rem); line-height: 1.45; font-weight: 750; letter-spacing: .02em; }
#gr-economics-app h2 { font-size: 1.32rem; line-height: 1.6; }
#gr-economics-app h3 { font-size: 1.1rem; line-height: 1.7; }
#gr-economics-app h4 { font-size: 1rem; line-height: 1.7; }
#gr-economics-app a { color: #85d1ff; text-decoration: underline; text-underline-offset: .2em; overflow-wrap: anywhere; }
#gr-economics-app a:hover { color: #d3f0ff; }
#gr-economics-app a:focus-visible, #gr-economics-app :is(button,select,input,textarea,summary):focus-visible { outline: 3px solid #81d5ff; outline-offset: 3px; }
#gr-economics-app :is(button,input,textarea,select) { font: inherit; line-height: 1.6; margin: 0; max-width: 100%; }
#gr-economics-app :is(input,textarea,select) { color: var(--gr-ink); background: #071626; border: 1px solid #456786; border-radius: 10px; width: 100%; padding: 11px 12px; box-shadow: none; }
#gr-economics-app select { color-scheme: dark; min-height: 48px; }
#gr-economics-app textarea { min-height: 120px; resize: vertical; }
#gr-economics-app label { display: block; font-weight: 650; color: #dcecff; margin: 0 0 6px; }
#gr-economics-app button, #gr-economics-app .gr-login-link { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 45px; padding: 9px 17px; border: 1px solid #4580b3; border-radius: 10px; color: #eef8ff; background: #163857; font-weight: 650; cursor: pointer; letter-spacing: 0; text-transform: none; text-decoration: none; box-shadow: none; }
#gr-economics-app button:hover, #gr-economics-app .gr-login-link:hover { background: #235177; border-color: #77c9ff; }
#gr-economics-app .gr-primary { color: #061525; background: linear-gradient(120deg, #59c7ff, #85dcff); border-color: #7ad2ff; }
#gr-economics-app .gr-primary:hover { color: #061525; background: #a1e4ff; }
#gr-economics-app button:disabled { opacity: .55; cursor: default; }
#gr-economics-app .gr-hero { position: relative; display: flex; align-items: center; gap: 20px; padding: 16px 22px; background: #000; border: 1px solid #28517a; border-radius: 16px; margin-bottom: 20px; min-width: 0; }
#gr-economics-app .gr-city { position: absolute; inset: 0 0 0 35%; pointer-events: none; border-radius: 0 15px 15px 0; background: url("night-city.jpg") right bottom / max(200%, 480px) auto no-repeat; }
#gr-economics-app .gr-city::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg,#000,#0000 55%), linear-gradient(0deg,#06132991,transparent 75%); }
#gr-economics-app .gr-logo { display: block; position: relative; z-index: 1; width: min(180px, 100%); max-width: 100%; height: auto; object-fit: contain; flex-shrink: 0; margin: 0; border: 0; border-radius: 0; }
#gr-economics-app .gr-hero-label { position: relative; z-index: 1; flex: 1; min-width: 0; text-align: right; color: #d1ecff; font-size: .73rem; letter-spacing: .16em; align-self: flex-end; }
#gr-economics-app .gr-intro { margin-bottom: 22px; }
#gr-economics-app .gr-intro h1 { margin-bottom: 8px; }
#gr-economics-app .gr-intro p { margin-bottom: 6px; }
#gr-economics-app .gr-muted, #gr-economics-app .gr-manager { color: var(--gr-muted); font-size: .85rem; }
#gr-economics-app .gr-manager { letter-spacing: .01em; }
#gr-economics-app .gr-panel { background: var(--gr-card); border: 1px solid var(--gr-border); border-radius: 14px; padding: 20px; margin: 18px 0; }
#gr-economics-app .gr-panel > :last-child { margin-bottom: 0; }
#gr-economics-app .gr-levels { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; margin: 8px 0 18px; }
#gr-economics-app .gr-levels button { padding: 10px 5px; min-width: 0; color: #c7ddf2; background: #0b2036; border-color: #345474; }
#gr-economics-app .gr-levels button[aria-pressed="true"] { color: #f4fbff; background: #205c87; border-color: #65cbff; box-shadow: inset 0 -3px 0 #65cbff; }
#gr-economics-app .gr-grid { display: grid; grid-template-columns: minmax(150px, .75fr) minmax(0, 1.6fr); gap: 16px; margin-bottom: 15px; }
#gr-economics-app .gr-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 15px; }
#gr-economics-app .gr-controls .gr-muted { margin: 0; }
#gr-economics-app .gr-notice { border: 1px solid #39729b; border-left: 4px solid #63c8ff; background: #123047; color: #e2f3ff; border-radius: 10px; padding: 12px 16px; margin: 16px 0; white-space: pre-wrap; }
#gr-economics-app .gr-error { background: #3b1b24; border-color: #ba667b; border-left-color: #f699ad; color: #fff0f3; }
#gr-economics-app .gr-chat { display: flex; flex-direction: column; gap: 17px; }
#gr-economics-app .gr-question { align-self: flex-end; max-width: 92%; background: #164060; border: 1px solid #386b94; border-radius: 14px 14px 3px 14px; padding: 12px 17px; white-space: pre-wrap; overflow-wrap: anywhere; }
#gr-economics-app .gr-answer { background: #0c2037; border: 1px solid #2a5076; border-radius: 15px; padding: clamp(16px, 3vw, 25px); min-width: 0; }
#gr-economics-app .gr-answer-heading { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 15px; color: #abdfff; font-size: .86rem; }
#gr-economics-app .gr-tag { background: #173d5d; border: 1px solid #3d698b; border-radius: 999px; padding: 2px 10px; }
#gr-economics-app .gr-markdown { overflow-wrap: anywhere; }
#gr-economics-app .gr-markdown > :last-child { margin-bottom: 0; }
#gr-economics-app .gr-markdown ul, #gr-economics-app .gr-markdown ol { padding-left: 1.45em; }
#gr-economics-app .gr-markdown li { margin-bottom: .45em; }
#gr-economics-app .gr-markdown blockquote { border-left: 3px solid #55bbf3; padding: 9px 15px; background: #13314b; margin-left: 0; margin-right: 0; }
#gr-economics-app .gr-markdown pre { white-space: pre-wrap; background: #071421; padding: 12px; border-radius: 7px; color: #dfedff; }
#gr-economics-app .gr-markdown code { color: #caf0ff; font-size: .9em; }
#gr-economics-app .gr-markdown table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; }
#gr-economics-app .gr-katex, #gr-economics-app .katex-display { overflow-x: auto; overflow-y: hidden; max-width: 100%; padding: 4px 0; }
#gr-economics-app details { margin: 14px 0 0; border-top: 1px solid #294c6e; padding-top: 12px; }
#gr-economics-app summary { color: #aee0ff; cursor: pointer; font-weight: 650; }
#gr-economics-app .gr-material { padding: 19px 0; border-bottom: 1px solid #284a6d; }
#gr-economics-app .gr-material:last-child { border-bottom: 0; padding-bottom: 0; }
#gr-economics-app .gr-material h3 { color: #d1edff; margin-bottom: 6px; }
#gr-economics-app .gr-material .gr-muted { line-height: 1.7; }
#gr-economics-app .gr-chart { min-width: 0; width: 100%; margin: 15px 0; overflow: hidden; }
#gr-economics-app .gr-chart .vega-embed { width: 100%; max-width: 100%; }
#gr-economics-app .gr-chart svg { display: block; max-width: 100%; height: auto; }
#gr-economics-app .gr-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 12px 0; border: 1px solid #385872; border-radius: 8px; }
#gr-economics-app .gr-table { border-collapse: collapse; width: 100%; min-width: 350px; font-size: .81rem; color: #e0edfb; margin: 0; }
#gr-economics-app .gr-table th, #gr-economics-app .gr-table td, #gr-economics-app .gr-markdown :is(th,td) { border: 1px solid #34516b; padding: 8px 11px; text-align: left; vertical-align: top; }
#gr-economics-app .gr-table th { background: #163651; font-weight: 650; white-space: nowrap; }
#gr-economics-app .gr-table tbody tr:nth-child(even) { background: #102b43; }
#gr-economics-app .gr-life { background: #102e45; border-left: 3px solid #42b5ff; padding: 12px 15px; border-radius: 6px; margin: 14px 0; }
#gr-economics-app .gr-life strong { color: #a6ddff; }
#gr-economics-app .gr-calculator { background: #0a1c30; border: 1px solid #315877; border-radius: 11px; padding: 15px; margin: 16px 0; }
#gr-economics-app .gr-sources { font-size: .84rem; padding-left: 1.3em; }
#gr-economics-app .gr-footer { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin-top: 22px; font-size: .82rem; color: var(--gr-muted); }
#gr-economics-app .gr-glossary-browser > summary { margin-bottom: 14px; }
#gr-economics-app .gr-glossary-count { margin: 10px 0 14px; }
#gr-economics-app .gr-glossary-entry { min-width: 0; margin-top: 18px; padding: 16px; background: #0a1c30; border: 1px solid #315877; border-radius: 10px; overflow-wrap: anywhere; }
#gr-economics-app .gr-glossary-entry:empty { display: none; }
#gr-economics-app .gr-glossary-entry h3 { color: #d1edff; margin-bottom: 5px; }
#gr-economics-app .gr-glossary-summary { white-space: pre-wrap; }
#gr-economics-app .gr-glossary-attribution { margin-top: 16px; }
#gr-economics-app .gr-diagram-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 16px 0 8px; border: 1px solid #315877; border-radius: 10px; background: #081c2c; }
#gr-economics-app .gr-diagram-scroll svg { display: block; max-width: none; flex-shrink: 0; }
#gr-economics-app .gr-diagram-scroll:focus { outline: 2px solid #70d1ef; outline-offset: 3px; }
#gr-economics-app .gr-diagram-text dt { color: #c9f0fa; font-weight: 650; margin-top: 10px; }
#gr-economics-app .gr-diagram-text dd { margin: 4px 0 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
#gr-economics-app .gr-diagram-relations { padding-left: 1.6em; overflow-wrap: anywhere; }
#gr-economics-app .gr-diagram-relations li { margin: 10px 0; }
#gr-economics-app .gr-research-panel { border-top: 3px solid #49b7ef; }
#gr-economics-app .gr-research-status { border-left: 3px solid #56c2fa; background: #102e45; padding: 10px 14px; border-radius: 6px; font-size: .9em; }
#gr-economics-app .gr-email-choice { display: flex; align-items: flex-start; gap: 10px; margin-top: 12px; font-size: .92em; cursor: pointer; }
#gr-economics-app .gr-email-choice input { appearance: auto; flex: 0 0 19px; width: 19px; height: 19px; min-height: 0; padding: 0; margin-top: 6px; accent-color: #54c4ff; }
#gr-economics-app .gr-research-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 12px; }
#gr-economics-app .gr-research-heading h2 { margin-bottom: 0; }
#gr-economics-app .gr-notifications { display: grid; gap: 12px; margin: 15px 0; }
#gr-economics-app .gr-notification { padding: 14px; border: 1px solid #315675; border-radius: 10px; background: #091c30; overflow-wrap: anywhere; }
#gr-economics-app .gr-notification .gr-tag { display: inline-block; margin-bottom: 10px; }
#gr-economics-app .gr-notification.gr-unread { border-left: 4px solid #63caff; background: #12334b; }
#gr-economics-app .gr-notification p { white-space: pre-wrap; }
#gr-economics-app .gr-request-list { margin-top: 16px; }
#gr-economics-app .gr-request-item { padding: 14px 0; }
#gr-economics-app .gr-request-summary { overflow-wrap: anywhere; }
#gr-economics-app .gr-request-summary > span { margin-right: 10px; }
#gr-economics-app .gr-request-label { display: inline-block; padding: 2px 9px; margin-bottom: 4px; border: 1px solid #487b9f; background: #153b55; border-radius: 6px; font-size: .83em; }
#gr-economics-app .gr-request-label.gr-request-completed { background: #143f43; border-color: #58aaa8; color: #d4fffa; }
#gr-economics-app .gr-request-question { white-space: pre-wrap; overflow-wrap: anywhere; padding-top: 12px; }
#gr-economics-app [hidden] { display: none !important; }
@media (max-width: 600px) {
  #gr-economics-app { padding: 14px; border-radius: 15px; font-size: 15px; margin: 14px auto; }
  #gr-economics-app .gr-hero { padding: 12px 15px; gap: 12px; margin-bottom: 16px; }
  #gr-economics-app .gr-logo { width: min(132px, 100%); height: auto; }
  #gr-economics-app .gr-hero-label { font-size: .59rem; letter-spacing: .09em; }
  #gr-economics-app .gr-panel { padding: 15px; }
  #gr-economics-app .gr-grid { grid-template-columns: minmax(0,1fr); gap: 12px; }
  #gr-economics-app .gr-controls button { flex: 1; min-width: 125px; }
  #gr-economics-app .gr-question { max-width: 96%; padding: 11px 14px; }
  #gr-economics-app .gr-answer { padding: 15px; }
}
@media (max-width: 420px) {
  #gr-economics-app .gr-hero-label { display: none; }
  #gr-economics-app .gr-hero { min-height: 155px; }
  #gr-economics-app .gr-levels { gap: 6px; }
}
