:root {
  color-scheme: light;
  --bg: #f7f7fb;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-solid: #ffffff;
  --text: #12172a;
  --muted: #73788a;
  --line: rgba(27, 33, 58, 0.09);
  --shadow: 0 14px 38px rgba(38, 30, 74, 0.08), 0 2px 8px rgba(38, 30, 74, 0.04);
  --purple: #6d30e9;
  --violet: #8e49f6;
  --pink: #e93299;
  --orange: #ff8617;
  --green: #18a85b;
  --green-soft: #ebf8f0;
  --warning: #e47c13;
  --danger: #d93967;
  --radius-xl: 26px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at 94% 4%, rgba(255, 127, 34, 0.09), transparent 20rem),
    radial-gradient(circle at 2% 18%, rgba(108, 47, 232, 0.08), transparent 21rem),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button, input { font: inherit; }
button { color: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(109, 48, 233, 0.24); outline-offset: 2px; }
img { max-width: 100%; }
svg { width: 1.35em; height: 1.35em; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  background: #fbfbfe;
  color: #686e80;
}
.loading-logo { width: 150px; border-radius: 28px; }
.loading-spinner {
  width: 28px; height: 28px; border-radius: 50%; border: 3px solid #ece8f8; border-top-color: var(--purple);
  animation: spin .8s linear infinite;
}
.loading-screen p { margin: 0; font-size: 14px; }
@keyframes spin { to { transform: rotate(360deg); } }

.app-shell {
  width: min(100%, 860px);
  min-height: 100vh;
  margin: 0 auto;
  background: rgba(249, 249, 252, 0.68);
  border-inline: 1px solid rgba(25, 27, 47, 0.04);
}
.demo-strip {
  min-height: calc(26px + var(--safe-top));
  padding: calc(6px + var(--safe-top)) 16px 6px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  background: #171a2a;
  color: rgba(255,255,255,.88);
  font-size: 11px;
  letter-spacing: .02em;
}
.demo-dot { width: 7px; height: 7px; border-radius: 50%; background: #f6af38; box-shadow: 0 0 0 4px rgba(246,175,56,.14); }

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 84px;
  padding: 13px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: rgba(250, 250, 253, 0.9);
  backdrop-filter: blur(18px) saturate(130%);
  border-bottom: 1px solid var(--line);
  transition: background .25s ease, border-color .25s ease, color .25s ease;
}
.brand-button {
  display: flex; align-items: center; gap: 12px; min-width: 0; padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer;
}
.logo-frame {
  width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; overflow: hidden;
  background: #fff; box-shadow: 0 8px 22px rgba(77, 38, 149, .12);
}
.logo-frame img { width: 100%; height: 100%; object-fit: contain; }
.brand-copy { min-width: 0; display: grid; gap: 3px; }
.brand-copy strong { font-size: clamp(17px, 4.6vw, 23px); letter-spacing: -.025em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-copy small { color: var(--muted); font-size: 12px; }
.header-actions { display: flex; align-items: center; gap: 7px; }
.status-badge {
  display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 13px; border-radius: 13px;
  font-size: 13px; font-weight: 700; white-space: nowrap; border: 1px solid transparent;
}
.status-badge.status-ok { color: #168548; background: rgba(232, 249, 239, .94); border-color: rgba(22, 133, 72, .16); }
.status-badge.status-paused { color: #b05b0a; background: #fff5e9; border-color: rgba(176,91,10,.16); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 12%, transparent); }
.icon-button {
  width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 13px; background: rgba(255,255,255,.72); color: #6d7281; cursor: pointer;
}
.icon-button:hover { background: #fff; }

.app-main { padding: 22px 22px calc(102px + var(--safe-bottom)); }
.view-section { animation: view-in .24s ease both; }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.premium-card {
  position: relative;
  background: var(--surface);
  border: 1px solid rgba(33, 34, 63, .075);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.summary-card { padding: 22px; min-height: 238px; }
.card-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: relative; z-index: 2; }
.heading-with-icon { display: flex; align-items: center; gap: 10px; min-width: 0; }
.heading-with-icon h2, .card-heading-row h2 { margin: 0; font-size: 17px; letter-spacing: -.018em; }
.section-icon { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: 0 0 auto; }
.section-icon-purple { color: var(--violet); background: #f2ecff; }
.section-icon-green { color: var(--green); background: #eaf8f0; }
.muted-small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.summary-layout { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(150px, .8fr) 1.5fr; gap: 18px; margin-top: 22px; }
.service-state-block { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-height: 130px; padding-right: 18px; border-right: 1px solid var(--line); }
.large-state { display: flex; align-items: center; gap: 9px; font-size: 27px; font-weight: 800; letter-spacing: -.04em; }
.state-good { color: var(--green); }
.state-warning { color: var(--warning); }
.state-light { width: 11px; height: 11px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 6px color-mix(in srgb, currentColor 12%, transparent); }
.muted-label { color: var(--muted); font-size: 12px; margin-top: 8px; }
.environment-pill { margin-top: 13px; padding: 5px 9px; color: #6e5894; background: #f3effb; border-radius: 999px; font-size: 10px; font-weight: 700; }
.metric-grid { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
.metric-grid div { padding: 11px 0 13px; border-bottom: 1px solid var(--line); }
.metric-grid div:nth-last-child(-n+2) { border-bottom: 0; }
.metric-grid dt { color: var(--muted); font-size: 12px; }
.metric-grid dd { margin: 7px 0 0; font-size: clamp(21px, 5vw, 28px); font-weight: 750; letter-spacing: -.04em; }
.brand-wave { position: absolute; right: -32px; top: 0; width: 280px; height: 130px; opacity: .48; pointer-events: none; }
.brand-wave::before {
  content: ""; position: absolute; inset: -45px -10px 14px 54px; border-radius: 46% 54% 52% 48%;
  background: radial-gradient(circle at 70% 30%, rgba(255,145,31,.6), transparent 30%), radial-gradient(circle at 44% 62%, rgba(235,55,143,.46), transparent 42%);
  filter: blur(8px);
}
.brand-wave span { position: absolute; inset: 0; border-top: 1px solid rgba(216,64,151,.24); border-radius: 50%; transform: rotate(-8deg) translateY(var(--offset, 0)); }
.brand-wave span:nth-child(1) { --offset: 24px; }
.brand-wave span:nth-child(2) { --offset: 34px; }
.brand-wave span:nth-child(3) { --offset: 44px; }
.brand-wave span:nth-child(4) { --offset: 54px; }

.primary-actions { display: grid; grid-template-columns: 1.25fr .95fr; gap: 12px; margin: 16px 0; }
.primary-gradient-button, .secondary-button, .sync-button {
  border: 0; cursor: pointer; min-height: 76px; border-radius: 20px; display: flex; align-items: center; justify-content: center; gap: 13px; transition: transform .15s ease, box-shadow .15s ease;
}
.primary-gradient-button:active, .secondary-button:active, .sync-button:active, .quick-tile:active { transform: scale(.985); }
.primary-gradient-button {
  color: #fff; background: linear-gradient(120deg, #6b24e6 0%, #df2e98 42%, #ff8d19 100%); box-shadow: 0 15px 31px rgba(201, 54, 118, .22); padding: 12px 18px;
}
.primary-gradient-button svg { width: 28px; height: 28px; }
.primary-gradient-button > span { display: grid; gap: 3px; text-align: left; }
.primary-gradient-button strong { font-size: 18px; letter-spacing: -.02em; }
.primary-gradient-button small { color: rgba(255,255,255,.82); font-size: 10px; }
.primary-gradient-button.resume { background: linear-gradient(120deg, #0e9b64, #48bd75); box-shadow: 0 15px 31px rgba(27, 160, 96, .2); }
.secondary-button { background: #fff; border: 1px solid var(--line); color: #7444d5; box-shadow: 0 9px 22px rgba(43, 32, 77, .05); font-weight: 700; }
.sync-button { grid-column: 1 / -1; min-height: 55px; background: rgba(255,255,255,.9); border: 1px solid var(--line); color: #7548d2; box-shadow: 0 8px 18px rgba(43,32,77,.04); }
button[disabled] { opacity: .52; cursor: wait; }

.quick-card { padding: 20px; }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.quick-tile { min-height: 116px; padding: 12px 8px; border-radius: 18px; border: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; cursor: pointer; box-shadow: 0 6px 16px rgba(43,32,77,.035); }
.quick-tile > span:last-child { font-size: 12px; font-weight: 700; line-height: 1.45; text-align: center; }
.quick-icon { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; }
.quick-icon.violet { color: #7d42df; background: #f0e9ff; }
.quick-icon.orange { color: #ec7b13; background: #fff1e3; }
.quick-icon.pink { color: #dc3b8a; background: #fdeaf3; }

.home-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.compact-card { padding: 18px; min-height: 264px; }
.text-button { border: 0; background: transparent; color: #7650bd; padding: 6px; font-size: 11px; cursor: pointer; }
.compact-list { display: grid; gap: 0; margin-top: 12px; }
.compact-row { width: 100%; min-height: 55px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 7px 0; text-align: left; cursor: pointer; }
.compact-row:last-child { border-bottom: 0; }
.symbol-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: -.02em; background: linear-gradient(135deg, #1e263d, #090b12); }
.symbol-avatar.arm { background: linear-gradient(135deg, #4dd5e7, #0789ae); }
.symbol-avatar.sndu { background: linear-gradient(135deg, #31b45a, #087e2d); }
.symbol-avatar.muu { background: linear-gradient(135deg, #48a9ff, #275fc9); }
.symbol-avatar.avgo { background: linear-gradient(135deg, #ef315b, #b80025); }
.symbol-avatar.soxl { background: linear-gradient(135deg, #2e8ecb, #075a9f); }
.symbol-avatar.nbis { color: #202534; background: #fff; border: 1px solid var(--line); }
.row-main { min-width: 0; display: grid; gap: 2px; }
.row-main strong { font-size: 13px; }
.row-main small { color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-side { display: flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 12px; }
.live-label { color: var(--green); font-size: 10px; font-weight: 700; }
.paused-label { color: var(--warning); font-size: 10px; font-weight: 700; }
.status-pill { display: inline-flex; align-items: center; justify-content: center; min-height: 25px; padding: 0 9px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.status-候補 { color: #7440d0; background: #f0e6ff; }
.status-可決 { color: #168749; background: #e9f8ef; }
.status-保留 { color: #c16a12; background: #fff2df; }
.status-除外, .status-取消 { color: #687083; background: #edf0f6; }
.card-footnote { margin: 10px 0 0; color: var(--muted); font-size: 10px; }
.notifications-preview { margin-top: 16px; padding: 19px; }
.notification-list, .notification-page-list { display: grid; margin-top: 12px; }
.notification-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; min-height: 60px; padding: 10px 2px; border-bottom: 1px solid var(--line); background: transparent; border-inline: 0; border-top: 0; text-align: left; cursor: pointer; }
.notification-row:last-child { border-bottom: 0; }
.notice-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: #fff; }
.notice-icon.success { background: #1eb45e; }
.notice-icon.warning { background: #ee8617; }
.notice-icon.info { background: #4a95e9; }
.notification-copy { min-width: 0; display: grid; gap: 3px; }
.notification-copy strong { font-size: 13px; }
.notification-copy small { color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notification-time { color: #979bab; font-size: 10px; }

.page-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin: 4px 0 20px; }
.eyebrow { margin: 0 0 5px; color: #8a63cf; font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.page-title-row h1 { margin: 0; font-size: 28px; letter-spacing: -.04em; }
.page-description { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.soft-pill { display: inline-flex; align-items: center; min-height: 35px; padding: 0 12px; border-radius: 12px; background: #f1ecfb; color: #7242c8; font-size: 11px; font-weight: 700; white-space: nowrap; }
.soft-icon-button { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--violet); cursor: pointer; }
.holding-cards { display: grid; gap: 13px; }
.holding-card { padding: 19px; }
.holding-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.holding-identity { display: flex; align-items: center; gap: 11px; min-width: 0; }
.holding-identity .symbol-avatar { width: 46px; height: 46px; }
.holding-identity h2 { margin: 0; font-size: 20px; }
.holding-identity p { margin: 3px 0 0; color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.allocation-ring { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--purple) 50%, #ede9f7 0); position: relative; }

.allocation-ring.allocation-20 { background: conic-gradient(var(--purple) 20%, #ede9f7 0); }
.allocation-ring.allocation-35 { background: conic-gradient(var(--purple) 35%, #ede9f7 0); }
.allocation-ring.allocation-45 { background: conic-gradient(var(--purple) 45%, #ede9f7 0); }

.allocation-ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #fff; }
.allocation-ring strong { position: relative; font-size: 11px; }
.holding-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 17px; }
.meta-box { min-height: 58px; padding: 10px; border-radius: 14px; background: #f8f7fb; }
.meta-box span { display: block; color: var(--muted); font-size: 9px; }
.meta-box strong { display: block; margin-top: 4px; font-size: 11px; }
.holding-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 14px; }
.mini-action { min-height: 44px; border: 1px solid var(--line); border-radius: 13px; background: #fff; cursor: pointer; font-size: 11px; font-weight: 700; }
.mini-action.warning { color: #ba630b; background: #fff8ef; }
.mini-action.danger { color: #c53e67; background: #fff3f7; }
.protection-card { margin-top: 15px; padding: 18px; }
.protection-card p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; }

/* Universe Discovery */
body.discovery-active {
  background: #04091a;
  color: #f7f6ff;
}
.discovery-active .app-shell { background: #050a1c; border-color: rgba(255,255,255,.04); }
.discovery-active .demo-strip { background: #020614; }
.discovery-active .app-header { background: rgba(5, 10, 28, .88); color: #fff; border-bottom-color: rgba(255,255,255,.08); }
.discovery-active .brand-copy small { color: rgba(231,229,248,.66); }
.discovery-active .status-badge.status-ok { color: #d8c1ff; background: rgba(106,48,219,.16); border-color: rgba(188,147,255,.24); }
.discovery-active .icon-button { color: #d5cdeb; background: rgba(255,255,255,.06); }
.discovery-active .bottom-nav { background: rgba(7, 12, 31, .95); border-top-color: rgba(255,255,255,.08); }
.discovery-active .nav-button { color: #8e93aa; }
.discovery-active .nav-button.active { color: #bd6cff; }
.discovery-view { position: relative; isolation: isolate; }
.discovery-view::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(circle at 80% 4%, rgba(152,59,222,.16), transparent 24rem),
    radial-gradient(circle at 20% 28%, rgba(63,84,224,.12), transparent 22rem),
    radial-gradient(circle at 60% 80%, rgba(239,70,157,.09), transparent 25rem),
    linear-gradient(#050a1c, #070c21);
}
.discovery-view::after {
  content: ""; position: fixed; inset: 0; z-index: -1; opacity: .35; pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,.55) 0 1px, transparent 1.2px);
  background-size: 37px 37px;
  mask-image: linear-gradient(to bottom, #000, transparent 80%);
}
.space-search-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.space-search { min-height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 15px; border: 1px solid rgba(191,162,255,.25); border-radius: 16px; background: rgba(19,25,53,.78); color: #aeb3c8; backdrop-filter: blur(14px); }
.space-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: #fff; font-size: 13px; }
.space-search input::placeholder { color: #777f99; }
.space-filter-button { min-width: 108px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid rgba(191,162,255,.25); border-radius: 16px; background: rgba(19,25,53,.78); color: #f0edff; cursor: pointer; font-weight: 700; font-size: 12px; }
.filter-chips { display: flex; gap: 8px; overflow-x: auto; padding: 13px 1px 12px; scrollbar-width: none; }
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chip { flex: 0 0 auto; min-height: 34px; padding: 0 15px; border: 1px solid rgba(188,165,242,.16); border-radius: 999px; background: rgba(20,26,54,.72); color: #aab0c5; cursor: pointer; font-size: 11px; font-weight: 700; }
.filter-chip.active { color: #fff; border-color: #a55ff1; background: rgba(119,50,203,.28); box-shadow: 0 0 24px rgba(165,95,241,.15); }
.space-hero-card { position: relative; min-height: 260px; padding: 25px; border-radius: 25px; border: 1px solid rgba(184,86,238,.6); overflow: hidden; background: linear-gradient(135deg, rgba(16,14,49,.94), rgba(8,18,51,.86)); box-shadow: 0 25px 55px rgba(0,0,0,.28), inset 0 0 30px rgba(124,48,221,.08); }
.space-hero-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 82% 48%, rgba(161,51,218,.18), transparent 34%), radial-gradient(circle at 65% 80%, rgba(255,119,34,.10), transparent 32%); }
.space-hero-copy { position: relative; z-index: 2; max-width: 55%; }
.space-kicker { margin: 0 0 9px; color: #cc91ff; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.space-hero-copy h1 { margin: 0; font-size: clamp(25px, 6vw, 34px); letter-spacing: -.04em; background: linear-gradient(90deg, #e87cff, #f255ad, #ff9b42); -webkit-background-clip: text; color: transparent; }
.space-hero-copy > p:not(.space-kicker) { margin: 12px 0 0; color: #c0c3d6; font-size: 11px; line-height: 1.8; }
.space-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 21px; }
.space-metrics div { min-height: 68px; padding: 11px 12px; border-radius: 14px; background: rgba(7,10,33,.58); border: 1px solid rgba(179,114,239,.24); }
.space-metrics span { display: block; color: #aab0c5; font-size: 9px; }
.space-metrics strong { display: block; margin-top: 5px; font-size: 23px; }
.orbit-visual { position: absolute; right: -12px; top: 13px; width: 49%; height: 230px; }
.planet { position: absolute; border-radius: 50%; z-index: 2; }
.planet-main { width: 86px; height: 86px; left: 47%; top: 44%; transform: translate(-50%,-50%); background: radial-gradient(circle at 34% 28%, #fff 0 2%, #d37cff 7%, #6d30e9 34%, #e43895 65%, #ff8f2b 82%, #32176c 100%); box-shadow: 0 0 26px rgba(178,83,255,.75), inset -14px -15px 20px rgba(24,7,56,.45); }
.planet-main::after { content: ""; position: absolute; inset: 23px -30px; border: 2px solid rgba(255,163,75,.72); border-radius: 50%; transform: rotate(-14deg); box-shadow: 0 0 14px rgba(255,143,43,.35); }
.planet-small-one { width: 14px; height: 14px; right: 10%; top: 18%; background: #ffcb67; box-shadow: 0 0 14px #ff9b39; }
.planet-small-two { width: 10px; height: 10px; left: 4%; bottom: 18%; background: #c765ff; box-shadow: 0 0 14px #8d41ef; }
.orbit { position: absolute; left: 50%; top: 50%; border: 1px solid rgba(168,91,247,.38); border-radius: 50%; transform: translate(-50%,-50%) rotate(var(--rotation)); }
.orbit-one { width: 94%; height: 45%; --rotation: -8deg; }
.orbit-two { width: 86%; height: 75%; --rotation: 17deg; border-color: rgba(245,84,170,.3); }
.orbit-three { width: 63%; height: 100%; --rotation: 58deg; border-color: rgba(255,151,48,.28); }
.star { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #fff; box-shadow: 0 0 11px #d881ff; }
.star-one { left: 16%; top: 18%; }
.star-two { right: 25%; bottom: 10%; background: #ffad4e; box-shadow: 0 0 12px #ff7e27; }
.star-three { left: 30%; bottom: 8%; background: #8d65ff; }
.star-four { right: 2%; top: 54%; background: #ff72b7; }
.space-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 22px 4px 12px; }
.space-section-heading.compact { margin: 0 0 10px; align-items: center; }
.space-section-heading h2 { margin: 0; color: #fff; font-size: 17px; }
.space-eyebrow { color: #aa68ec; }
.space-refresh, .space-link-button { display: flex; align-items: center; gap: 7px; border: 0; background: transparent; color: #858da7; cursor: pointer; font-size: 10px; }
.candidate-list { display: grid; gap: 9px; }
.candidate-card { position: relative; min-height: 102px; padding: 14px 14px 13px; display: grid; grid-template-columns: auto auto 1fr auto; gap: 10px; align-items: center; border: 1px solid rgba(150,159,202,.16); border-radius: 17px; background: linear-gradient(135deg, rgba(18,27,59,.92), rgba(11,17,40,.92)); color: #fff; box-shadow: 0 11px 24px rgba(0,0,0,.12); cursor: pointer; text-align: left; }
.candidate-card:hover { border-color: rgba(174,102,244,.42); }
.rank-mark { width: 25px; color: #7f879f; text-align: center; font-size: 13px; font-weight: 800; }
.rank-mark.top { color: #f7b933; }
.candidate-card .symbol-avatar { width: 43px; height: 43px; }
.candidate-content { min-width: 0; }
.candidate-title-line { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.candidate-title-line strong { font-size: 17px; }
.candidate-title-line small { color: #8e95ad; font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.candidate-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.candidate-tag { padding: 4px 7px; border-radius: 6px; color: #aeb4c9; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.05); font-size: 8px; }
.candidate-reason { margin: 7px 0 0; color: #a5abc0; font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.candidate-score { min-width: 54px; display: grid; justify-items: end; gap: 5px; }
.candidate-score > small { color: #8e96ae; font-size: 8px; }
.candidate-score > strong { font-size: 22px; line-height: 1; }
.candidate-score .status-pill { min-width: 46px; }
.space-updates-card { margin-top: 15px; padding: 18px; border-radius: 20px; border: 1px solid rgba(137,146,188,.15); background: rgba(13,20,46,.78); }
.space-notification-list { display: grid; }
.space-notification { min-height: 48px; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; border-bottom: 1px solid rgba(255,255,255,.06); color: #e5e4ef; }
.space-notification:last-child { border-bottom: 0; }
.space-notification .notice-icon { width: 27px; height: 27px; }
.space-notification strong { font-size: 10px; }
.space-notification time { color: #7f879f; font-size: 9px; }

/* Operations */
.operation-main-card { padding: 21px; }
.operation-state-hero { display: flex; align-items: center; gap: 16px; }
.operation-orb { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 19px; color: #fff; flex: 0 0 auto; }
.operation-orb.good { background: linear-gradient(135deg, #2dc675, #0b9958); box-shadow: 0 12px 24px rgba(23,161,94,.2); }
.operation-orb.paused { background: linear-gradient(135deg, #f29a32, #d65d18); box-shadow: 0 12px 24px rgba(221,111,24,.2); }
.operation-state-hero h2 { margin: 4px 0 2px; font-size: 23px; }
.operation-state-hero p { margin: 0; color: var(--muted); font-size: 11px; }
.full-primary-button { width: 100%; min-height: 52px; margin-top: 18px; border: 0; border-radius: 15px; color: #fff; font-weight: 800; cursor: pointer; }
.full-primary-button.danger { background: linear-gradient(120deg, #d73072, #f07e25); }
.full-primary-button.good { background: linear-gradient(120deg, #13955d, #45bd76); }
.operation-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 13px; }
.operation-card { padding: 18px; }
.operation-icon { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 14px; }
.operation-icon.orange { color: #ef8016; background: #fff2e5; }
.operation-icon.violet { color: #7d44dc; background: #f1ebff; }
.operation-card h2 { margin: 12px 0 6px; font-size: 16px; }
.operation-card p { min-height: 36px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.outline-button { width: 100%; min-height: 42px; margin-top: 13px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: #7142c8; cursor: pointer; font-size: 11px; font-weight: 700; }
.safety-check-card, .history-card { margin-top: 13px; padding: 19px; }
.check-list { list-style: none; margin: 15px 0 0; padding: 0; display: grid; gap: 9px; }
.check-item { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; min-height: 45px; padding: 9px 11px; border-radius: 13px; background: #f8f8fb; }
.check-symbol { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; }
.check-symbol.ok { color: #fff; background: var(--green); }
.check-symbol.ng { color: #fff; background: var(--danger); }
.check-item span:nth-child(2) { font-size: 11px; }
.check-item strong { color: var(--muted); font-size: 10px; }
.history-list { display: grid; margin-top: 12px; }
.history-entry { min-height: 54px; padding: 9px 2px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.history-entry:last-child { border-bottom: 0; }
.history-entry strong { font-size: 11px; }
.history-entry small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.history-entry time { color: #9a9eae; font-size: 9px; }
.empty-state { padding: 28px 10px; text-align: center; color: var(--muted); font-size: 11px; }
.notification-page-list { gap: 11px; }
.notification-page-card { padding: 17px; display: grid; grid-template-columns: auto 1fr; gap: 13px; border: 1px solid var(--line); border-radius: 19px; background: #fff; box-shadow: 0 8px 20px rgba(45,35,77,.045); cursor: pointer; }
.notification-page-card h2 { margin: 0; font-size: 14px; }
.notification-page-card p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.notification-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; color: #969aaa; font-size: 9px; }

.bottom-nav {
  position: fixed;
  z-index: 35;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%, 860px);
  min-height: calc(72px + var(--safe-bottom));
  padding: 8px 12px var(--safe-bottom);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(18px) saturate(140%);
  border-top: 1px solid var(--line);
}
.nav-button { border: 0; background: transparent; color: #7e8290; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; font-size: 10px; }
.nav-button svg { width: 24px; height: 24px; }
.nav-button.active { color: var(--purple); font-weight: 800; }

.confirm-dialog { border: 0; padding: 0; background: transparent; width: min(calc(100% - 30px), 420px); }
.confirm-dialog::backdrop { background: rgba(7, 9, 21, .58); backdrop-filter: blur(6px); }
.dialog-card { margin: 0; padding: 25px; border-radius: 24px; background: #fff; box-shadow: 0 30px 70px rgba(8,6,25,.28); text-align: center; }
.dialog-icon { width: 56px; height: 56px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 18px; color: #fff; background: linear-gradient(135deg, #7531e9, #e23a91, #ff8a1c); }
.dialog-card h2 { margin: 0; font-size: 21px; }
.dialog-card > p { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.dialog-details { margin-top: 13px; padding: 12px; border-radius: 13px; background: #f8f6fc; color: #686d7d; font-size: 10px; line-height: 1.6; text-align: left; }
.dialog-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 20px; }
.dialog-buttons button { min-height: 48px; border-radius: 14px; cursor: pointer; font-weight: 800; }
.dialog-cancel { border: 1px solid var(--line); background: #fff; color: #696e7e; }
.dialog-confirm { border: 0; background: linear-gradient(120deg, #6f2de4, #e23a91, #ff8a1c); color: #fff; }

.detail-drawer { position: fixed; inset: 0; z-index: 60; pointer-events: none; visibility: hidden; }
.detail-drawer.open { pointer-events: auto; visibility: visible; }
.drawer-backdrop { position: absolute; inset: 0; border: 0; background: rgba(5,7,18,.52); opacity: 0; transition: opacity .22s ease; }
.detail-drawer.open .drawer-backdrop { opacity: 1; }
.drawer-panel { position: absolute; left: 50%; bottom: 0; width: min(100%, 860px); max-height: 82vh; padding: 10px 22px calc(24px + var(--safe-bottom)); border-radius: 28px 28px 0 0; background: #fff; color: var(--text); transform: translate(-50%, 102%); transition: transform .28s cubic-bezier(.2,.78,.2,1); overflow-y: auto; }
.detail-drawer.open .drawer-panel { transform: translate(-50%, 0); }
.drawer-handle { width: 45px; height: 5px; border-radius: 999px; background: #d9d9e1; margin: 0 auto 18px; }
.drawer-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.drawer-heading h2 { margin: 0; font-size: 24px; }
.drawer-body { margin-top: 16px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.detail-box { padding: 13px; border-radius: 14px; background: #f7f6fa; }
.detail-box span { display: block; color: var(--muted); font-size: 9px; }
.detail-box strong { display: block; margin-top: 5px; font-size: 13px; }
.detail-reason { margin-top: 12px; padding: 14px; border-radius: 15px; background: #f7f3ff; color: #5e566b; font-size: 11px; line-height: 1.75; }
.drawer-action-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 15px; }
.drawer-action-row button { min-height: 46px; border-radius: 13px; cursor: pointer; font-weight: 750; }

.toast { position: fixed; z-index: 90; left: 50%; bottom: calc(90px + var(--safe-bottom)); transform: translateX(-50%); width: min(calc(100% - 28px), 540px); padding: 13px 16px; display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; border-radius: 18px; background: rgba(20,23,38,.96); color: #fff; box-shadow: 0 18px 45px rgba(8,8,18,.25); animation: toast-in .25s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.toast-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #21af62; }
.toast-icon.toast-success { background: #21af62; }
.toast-icon.toast-warning { background: #e98a1d; }
.toast-icon.toast-error { background: #d94469; }
.drawer-open-body { overflow: hidden; }
.toast strong { font-size: 12px; }
.toast p { margin: 3px 0 0; color: rgba(255,255,255,.7); font-size: 10px; line-height: 1.5; }

/* Login */
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 88% 10%, rgba(255,143,31,.15), transparent 24rem), radial-gradient(circle at 8% 70%, rgba(111,45,230,.13), transparent 24rem), #f7f7fb; }
.login-shell { width: min(100%, 430px); }
.login-card { padding: 30px; border: 1px solid rgba(30,31,55,.08); border-radius: 30px; background: rgba(255,255,255,.93); box-shadow: 0 28px 70px rgba(44,30,82,.12); backdrop-filter: blur(18px); }
.login-brand { display: flex; align-items: center; gap: 13px; }
.login-logo { width: 65px; height: 65px; border-radius: 20px; overflow: hidden; background: #fff; box-shadow: 0 10px 25px rgba(71,37,134,.12); }
.login-logo img { width: 100%; height: 100%; object-fit: contain; }
.login-brand h1 { margin: 0; font-size: 23px; letter-spacing: -.03em; }
.login-brand p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.login-copy { margin-top: 28px; }
.login-copy h2 { margin: 0; font-size: 29px; letter-spacing: -.04em; }
.login-copy > p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.login-form { display: grid; gap: 15px; margin-top: 23px; }
.login-form label { display: grid; gap: 7px; color: #5d6272; font-size: 11px; font-weight: 700; }
.login-form input { width: 100%; min-height: 52px; padding: 0 15px; border: 1px solid rgba(34,35,58,.13); border-radius: 15px; background: #fbfbfd; color: var(--text); }
.login-form button { min-height: 54px; border: 0; border-radius: 16px; background: linear-gradient(120deg, #6b28e3, #df3295, #ff891c); color: #fff; cursor: pointer; font-weight: 800; box-shadow: 0 14px 28px rgba(197,56,130,.2); }
.login-error { margin: 0; padding: 10px 12px; border-radius: 12px; color: #a72f55; background: #fff0f4; font-size: 11px; }
.demo-login-note { margin-top: 18px; padding: 13px; display: grid; gap: 4px; border-radius: 14px; background: #f4f0fc; color: #70647f; font-size: 10px; line-height: 1.55; }
.demo-login-note strong { color: #7142c8; }

@media (max-width: 680px) {
  .app-header { height: 76px; padding: 11px 15px; }
  .app-main { padding: 16px 14px calc(94px + var(--safe-bottom)); }
  .logo-frame { width: 45px; height: 45px; border-radius: 14px; }
  .status-badge { min-height: 34px; padding: 0 10px; font-size: 11px; }
  .header-actions .icon-button { display: none; }
  .summary-card { padding: 17px; min-height: auto; }
  .summary-layout { grid-template-columns: 1fr; gap: 9px; margin-top: 16px; }
  .service-state-block { min-height: 82px; padding: 8px 0 13px; border-right: 0; border-bottom: 1px solid var(--line); }
  .large-state { font-size: 24px; }
  .metric-grid { gap: 0 14px; }
  .metric-grid dd { font-size: 20px; }
  .primary-actions { grid-template-columns: 1.1fr .9fr; }
  .primary-gradient-button { min-height: 70px; }
  .secondary-button { min-height: 70px; }
  .quick-card { padding: 16px; }
  .quick-grid { grid-template-columns: 1fr 1fr; }
  .quick-tile { min-height: 100px; }
  .home-columns { grid-template-columns: 1fr; }
  .compact-card { min-height: 0; }
  .holding-meta { grid-template-columns: 1fr 1fr; }
  .operation-grid { grid-template-columns: 1fr; }
  .space-hero-card { min-height: 290px; padding: 20px; }
  .space-hero-copy { max-width: 64%; }
  .orbit-visual { width: 55%; right: -30px; top: 35px; }
  .candidate-card { grid-template-columns: auto auto minmax(0,1fr) auto; padding: 12px 10px; gap: 8px; }
  .candidate-title-line { display: grid; gap: 1px; }
  .candidate-tags .candidate-tag:nth-child(3) { display: none; }
  .candidate-reason { max-width: 170px; }
}

@media (max-width: 390px) {
  .brand-copy strong { font-size: 16px; }
  .brand-copy small { font-size: 10px; }
  .status-badge { max-width: 104px; overflow: hidden; }
  .primary-actions { grid-template-columns: 1fr; }
  .secondary-button, .sync-button { min-height: 53px; }
  .sync-button { grid-column: auto; }
  .space-search-row { grid-template-columns: 1fr; }
  .space-filter-button { min-height: 45px; }
  .space-hero-copy { max-width: 72%; }
  .orbit-visual { opacity: .75; right: -60px; }
  .candidate-card { grid-template-columns: auto auto minmax(0,1fr); }
  .candidate-score { grid-column: 3; grid-row: 2; justify-items: start; display: flex; align-items: center; gap: 8px; }
}

.demo-strip.connected-strip {
  background: linear-gradient(90deg, rgba(91, 56, 255, .12), rgba(255, 93, 93, .10));
  color: #34245c;
}
.demo-strip.connected-strip .demo-dot {
  background: #26a269;
  box-shadow: 0 0 0 4px rgba(38, 162, 105, .14);
}
button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

/* 0.12.02 UI clarity: transparent logo and valuation details */
.logo-frame,
.login-logo {
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
.logo-frame img,
.login-logo img,
.loading-logo {
  background: transparent;
  mix-blend-mode: normal;
}
.discovery-active .logo-frame {
  background: transparent;
  box-shadow: none;
}
.summary-timestamps {
  display: grid;
  justify-items: end;
  gap: 2px;
}
.broker-power-strip {
  position: relative;
  z-index: 2;
  margin-top: 16px;
  padding: 11px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(108, 52, 219, .10);
  border-radius: 14px;
  background: linear-gradient(110deg, rgba(111, 45, 230, .055), rgba(255, 139, 31, .055));
}
.broker-power-strip span { display: grid; gap: 3px; }
.broker-power-strip small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.broker-power-strip strong { color: var(--text); font-size: 14px; }
.broker-power-strip > small { max-width: 55%; text-align: right; overflow-wrap: anywhere; }
.valuation-detail-card { padding: 20px; margin-bottom: 15px; }
.valuation-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 0;
}
.valuation-detail-grid > div {
  min-height: 72px;
  padding: 12px;
  border-radius: 14px;
  background: #f8f7fb;
  border: 1px solid rgba(35, 35, 64, .045);
}
.valuation-detail-grid dt { color: var(--muted); font-size: 9px; }
.valuation-detail-grid dd { margin: 7px 0 0; font-size: 12px; font-weight: 800; line-height: 1.45; overflow-wrap: anywhere; }
.valuation-detail-grid .valuation-total {
  background: linear-gradient(120deg, rgba(111,45,230,.10), rgba(255,139,31,.09));
  border-color: rgba(111,45,230,.10);
}
.valuation-note { margin: 12px 2px 0; color: var(--muted); font-size: 9px; line-height: 1.65; }
.discovery-active .valuation-detail-grid > div { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.06); }
.discovery-active .broker-power-strip { background: rgba(255,255,255,.035); border-color: rgba(255,255,255,.07); }
.discovery-active .broker-power-strip strong { color: #fff; }

@media (max-width: 520px) {
  .broker-power-strip { align-items: flex-start; }
  .broker-power-strip > small { max-width: 50%; }
  .valuation-detail-grid { grid-template-columns: 1fr 1fr; }
}
