:root {
  --bg: #f6f8fa;
  --surface: #ffffff;
  --surface-soft: #f1f4f6;
  --line: #dde3e7;
  --line-strong: #c5ced5;
  --text: #202326;
  --muted: #66707a;
  --green: #147a63;
  --green-soft: #e5f4ee;
  --amber: #986a12;
  --amber-soft: #fff2cf;
  --red: #b2463e;
  --red-soft: #fde8e5;
  --pink: #c75078;
  --pink-soft: #fdeaf2;
  --sky: #3a9fc9;
  --sky-soft: #e6f7fd;
  --blue: #286bb0;
  --blue-soft: #e8f1fb;
  --theme-blue: #245dc7;
  --theme-blue-soft: #e8efff;
  --ink: #111417;
  --shadow: 0 18px 42px rgba(29, 39, 48, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(246, 248, 250, 0.96), rgba(246, 248, 250, 1)),
    repeating-linear-gradient(90deg, rgba(32, 35, 38, 0.035) 0 1px, transparent 1px 112px);
  color: var(--text);
  font-family:
    Inter,
    "Segoe UI",
    "Apple SD Gothic Neo",
    "Malgun Gothic",
    sans-serif;
  line-height: 1.45;
  letter-spacing: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1800px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 34px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid #b9d8cc;
  border-radius: 8px;
  background: linear-gradient(135deg, #ebf6f1, #ffffff 72%);
  box-shadow: 0 8px 18px rgba(20, 122, 99, 0.12);
  flex: 0 0 auto;
}

.brand-mark svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--green);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.brand-mark circle {
  fill: #ffffff;
}

.brand-mark img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--ink);
  font-size: 25px;
  line-height: 1.05;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sync-state {
  min-width: 72px;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.ghost-button,
.tab-button,
.filter-chip {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.ghost-button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  font-weight: 800;
}

.ghost-button:hover,
.tab-button:hover,
.filter-chip:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.dashboard {
  display: grid;
  gap: 14px;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.tabs,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.tab-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 70px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 800;
}

.tab-button.fund-all {
  min-width: 184px;
  min-height: 54px;
  padding: 0 16px;
  gap: 11px;
}

.tab-button.fund-all .fund-icon {
  width: 30px;
  height: 30px;
  stroke-width: 2.7;
}

.tab-button.fund-all .tab-copy b {
  font-size: 18px;
}

.tab-button.fund-all .tab-copy small {
  font-size: 11px;
}

.tab-button.fund-etf {
  min-width: 76px;
  min-height: 38px;
  padding: 0 10px;
}

.tab-button.fund-etf .tab-copy b {
  font-size: 13px;
}

.tab-button.fund-etf .tab-copy small {
  font-size: 9px;
}

.fund-icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
  flex: 0 0 auto;
}

.tab-copy {
  display: grid;
  min-width: 0;
  line-height: 1.05;
}

.tab-copy b {
  font-size: 14px;
}

.tab-copy small {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 800;
}

.tab-button.active {
  border-color: #9fc8b7;
  background: var(--green-soft);
  color: var(--green);
}

.toolbar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-box {
  display: flex;
  align-items: center;
  min-height: 38px;
  min-width: 240px;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.search-box span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0 12px;
  font-weight: 700;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat-card {
  position: relative;
  min-height: 92px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(29, 39, 48, 0.06);
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
}

.stat-card.opportunity {
  border-color: #b9d8cc;
  border-left-color: var(--green);
  background: var(--surface);
}

.stat-card.caution {
  border-color: #efc3bd;
  border-left-color: var(--red);
  background: var(--surface);
}

.stat-card.news {
  border-color: #b8cee7;
  border-left-color: var(--blue);
  background: var(--surface);
}

.content-grid {
  display: grid;
  grid-template-columns: clamp(220px, 15vw, 280px) minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.list-panel,
.detail-panel,
.sector-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.sector-panel {
  position: sticky;
  top: 14px;
  min-width: 0;
  overflow: hidden;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.panel-title span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
}

.text-button {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.text-button.active {
  border-color: #b8cee7;
  background: var(--blue-soft);
  color: var(--blue);
}

.sector-list {
  display: grid;
  gap: 6px;
  padding: 8px;
}

.sector-card {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 8px;
  background: var(--surface);
  color: inherit;
  text-align: left;
}

.sector-card.theme-red {
  border-left-color: var(--red);
  background: var(--surface);
}

.sector-card.theme-pink {
  border-left-color: var(--pink);
  background: var(--surface);
}

.sector-card.theme-white {
  border-color: var(--line);
  border-left-color: var(--line-strong);
  background: #fff;
}

.sector-card.theme-sky {
  border-left-color: var(--blue);
  background: var(--surface);
}

.sector-card.theme-blue {
  border-left-color: var(--blue);
  background: var(--surface);
}

.sector-card.theme-amber {
  border-left-color: var(--amber);
  background: var(--surface);
}

.sector-card:hover,
.sector-card.active {
  border-color: var(--line-strong);
  background: #f8fafb;
  box-shadow: 0 0 0 1px rgba(17, 20, 23, 0.04);
}

.sector-copy {
  display: grid;
  min-width: 0;
}

.sector-copy b,
.sector-cell-copy b {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sector-copy small,
.sector-cell-copy small {
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sector-score {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.sector-card.theme-red .sector-score {
  color: var(--red);
}

.sector-card.theme-pink .sector-score {
  color: var(--pink);
}

.sector-card.theme-sky .sector-score {
  color: var(--blue);
}

.sector-card.theme-blue .sector-score {
  color: var(--blue);
}

.sector-card.theme-amber .sector-score {
  color: var(--amber);
}

.sector-icon-wrap {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
}

.sector-icon-wrap.good {
  border-color: #a8d2c2;
  background: var(--green-soft);
  color: var(--green);
}

.sector-icon-wrap.warn {
  border-color: #e6cb84;
  background: var(--amber-soft);
  color: var(--amber);
}

.sector-icon-wrap.bad {
  border-color: #efc3bd;
  background: var(--red-soft);
  color: var(--red);
}

.sector-icon-wrap.info {
  border-color: #b8cee7;
  background: var(--blue-soft);
  color: var(--blue);
}

.sector-icon-wrap.theme-red {
  border-color: #efc3bd;
  background: var(--red-soft);
  color: var(--red);
}

.sector-icon-wrap.theme-pink {
  border-color: #efc5d4;
  background: var(--pink-soft);
  color: var(--pink);
}

.sector-icon-wrap.theme-white {
  border-color: var(--line);
  background: #fff;
  color: var(--muted);
}

.sector-icon-wrap.theme-sky {
  border-color: #b8cee7;
  background: var(--blue-soft);
  color: var(--blue);
}

.sector-icon-wrap.theme-blue {
  border-color: #b8cee7;
  background: var(--blue-soft);
  color: var(--blue);
}

.sector-icon-wrap.theme-amber {
  border-color: #e6cb84;
  background: var(--amber-soft);
  color: var(--amber);
}

.sector-icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.list-panel {
  min-width: 0;
  overflow: hidden;
}

.hidden {
  display: none !important;
}

.premium-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(17, 20, 23, 0.42);
}

.premium-dialog {
  width: min(420px, 100%);
  padding: 20px;
  border: 1px solid #c7b7e9;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 60px rgba(29, 39, 48, 0.22);
}

.premium-dialog h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.2;
}

.premium-dialog p {
  margin: 12px 0 0;
  color: var(--text);
  font-size: 14px;
}

.premium-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.premium-yes {
  border-color: #bda7ea;
  background: #f0e8ff;
  color: #5b2ea6;
}

.filter-row {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-group {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  padding: 3px 5px;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #fbfdff;
}

.filter-group-label {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 7px;
  background: #eef3f8;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.filter-group-late {
  border-color: #c7b7e9;
  background: #fbf8ff;
}

.filter-group-late .filter-group-label {
  background: #f0e8ff;
  color: #5b2ea6;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 800;
}

.filter-chip.active {
  border-color: #b8cee7;
  background: var(--blue-soft);
  color: var(--blue);
}

.filter-chip[data-filter="aggressive_buy"],
.filter-chip[data-filter="aggressive_buy"].active {
  border-color: #d88982;
  color: #9b211b;
}

.filter-chip[data-filter="aggressive_buy"].active {
  background: #f8d2cd;
}

.filter-chip[data-filter="staged_buy"],
.filter-chip[data-filter="staged_buy"].active {
  border-color: #efb9b1;
  color: #b63b33;
}

.filter-chip[data-filter="staged_buy"].active {
  background: #fde1dd;
}

.filter-chip[data-filter="observe_good"],
.filter-chip[data-filter="observe_good"].active {
  border-color: #f3ccc7;
  color: #b45b53;
}

.filter-chip[data-filter="observe_good"].active {
  background: #fff0ee;
}

.filter-chip[data-filter="observe_neutral"],
.filter-chip[data-filter="observe_neutral"].active {
  border-color: #d2d8de;
  color: #5f6872;
}

.filter-chip[data-filter="observe_neutral"].active {
  background: #f0f3f6;
}

.filter-chip[data-filter="observe_caution"],
.filter-chip[data-filter="observe_caution"].active {
  border-color: #b8dff1;
  color: #347fa2;
}

.filter-chip[data-filter="observe_caution"].active {
  background: #eefaff;
}

.filter-chip[data-filter="chase_warning"],
.filter-chip[data-filter="chase_warning"].active {
  border-color: #9ccfe9;
  color: #1d6f9b;
}

.filter-chip[data-filter="chase_warning"].active {
  background: #dff3fc;
}

.filter-chip[data-filter="profit_take"],
.filter-chip[data-filter="profit_take"].active {
  border-color: #b8cee7;
  color: #286bb0;
}

.filter-chip[data-filter="profit_take"].active {
  background: var(--blue-soft);
}

.filter-chip[data-filter="sell_risk"],
.filter-chip[data-filter="sell_risk"].active {
  border-color: #8fb2d8;
  color: #164f89;
}

.filter-chip[data-filter="sell_risk"].active {
  background: #d9e9fb;
}

.filter-chip.purple,
.filter-chip.purple.active {
  border-color: #bda7ea;
  color: #5b2ea6;
}

.filter-chip.purple.active {
  background: #f0e8ff;
}

.filter-chip.locked {
  border-style: dashed;
  background: #f7f3ff;
  color: #7257a5;
}

.lock-badge {
  display: none;
  align-items: center;
  min-height: 20px;
  padding: 0 6px;
  border-radius: 7px;
  background: #e8ddff;
  color: #5b2ea6;
  font-size: 11px;
  font-weight: 950;
}

.filter-chip.locked .lock-badge {
  display: inline-flex;
}

.table-wrap {
  overflow-x: auto;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 54px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: #fbfcfd;
}

.page-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.page-button {
  min-width: 42px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.page-button.active {
  border-color: #b8cee7;
  background: var(--blue-soft);
  color: var(--blue);
}

.page-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.ticker-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  table-layout: fixed;
}

.ticker-table th:nth-child(1) {
  width: 30%;
}

.ticker-table th:nth-child(2) {
  width: 12%;
}

.ticker-table th:nth-child(3) {
  width: 18%;
}

.ticker-table th:nth-child(4) {
  width: 9%;
}

.ticker-table th:nth-child(5) {
  width: 11%;
}

.ticker-table th:nth-child(6) {
  width: 11%;
}

.ticker-table th:nth-child(7) {
  width: 9%;
}

.ticker-table th,
.ticker-table td {
  position: relative;
  min-width: 0;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  text-align: left;
  vertical-align: middle;
}

.ticker-table td > * {
  max-width: 100%;
}

.ticker-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7fafb;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.ticker-table tbody tr {
  background: var(--surface);
  cursor: pointer;
  transition: background 0.16s ease;
}

.ticker-table tbody tr:hover,
.ticker-table tbody tr.active {
  background: #f8fafb;
}

.ticker-table button.row-button {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.ticker-cell {
  display: grid;
  grid-template-columns: minmax(118px, 1fr) 74px 40px 48px;
  align-items: center;
  gap: 7px;
  overflow: hidden;
}

.ticker-copy {
  display: grid;
  min-width: 0;
  overflow: hidden;
}

.ticker-table .ticker {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.ticker-table .company {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-ko {
  overflow: hidden;
  margin-top: 2px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logo-shell {
  position: relative;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 16px rgba(27, 36, 45, 0.08);
  overflow: hidden;
  flex: 0 0 auto;
}

.holding-funds {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  width: 74px;
  min-width: 0;
  max-width: 74px;
  overflow: hidden;
}

.holding-funds.empty {
  width: 1px;
  min-width: 1px;
}

.holding-fund-badge,
.holding-fund-extra {
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border: 1px solid #d2d8dd;
  border-radius: 6px;
  background: #f6f7f8;
  color: #77808a;
  flex: 0 0 auto;
}

.holding-fund-badge .fund-icon {
  width: 10px;
  height: 10px;
  stroke-width: 3.2;
}

.holding-fund-extra {
  width: auto;
  min-width: 20px;
  padding: 0 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}

.logo-fallback {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
}

.company-logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 6px;
  background: #fff;
  object-fit: contain;
}

.logo-shell.large {
  width: 46px;
  height: 46px;
}

.company-logo.large {
  padding: 7px;
}

.mini-sector {
  display: grid;
  justify-items: center;
  gap: 3px;
  width: 48px;
  min-width: 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
}

.mini-sector .sector-icon-wrap {
  width: 23px;
  height: 23px;
  border-radius: 8px;
}

.mini-sector .sector-icon {
  width: 14px;
  height: 14px;
  stroke-width: 3.2;
}

.mini-sector > span:last-child {
  display: block;
  width: 48px;
  max-width: 48px;
  max-height: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-sector.theme-red {
  color: var(--red);
}

.mini-sector.theme-pink {
  color: var(--pink);
}

.mini-sector.theme-sky {
  color: var(--blue);
}

.mini-sector.theme-blue {
  color: var(--blue);
}

.mini-sector.theme-amber {
  color: var(--amber);
}

.sector-cell {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-width: 0;
  overflow: hidden;
}

.sector-cell-copy {
  display: grid;
  min-width: 0;
  overflow: hidden;
}

.sector-cell-copy small.warn {
  color: var(--amber);
}

.sector-cell-copy small.good {
  color: var(--green);
}

.sector-cell-copy small.bad {
  color: var(--red);
}

.sector-cell-copy small.info {
  color: var(--blue);
}

.sector-copy small.theme-red,
.sector-cell-copy small.theme-red {
  color: var(--red);
}

.sector-copy small.theme-pink,
.sector-cell-copy small.theme-pink {
  color: var(--pink);
}

.sector-copy small.theme-white,
.sector-cell-copy small.theme-white {
  color: var(--muted);
}

.sector-copy small.theme-sky,
.sector-cell-copy small.theme-sky {
  color: var(--blue);
}

.sector-copy small.theme-blue,
.sector-cell-copy small.theme-blue {
  color: var(--blue);
}

.sector-copy small.theme-amber,
.sector-cell-copy small.theme-amber {
  color: var(--amber);
}

.number {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sub-number {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-opinion-cell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 4px 9px;
  min-width: 0;
}

.score-stack {
  display: grid;
  min-width: 44px;
}

.ai-opinion-cell .number {
  color: var(--ink);
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
}

.ai-opinion-cell .sub-number {
  margin-top: 3px;
  font-size: 10px;
}

.opinion-text {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.opinion-text.good {
  color: var(--red);
}

.opinion-text.info {
  color: var(--amber);
}

.opinion-text.warn {
  color: var(--amber);
}

.opinion-text.bad {
  color: var(--blue);
}

.opinion-text.sideways {
  color: var(--green);
}

.weight-cell {
  display: grid;
  grid-template-columns: minmax(0, max-content) auto;
  align-items: center;
  gap: 3px 6px;
  min-width: 0;
  overflow: hidden;
}

.weight-percent {
  grid-column: 1 / -1;
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
  line-height: 1.1;
}

.weight-shares {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weight-cell .number {
  font-size: 14px;
  min-width: 42px;
}

.weight-cell.shares-mode .number {
  min-width: 76px;
  font-size: 13px;
  white-space: nowrap;
}

.weight-cell .sub-number {
  grid-column: 1 / -1;
  font-size: 10px;
}

.weight-trend {
  display: inline-block;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.weight-trend.up {
  color: var(--red);
}

.weight-trend.down {
  color: var(--blue);
}

.weight-trend.flat {
  color: var(--muted);
}

.news-cell {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.news-cell .sub-number {
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.25;
  white-space: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.news-cell .sub-number.up {
  color: var(--red);
}

.news-cell .sub-number.down {
  color: var(--blue);
}

.price-cell {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.price-cell.up .number,
.price-cell.up .sub-number {
  color: var(--red);
}

.price-cell.down .number,
.price-cell.down .sub-number {
  color: var(--blue);
}

.price-cell.flat .sub-number {
  color: var(--green);
}

.entry-timing-cell {
  display: grid;
  gap: 3px;
  justify-items: start;
  min-width: 0;
}

.entry-timing-cell.premium-lock-cell {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
}

.entry-timing-cell .badge {
  width: 100%;
  min-width: 0;
}

.entry-timing-cell .sub-number {
  font-size: 10px;
  white-space: nowrap;
}

.chart-cell {
  display: grid;
  grid-template-columns: minmax(74px, 1fr) minmax(50px, auto);
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.chart-metrics {
  display: grid;
  min-width: 0;
}

.chart-metrics b,
.chart-metrics small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-metrics b {
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.chart-metrics small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.rsi-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  min-height: 18px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  line-height: 1;
}

.rsi-chip.up {
  border-color: #efc3bd;
  background: var(--red-soft);
  color: var(--red);
}

.rsi-chip.down {
  border-color: #b8cee7;
  background: var(--blue-soft);
  color: var(--blue);
}

.rsi-chip.flat {
  color: var(--muted);
}

.rsi-chip.warn {
  border-color: #e6cb84;
  background: var(--amber-soft);
  color: var(--amber);
}

.rsi-chip.sideways {
  border-color: #a8d2c2;
  background: var(--green-soft);
  color: var(--green);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  max-width: 100%;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 11px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge.good {
  border-color: #efc3bd;
  background: var(--red-soft);
  color: var(--red);
}

.badge.buy-strong {
  border-color: #d88982;
  background: #f8d2cd;
  color: #9b211b;
}

.badge.buy {
  border-color: #efb9b1;
  background: #fde1dd;
  color: #b63b33;
}

.badge.observe-good {
  border-color: #f3ccc7;
  background: #fff0ee;
  color: #b45b53;
}

.badge.observe-neutral {
  border-color: #d2d8de;
  background: #f0f3f6;
  color: #5f6872;
}

.badge.observe-caution {
  border-color: #b8dff1;
  background: #eefaff;
  color: #347fa2;
}

.badge.sell-chase {
  border-color: #9ccfe9;
  background: #dff3fc;
  color: #1d6f9b;
}

.badge.sell-profit {
  border-color: #b8cee7;
  background: var(--blue-soft);
  color: var(--blue);
}

.badge.sell-risk {
  border-color: #8fb2d8;
  background: #d9e9fb;
  color: #164f89;
}

.badge.warn {
  border-color: #e6cb84;
  background: var(--amber-soft);
  color: var(--amber);
}

.badge.bad {
  border-color: #b8cee7;
  background: var(--blue-soft);
  color: var(--blue);
}

.badge.info {
  border-color: #e6cb84;
  background: var(--amber-soft);
  color: var(--amber);
}

.badge.sideways {
  border-color: #a8d2c2;
  background: var(--green-soft);
  color: var(--green);
}

.badge.purple {
  border-color: #bda7ea;
  background: #f0e8ff;
  color: #5b2ea6;
}

.badge.locked {
  border-color: #bda7ea;
  border-style: dashed;
  background: #f7f3ff;
  color: #5b2ea6;
}

.sparkline {
  width: 100%;
  max-width: 138px;
  height: 34px;
  display: block;
}

.detail-panel {
  position: sticky;
  top: 14px;
  min-height: 540px;
  overflow: hidden;
}

.ticker-detail-screen {
  display: grid;
  gap: 12px;
}

.detail-toolbar {
  display: flex;
  justify-content: flex-start;
}

.back-button {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.detail-panel-full {
  position: static;
  min-height: 0;
}

.detail-panel-full .large-chart {
  height: clamp(880px, 86vh, 980px);
}

.detail-panel-full .metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.detail-head {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.detail-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.detail-side {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.detail-title-row h2 {
  margin: 0;
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
}

.detail-company {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.detail-company-ko {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.score-ring {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--green) calc(var(--score, 0) * 1%), #e4e9ec 0);
  color: var(--ink);
  font-size: 17px;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}

.score-ring::before {
  content: "";
  position: absolute;
}

.decision-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
  align-items: stretch;
  gap: 8px;
  margin-top: 12px;
}

.decision-badges {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
  min-width: 0;
}

.detail-entry-card {
  display: grid;
  grid-template-columns: minmax(86px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.detail-entry-card b,
.detail-entry-card small,
.detail-entry-card p {
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-entry-card b {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
  white-space: nowrap;
}

.detail-entry-card small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.detail-entry-card p {
  margin: 0;
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.detail-entry-card.good {
  border-color: #efc3bd;
  background: var(--red-soft);
}

.detail-entry-card.buy-strong {
  border-color: #d88982;
  background: #f8d2cd;
}

.detail-entry-card.buy {
  border-color: #efb9b1;
  background: #fde1dd;
}

.detail-entry-card.observe-good {
  border-color: #f3ccc7;
  background: #fff0ee;
}

.detail-entry-card.observe-neutral {
  border-color: #d2d8de;
  background: #f0f3f6;
}

.detail-entry-card.observe-caution {
  border-color: #b8dff1;
  background: #eefaff;
}

.detail-entry-card.sell-chase {
  border-color: #9ccfe9;
  background: #dff3fc;
}

.detail-entry-card.sell-profit {
  border-color: #b8cee7;
  background: var(--blue-soft);
}

.detail-entry-card.sell-risk {
  border-color: #8fb2d8;
  background: #d9e9fb;
}

.detail-entry-card.warn {
  border-color: #e6cb84;
  background: var(--amber-soft);
}

.detail-entry-card.bad {
  border-color: #b8cee7;
  background: var(--blue-soft);
}

.detail-entry-card.sideways {
  border-color: #a8d2c2;
  background: var(--green-soft);
}

.detail-entry-card.purple {
  border-color: #bda7ea;
  background: #f7f1ff;
}

.detail-verdict {
  margin: 12px 0 0;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: #fbfcfc;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.detail-verdict span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
}

.large-chart {
  width: 100%;
  height: 96px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.large-chart.candle-chart {
  border-color: #162235;
  background: #08111f;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.chart-legend .legend-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.chart-legend .legend-heading {
  color: var(--ink);
  font-size: 10px;
  font-weight: 950;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.chart-legend i {
  display: block;
  width: 18px;
  height: 3px;
  border-radius: 999px;
  background: var(--legend-color);
}

.chart-legend .cross-legend {
  color: var(--green);
}

.chart-legend .cross-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
}

.detail-body {
  display: grid;
  gap: 12px;
  padding: 14px 16px 16px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.metric {
  min-height: 66px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.metric strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.detail-section h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 14px;
}

.ai-evidence-card {
  display: grid;
  gap: 15px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.ai-evidence-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.24fr);
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.ai-evidence-verdict span,
.ai-evidence-score span,
.ai-rule-heading span,
.ai-evidence-block-head span,
.ai-score-reason span,
.ai-rule-item small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.ai-evidence-verdict strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 950;
}

.ai-evidence-verdict p {
  max-width: 980px;
  margin: 7px 0 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.ai-evidence-score {
  min-width: 0;
  padding-left: 12px;
  border-left: 4px solid var(--line-strong);
}

.ai-evidence-score strong {
  display: block;
  color: var(--ink);
  font-size: 29px;
  font-weight: 950;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.ai-evidence-score small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.ai-evidence-score.good,
.ai-evidence-block.good,
.ai-rule-item.good {
  border-color: var(--red);
}

.ai-evidence-score.sideways,
.ai-evidence-block.sideways,
.ai-rule-item.sideways {
  border-color: var(--green);
}

.ai-evidence-score.warn,
.ai-evidence-block.warn,
.ai-rule-item.warn {
  border-color: var(--amber);
}

.ai-evidence-score.bad,
.ai-evidence-block.bad,
.ai-rule-item.bad,
.ai-evidence-block.theme-blue {
  border-color: var(--blue);
}

.ai-evidence-block.theme-red {
  border-color: var(--red);
}

.ai-evidence-block.theme-pink {
  border-color: var(--pink);
}

.ai-evidence-block.theme-sky {
  border-color: var(--sky);
}

.ai-evidence-block.theme-white {
  border-color: var(--line-strong);
}

.ai-evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}

.ai-evidence-block {
  min-width: 0;
  padding: 0 0 0 12px;
  border-left: 4px solid var(--line-strong);
}

.ai-news-evidence {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1.08fr);
  gap: 16px;
  padding: 0;
  border-left-width: 0;
}

.ai-news-score-pane {
  min-width: 0;
  padding-left: 12px;
  border-left: 4px solid var(--line-strong);
}

.ai-news-evidence.good .ai-news-score-pane {
  border-color: var(--red);
}

.ai-news-evidence.sideways .ai-news-score-pane {
  border-color: var(--green);
}

.ai-news-evidence.warn .ai-news-score-pane {
  border-color: var(--amber);
}

.ai-news-evidence.bad .ai-news-score-pane {
  border-color: var(--blue);
}

.ai-news-detail-pane {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.ai-news-kicker {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
}

.ai-news-detail-pane h4 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
  line-height: 1.35;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.ai-news-detail-pane h4 a {
  color: var(--blue);
  text-decoration: none;
}

.ai-news-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.ai-news-meta span {
  min-height: 20px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.ai-news-lines {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.ai-news-line {
  min-width: 0;
}

.ai-news-line b {
  display: block;
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
}

.ai-news-line p {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 780;
  line-height: 1.5;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.ai-news-article-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.ai-news-article-list > b {
  font-size: 11px;
  color: var(--muted);
}

.ai-news-article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
}

.ai-news-article a,
.ai-news-article span {
  display: block;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
  text-decoration: none;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.ai-news-article small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.ai-news-article strong {
  justify-self: end;
  color: var(--ink);
  font-size: 11px;
  white-space: nowrap;
}

.ai-news-article.good strong {
  color: var(--good);
}

.ai-news-article.bad strong {
  color: var(--bad);
}

.ai-news-article.sideways strong {
  color: var(--sideways);
}

.ai-news-article p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.42;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.ai-evidence-block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.ai-evidence-block-head strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.ai-evidence-block > b {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.ai-evidence-block p {
  margin: 6px 0 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.55;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.ai-analysis-lines {
  display: grid;
  gap: 6px;
  margin: 9px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: ai-analysis;
}

.ai-analysis-lines li {
  position: relative;
  min-width: 0;
  padding: 7px 8px 7px 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  color: var(--text);
  font-size: 12px;
  font-weight: 820;
  line-height: 1.55;
  word-break: keep-all;
  overflow-wrap: anywhere;
  counter-increment: ai-analysis;
}

.ai-analysis-lines li::before {
  content: counter(ai-analysis);
  position: absolute;
  top: 8px;
  left: 8px;
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
}

.ai-evidence-block ul {
  display: grid;
  gap: 3px;
  margin: 7px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  list-style: none;
}

.ai-evidence-block li {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ai-rule-group {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.ai-rule-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.ai-rule-heading b {
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
}

.ai-rule-heading span {
  text-align: right;
}

.ai-rule-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.ai-rule-item {
  min-width: 0;
  padding-left: 10px;
  border-left: 3px solid var(--line-strong);
}

.ai-rule-item span {
  display: block;
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
}

.ai-rule-item strong {
  display: inline-block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.ai-rule-item p {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.45;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.ai-rule-item small {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.ai-reason-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 12px;
}

.ai-score-reason {
  min-width: 0;
}

.ai-score-reason strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.ai-score-reason p {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.45;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.recommendation-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
}

.recommendation-card.good {
  border-color: var(--red);
}

.recommendation-card.warn {
  border-color: var(--amber);
}

.recommendation-card.bad {
  border-color: var(--blue);
}

.recommendation-card.sideways {
  border-color: var(--green);
}

.recommendation-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 0.22fr);
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.recommendation-head span,
.recommendation-window span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
}

.recommendation-head strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 950;
}

.recommendation-head p {
  margin: 7px 0 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 820;
  line-height: 1.55;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.recommendation-window {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.recommendation-window b {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
}

.recommendation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.recommendation-item {
  min-width: 0;
}

.recommendation-item b {
  display: block;
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
}

.recommendation-item p {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 780;
  line-height: 1.55;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.recommendation-conditions {
  display: grid;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.recommendation-conditions span {
  display: block;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  color: var(--text);
  font-size: 12px;
  font-weight: 780;
  line-height: 1.45;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.recommendation-conditions b {
  margin-right: 7px;
  color: var(--ink);
  font-weight: 950;
}

.analyst-target-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
}

.analyst-target-card.good {
  border-left-color: var(--red);
}

.analyst-target-card.bad {
  border-left-color: var(--blue);
}

.analyst-target-card.sideways {
  border-left-color: var(--green);
}

.analyst-target-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.24fr);
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.analyst-target-head span,
.analyst-target-consensus span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
}

.analyst-target-head strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 950;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.analyst-target-head p {
  margin: 7px 0 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 820;
  line-height: 1.55;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.analyst-target-consensus {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.analyst-target-consensus b {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.analyst-target-consensus small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.analyst-target-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.analyst-target-item {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.analyst-target-item.good {
  border-color: rgba(178, 70, 62, 0.32);
  background: rgba(253, 232, 229, 0.34);
}

.analyst-target-item.bad {
  border-color: rgba(40, 107, 176, 0.32);
  background: rgba(232, 241, 251, 0.52);
}

.analyst-target-item.sideways {
  border-color: rgba(20, 122, 99, 0.24);
  background: rgba(229, 244, 238, 0.36);
}

.analyst-target-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.analyst-target-main b {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.analyst-target-main strong {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
}

.analyst-target-item.good .analyst-target-main strong {
  color: var(--red);
}

.analyst-target-item.bad .analyst-target-main strong {
  color: var(--blue);
}

.analyst-target-item.sideways .analyst-target-main strong {
  color: var(--green);
}

.analyst-target-item p {
  margin: 5px 0 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 780;
  line-height: 1.45;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.analyst-target-item small,
.analyst-target-item a,
.analyst-target-item span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.35;
  text-decoration: none;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.analyst-target-empty {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
  line-height: 1.45;
}

.reason-list,
.condition-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reason-list li,
.condition-list li,
.news-box {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  color: var(--text);
  font-size: 12px;
}

.reason-list b {
  color: var(--ink);
}

.news-box a {
  color: var(--blue);
  font-weight: 850;
  text-decoration: none;
}

.empty-detail,
.empty-state,
.error-state {
  padding: 24px;
  color: var(--muted);
  font-weight: 800;
}

.error-state {
  color: var(--red);
}

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

  .detail-panel,
  .sector-panel {
    position: static;
  }

  .sector-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .decision-line,
  .detail-entry-card,
  .ai-evidence-top,
  .ai-evidence-grid,
  .ai-news-evidence,
  .ai-rule-list,
  .ai-reason-grid,
  .recommendation-head,
  .recommendation-grid,
  .analyst-target-head,
  .analyst-target-grid {
    grid-template-columns: 1fr;
  }

  .ai-rule-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .ai-rule-heading span {
    text-align: left;
  }
}

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

  .toolbar-controls {
    justify-content: space-between;
  }
}

@media (max-width: 780px) {
  .app-shell {
    width: min(100% - 22px, 1800px);
    padding-top: 10px;
  }

  .topbar,
  .toolbar-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions {
    align-items: stretch;
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
  }

  .sync-state {
    text-align: left;
  }

  .toolbar,
  .tabs,
  .filter-row {
    min-width: 0;
  }

  .search-box {
    min-width: 0;
    width: 100%;
  }

  select {
    width: 100%;
  }

  .stats-grid,
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-panel-full .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sector-list {
    grid-template-columns: 1fr;
  }
}

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

  .detail-panel-full .metric-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    min-height: 76px;
  }
}

body.entry-mode {
  min-height: 100svh;
  background:
    linear-gradient(120deg, rgba(124, 92, 255, 0.08), transparent 46%),
    linear-gradient(145deg, #171d2d 0%, #1a2234 44%, #121927 100%);
  color: #edf3ff;
}

body.app-mode {
  background:
    linear-gradient(180deg, rgba(246, 248, 250, 0.96), rgba(246, 248, 250, 1)),
    repeating-linear-gradient(90deg, rgba(32, 35, 38, 0.035) 0 1px, transparent 1px 112px);
  color: var(--text);
}

body.entry-mode .app-shell {
  display: grid;
  width: min(1240px, calc(100% - 28px));
  min-height: 100svh;
  padding: 20px 0 22px;
}

body.app-mode .app-shell {
  width: min(1800px, calc(100% - 28px));
}

.landing-screen,
.investor-screen {
  display: grid;
  min-height: calc(100svh - 42px);
}

.landing-screen {
  grid-template-rows: auto 1fr auto;
  gap: 16px;
}

.landing-nav,
.investor-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 48px;
}

.site-wordmark {
  display: inline-flex;
  align-items: center;
  color: #f8fbff;
  font-size: 27px;
  font-weight: 950;
  letter-spacing: 0;
  text-decoration: none;
}

.wordmark-button {
  border: 0;
  background: transparent;
  padding: 0;
}

.language-menu-wrap {
  position: relative;
}

.language-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid rgba(173, 188, 220, 0.28);
  border-radius: 8px;
  background: rgba(9, 13, 22, 0.72);
  color: #dce7ff;
  font-size: 13px;
  font-weight: 850;
}

.language-button:hover,
.language-button:focus-visible {
  border-color: rgba(176, 139, 255, 0.72);
  outline: none;
}

.language-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.language-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: grid;
  width: 154px;
  padding: 7px;
  border: 1px solid rgba(166, 184, 219, 0.28);
  border-radius: 8px;
  background: rgba(10, 16, 28, 0.96);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
}

.language-popover button {
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #dfe8fb;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}

.language-popover button.active {
  background: rgba(124, 92, 255, 0.22);
  color: #ffffff;
}

.language-popover button:disabled {
  color: rgba(174, 187, 211, 0.45);
  cursor: not-allowed;
}

.landing-main {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 42px;
  padding: 28px 0 20px;
}

.led-billboard {
  position: relative;
  display: block;
  width: min(980px, 100%);
  min-height: 318px;
  padding: 18px;
  border: 1px solid rgba(70, 238, 255, 0.34);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(22, 34, 54, 0.96), rgba(17, 18, 34, 0.96)),
    repeating-linear-gradient(90deg, rgba(71, 238, 255, 0.12) 0 1px, transparent 1px 28px);
  box-shadow:
    0 0 0 1px rgba(255, 73, 214, 0.22),
    0 0 32px rgba(66, 228, 255, 0.18),
    0 24px 70px rgba(0, 0, 0, 0.25),
    inset 0 0 28px rgba(255, 73, 214, 0.08);
}

.led-billboard::before {
  content: "";
  position: absolute;
  inset: -7px;
  z-index: -1;
  border-radius: 24px;
  background:
    linear-gradient(90deg, rgba(65, 244, 255, 0.85), rgba(255, 63, 214, 0.82), rgba(255, 216, 75, 0.74), rgba(65, 244, 255, 0.85));
  filter: blur(15px);
  opacity: 0.28;
}

.led-billboard::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -14px;
  height: 14px;
  border-radius: 0 0 18px 18px;
  background: linear-gradient(180deg, rgba(22, 27, 45, 0.98), rgba(7, 10, 18, 0.98));
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

.led-screen {
  position: relative;
  min-height: 282px;
  overflow: hidden;
  border: 1px solid rgba(120, 244, 255, 0.32);
  border-radius: 14px;
  background:
    radial-gradient(circle, rgba(62, 242, 255, 0.36) 0 1.3px, transparent 1.5px),
    radial-gradient(circle, rgba(255, 70, 215, 0.24) 0 1px, transparent 1.25px),
    linear-gradient(180deg, #081121 0%, #101625 52%, #080b14 100%);
  background-position: 0 0, 4px 4px, 0 0;
  background-size: 8px 8px, 8px 8px, auto;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    inset 0 0 48px rgba(65, 244, 255, 0.11),
    inset 0 0 82px rgba(255, 54, 214, 0.08);
}

.led-screen::before,
.led-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.led-screen::before {
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 8px);
  opacity: 0.72;
}

.led-screen::after {
  background:
    linear-gradient(90deg, rgba(255, 73, 214, 0.18), transparent 16%, transparent 84%, rgba(65, 244, 255, 0.16)),
    radial-gradient(ellipse at center, transparent 58%, rgba(0, 0, 0, 0.42) 100%);
}

.landing-card-stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  padding: 0;
  container-type: inline-size;
}

.ark-spotlight-card {
  position: absolute;
  top: 50%;
  left: 0;
  display: grid;
  grid-template-columns: 188px 170px;
  gap: 16px;
  width: max-content;
  min-height: 158px;
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(80, 244, 255, 0.38);
  border-radius: 8px;
  background:
    radial-gradient(circle, rgba(78, 245, 255, 0.7) 0 1.2px, transparent 1.45px),
    radial-gradient(circle, rgba(255, 68, 214, 0.36) 0 1px, transparent 1.3px),
    linear-gradient(135deg, rgba(5, 10, 22, 0.94), rgba(20, 10, 26, 0.92));
  background-position: 0 0, 4px 4px, 0 0;
  background-size: 8px 8px, 8px 8px, auto;
  box-shadow:
    0 0 18px rgba(65, 244, 255, 0.24),
    0 0 36px rgba(255, 64, 216, 0.16),
    0 18px 40px rgba(0, 0, 0, 0.34);
  animation: investorMarquee 36s linear infinite;
  transform: translate(24px, -50%);
  will-change: transform;
}

.ark-spotlight-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 8px);
  pointer-events: none;
}

@keyframes investorMarquee {
  from {
    transform: translate(calc(100cqw + 42px), -50%);
  }

  to {
    transform: translate(calc(-100% - 42px), -50%);
  }
}

.ark-spotlight-left {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  width: 188px;
  text-align: center;
}

.ark-logo-orb {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border: 1px solid rgba(80, 244, 255, 0.46);
  border-radius: 8px;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.88) 0 1.3px, transparent 1.5px),
    linear-gradient(135deg, rgba(220, 255, 255, 0.94), rgba(255, 229, 255, 0.88));
  background-size: 6px 6px, auto;
  box-shadow: 0 0 18px rgba(65, 244, 255, 0.2);
}

.ark-logo-orb.compact {
  width: 84px;
  height: 84px;
  border-radius: 14px;
  box-shadow: none;
}

.ark-logo-orb img {
  width: 78%;
  height: 78%;
  filter: contrast(1.18) saturate(1.24);
  image-rendering: pixelated;
  object-fit: contain;
}

.ark-spotlight-left strong {
  margin-top: 4px;
  color: #f5fbff;
  font-size: 17px;
  font-weight: 950;
  text-shadow: 0 0 8px rgba(65, 244, 255, 0.55);
}

.ark-spotlight-left span {
  color: #98f6ff;
  font-size: 12px;
  font-weight: 850;
}

.ark-spotlight-left small {
  color: rgba(255, 226, 92, 0.86);
  font-size: 10px;
  font-weight: 750;
}

.ark-spotlight-right {
  display: grid;
  align-content: center;
  gap: 10px;
  width: 170px;
}

.spotlight-kicker {
  color: #ff5fe5;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(255, 80, 226, 0.72);
}

.home-holding-icons,
.investor-card-icons {
  display: grid;
  gap: 10px;
}

.home-holding-icons {
  grid-template-columns: repeat(3, 50px);
  width: 170px;
}

.landing-stock-icon {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 1px solid rgba(94, 244, 255, 0.3);
  border-radius: 8px;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.82) 0 1px, transparent 1.25px),
    rgba(255, 255, 255, 0.08);
  background-size: 6px 6px, auto;
  box-shadow: inset 0 0 16px rgba(65, 244, 255, 0.08);
}

.landing-stock-icon .logo-shell {
  width: 35px;
  height: 35px;
  border-color: rgba(255, 255, 255, 0.62);
  border-radius: 6px;
  box-shadow: none;
  image-rendering: pixelated;
}

.landing-stock-icon .company-logo {
  image-rendering: pixelated;
  filter: contrast(1.18) saturate(1.2);
}

.entry-button {
  display: inline-grid;
  min-width: min(420px, 92vw);
  min-height: 62px;
  margin-top: 8px;
  place-items: center;
  border: 2px solid #9e6dff;
  border-radius: 10px;
  background: rgba(124, 92, 255, 0.08);
  color: #ffffff;
  font-size: 20px;
  font-weight: 950;
  box-shadow: 0 18px 42px rgba(80, 48, 172, 0.22);
}

.entry-button:hover,
.entry-button:focus-visible {
  background: rgba(124, 92, 255, 0.18);
  border-color: #c4a5ff;
  outline: none;
}

.investment-disclaimer {
  max-width: 1120px;
  margin: 0 auto;
  color: rgba(196, 206, 226, 0.8);
  font-size: 11px;
  line-height: 1.65;
  text-align: center;
}

.investor-screen {
  grid-template-rows: auto 1fr;
  gap: 28px;
}

.investor-user-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  max-width: min(360px, 52vw);
  overflow: hidden;
  padding: 0 12px;
  border: 1px solid rgba(173, 188, 220, 0.24);
  border-radius: 999px;
  background: rgba(9, 13, 22, 0.55);
  color: #dce7ff;
  font-size: 12px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.investor-main {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 28px;
  padding: 36px 0 72px;
}

.investor-heading {
  display: grid;
  gap: 8px;
  max-width: 740px;
  text-align: center;
}

.investor-heading span {
  color: #a98dff;
  font-size: 13px;
  font-weight: 950;
}

.investor-heading h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.1;
}

.investor-heading p {
  margin: 0;
  color: rgba(217, 226, 246, 0.72);
  font-size: 15px;
}

.investor-directory-card {
  display: grid;
  width: min(900px, 100%);
  gap: 0;
  padding: 24px;
  border: 1px solid rgba(171, 186, 219, 0.24);
  border-radius: 18px;
  background: rgba(15, 22, 36, 0.88);
  color: #eaf1ff;
  text-align: left;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.32);
  transition: width 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.investor-directory-card:hover,
.investor-directory-card:focus-visible {
  width: min(1040px, 100%);
  border-color: rgba(177, 139, 255, 0.72);
  outline: none;
  transform: translateY(-2px);
}

.investor-card-main {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.investor-card-main h3 {
  margin: 4px 0 4px;
  color: #ffffff;
  font-size: 28px;
  line-height: 1.1;
}

.investor-card-main p {
  margin: 0;
  max-width: 600px;
  color: rgba(220, 230, 250, 0.74);
  font-size: 13px;
  line-height: 1.55;
}

.etf-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.etf-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  border: 1px solid rgba(156, 181, 232, 0.22);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.055);
  color: #d9e6ff;
  font-size: 11px;
  font-weight: 900;
}

.investor-card-icons {
  grid-template-columns: repeat(3, 48px);
}

.investor-card-icons .landing-stock-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

.investor-card-icons .logo-shell {
  width: 34px;
  height: 34px;
  border-radius: 7px;
}

.investor-card-expansion {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 220ms ease, opacity 160ms ease, padding-top 180ms ease;
}

.investor-directory-card:hover .investor-card-expansion,
.investor-directory-card:focus-visible .investor-card-expansion {
  max-height: 420px;
  padding-top: 22px;
  opacity: 1;
}

.investor-card-expansion b {
  color: #ffffff;
  font-size: 13px;
  font-weight: 950;
}

.investor-card-expansion p {
  margin: 8px 0 0;
  color: rgba(219, 229, 248, 0.7);
  font-size: 12px;
  line-height: 1.6;
}

.investor-stock-notes {
  display: grid;
  gap: 7px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.investor-stock-notes li {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.investor-stock-notes li b {
  color: #b8a0ff;
  font-size: 11px;
}

.investor-stock-notes li span {
  overflow: hidden;
  color: rgba(219, 229, 248, 0.7);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 5, 10, 0.68);
  backdrop-filter: blur(8px);
}

.login-backdrop-panel {
  position: relative;
  display: grid;
  width: min(520px, 100%);
  gap: 22px;
  padding: 34px 34px 30px;
  border: 1px solid rgba(157, 176, 216, 0.28);
  border-radius: 16px;
  background: #0d1522;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.5);
}

.login-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #9eb0ce;
  font-size: 28px;
  line-height: 1;
}

.login-close:hover,
.login-close:focus-visible {
  border-color: rgba(166, 184, 219, 0.32);
  color: #ffffff;
  outline: none;
}

.login-brand {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 8px 20px 0;
  text-align: center;
}

.login-brand strong {
  color: #ffffff;
  font-size: 31px;
  font-weight: 950;
}

.login-brand span {
  color: #ff4858;
}

.login-brand h2 {
  margin: 8px 0 0;
  color: #ffffff;
  font-size: 24px;
  line-height: 1.2;
}

.login-brand p {
  margin: 0;
  color: #9fb1d2;
  font-size: 14px;
}

.login-actions {
  display: grid;
  gap: 11px;
}

.social-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 950;
}

.social-login.google {
  background: #ffffff;
  color: #101725;
}

.social-login.kakao {
  background: #fee500;
  color: #17120b;
}

.social-login:hover,
.social-login:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.login-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #9fb1d2;
  font-size: 13px;
}

.login-footer a {
  color: #76aaff;
  font-weight: 900;
  text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  .ark-spotlight-card {
    animation: none;
  }

  .investor-directory-card,
  .investor-card-expansion,
  .social-login {
    transition: none;
  }
}

@media (max-width: 860px) {
  .led-billboard {
    width: min(720px, 100%);
    min-height: 324px;
    padding: 18px;
  }

  .led-screen {
    min-height: 286px;
  }

  .ark-spotlight-card {
    grid-template-columns: 174px 170px;
    width: max-content;
    min-height: 154px;
    gap: 14px;
  }

  .ark-spotlight-left {
    width: 174px;
  }

  .home-holding-icons {
    grid-template-columns: repeat(3, 50px);
    justify-content: center;
  }

  .landing-stock-icon {
    width: 50px;
  }

  .investor-card-main,
  .investor-card-expansion {
    grid-template-columns: 1fr;
  }

  .investor-card-icons {
    grid-template-columns: repeat(6, 48px);
    justify-content: start;
  }

  .investor-directory-card:hover,
  .investor-directory-card:focus-visible {
    width: min(900px, 100%);
  }
}

@media (max-width: 620px) {
  body.entry-mode .app-shell {
    width: min(100% - 20px, 1240px);
    padding-top: 12px;
  }

  .landing-main {
    gap: 34px;
    padding-top: 18px;
  }

  .landing-nav,
  .investor-nav {
    align-items: flex-start;
  }

  .site-wordmark {
    font-size: 23px;
  }

  .language-button {
    min-height: 36px;
    padding: 0 10px;
  }

  .led-billboard {
    min-height: 302px;
    padding: 13px;
    border-radius: 16px;
  }

  .led-billboard::after {
    bottom: -16px;
    height: 16px;
  }

  .led-screen {
    min-height: 264px;
    border-radius: 11px;
  }

  .ark-spotlight-card {
    grid-template-columns: 1fr;
    width: min(342px, calc(100vw - 52px));
    min-height: 232px;
    padding: 15px;
  }

  .ark-spotlight-left,
  .ark-spotlight-right,
  .home-holding-icons {
    width: auto;
  }

  .ark-logo-orb {
    width: 74px;
    height: 74px;
  }

  .home-holding-icons {
    grid-template-columns: repeat(3, 46px);
  }

  .home-holding-icons .landing-stock-icon {
    width: 46px;
    height: 46px;
  }

  .home-holding-icons .logo-shell {
    width: 32px;
    height: 32px;
  }

  .entry-button {
    min-width: 100%;
  }

  .investment-disclaimer {
    font-size: 10px;
    text-align: left;
  }

  .investor-main {
    padding-top: 22px;
  }

  .investor-heading h2 {
    font-size: 30px;
  }

  .investor-directory-card {
    padding: 18px;
  }

  .investor-card-icons {
    grid-template-columns: repeat(3, 48px);
  }

  .login-backdrop-panel {
    padding: 30px 20px 24px;
  }

  .login-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

body.entry-mode {
  background:
    linear-gradient(105deg, rgba(255, 246, 214, 0.74), rgba(246, 183, 88, 0.28) 38%, rgba(169, 196, 203, 0.26) 100%),
    radial-gradient(ellipse at 16% 10%, rgba(255, 255, 245, 0.72), transparent 34%),
    linear-gradient(180deg, #fff2cc 0%, #f4c780 54%, #d99a54 100%);
  color: #3d2919;
}

body.entry-mode::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.72) 0 12%, transparent 12% 100%),
    repeating-linear-gradient(90deg, rgba(96, 61, 33, 0.035) 0 1px, transparent 1px 112px);
  pointer-events: none;
}

body.entry-mode .app-shell {
  width: min(1180px, calc(100% - 30px));
}

body.entry-mode .landing-screen {
  gap: 10px;
}

body.entry-mode .site-wordmark {
  color: #4b2b16;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 34px;
  font-weight: 500;
  letter-spacing: 0.015em;
  text-shadow: 0 1px 0 rgba(255, 247, 227, 0.82);
}

body.entry-mode .language-button {
  border-color: rgba(97, 60, 34, 0.24);
  background: rgba(255, 246, 226, 0.64);
  color: #56351e;
  box-shadow: 0 10px 24px rgba(108, 67, 34, 0.12);
}

body.entry-mode .language-popover {
  border-color: rgba(97, 60, 34, 0.2);
  background: rgba(255, 248, 232, 0.96);
}

body.entry-mode .language-popover button {
  color: #56351e;
}

body.entry-mode .language-popover button.active {
  background: rgba(140, 76, 31, 0.13);
  color: #4b2b16;
}

.mafia-landing {
  width: 100%;
  grid-template-columns: minmax(300px, 382px) minmax(680px, 1fr);
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 5vw, 68px);
  padding: 10px 0 18px;
}

.krillione-intro {
  position: relative;
  display: grid;
  align-content: end;
  min-height: 484px;
  padding: 24px 14px 0;
}

.krillione-kicker {
  position: relative;
  z-index: 2;
  width: max-content;
  margin: 0 0 -8px 16px;
  padding: 6px 14px;
  border: 1px solid rgba(93, 54, 26, 0.24);
  border-radius: 999px;
  background: rgba(255, 247, 226, 0.72);
  color: #6f3d1e;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(99, 56, 25, 0.1);
}

.krillione-mascot {
  position: relative;
  z-index: 1;
  width: min(100%, 370px);
  height: 438px;
  border: 10px solid #5d341e;
  border-radius: 18px;
  background: #301c13;
  box-shadow:
    0 28px 54px rgba(94, 54, 28, 0.24),
    inset 0 0 0 1px rgba(255, 244, 218, 0.45);
  object-fit: cover;
  object-position: 50% 10%;
  transform: scale(1.08);
  transform-origin: center top;
}

.krillione-intro::before {
  content: "";
  position: absolute;
  left: 0;
  right: 10%;
  bottom: 2px;
  height: 126px;
  z-index: 0;
  border-radius: 999px 999px 28px 28px;
  background: linear-gradient(180deg, rgba(115, 74, 45, 0.24), rgba(66, 39, 24, 0.1));
  filter: blur(2px);
}

.floral-garnish {
  position: absolute;
  right: 4px;
  bottom: 18px;
  z-index: 3;
  width: 116px;
  height: 96px;
  pointer-events: none;
}

.floral-garnish span {
  position: absolute;
  display: block;
}

.floral-garnish .rose {
  right: 30px;
  bottom: 24px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 48% 48%, #7e1712 0 18%, transparent 19%),
    conic-gradient(from 20deg, #b4211d, #6f120f, #d43a2b, #7e1712, #b4211d);
  box-shadow: 0 5px 14px rgba(92, 23, 14, 0.24);
}

.floral-garnish .white-flower {
  right: 66px;
  bottom: 34px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background:
    radial-gradient(circle, #e7b963 0 10%, transparent 12%),
    radial-gradient(circle at 50% 14%, #fffaf0 0 18%, transparent 19%),
    radial-gradient(circle at 86% 50%, #fffaf0 0 18%, transparent 19%),
    radial-gradient(circle at 50% 86%, #fffaf0 0 18%, transparent 19%),
    radial-gradient(circle at 14% 50%, #fffaf0 0 18%, transparent 19%);
}

.floral-garnish .green-leaf {
  right: 8px;
  bottom: 10px;
  width: 88px;
  height: 44px;
  border-radius: 100% 0 100% 0;
  background: linear-gradient(135deg, rgba(56, 100, 61, 0.86), rgba(120, 154, 95, 0.6));
  transform: rotate(-18deg);
}

.tv-column {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 36px;
  width: 100%;
  min-width: 0;
}

.old-tv {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 14px;
  width: min(700px, 100%);
  min-height: 304px;
  padding: 18px;
  border: 1px solid rgba(74, 43, 24, 0.78);
  border-radius: 20px;
  background:
    linear-gradient(135deg, #8e5529 0%, #5c341d 46%, #2c1c15 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 237, 202, 0.22),
    inset 0 -18px 38px rgba(42, 22, 12, 0.28),
    0 30px 70px rgba(111, 66, 31, 0.24);
}

.old-tv::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 16px;
  border: 1px solid rgba(255, 230, 184, 0.12);
  pointer-events: none;
}

.old-tv::after {
  content: "";
  position: absolute;
  left: 17%;
  right: 22%;
  bottom: -16px;
  height: 16px;
  border-radius: 0 0 30px 30px;
  background: linear-gradient(180deg, #4c2b19, #24150d);
  box-shadow: 0 14px 28px rgba(74, 43, 24, 0.18);
}

.old-tv-screen {
  position: relative;
  min-height: 264px;
  overflow: hidden;
  border: 8px solid #1f1612;
  border-radius: 24px / 32px;
  background:
    radial-gradient(ellipse at center, rgba(132, 171, 183, 0.28), rgba(64, 87, 91, 0.16) 52%, rgba(20, 28, 33, 0.48) 100%),
    linear-gradient(180deg, #c8d7d6 0%, #9cafad 50%, #5d7779 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    inset 0 0 42px rgba(28, 39, 43, 0.42),
    inset 0 0 90px rgba(0, 0, 0, 0.28);
}

.old-tv-screen::before,
.old-tv-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.old-tv-screen::before {
  background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.09) 0 1px, rgba(38, 50, 54, 0.08) 1px 3px),
    linear-gradient(90deg, rgba(255, 247, 212, 0.2), transparent 22%, transparent 78%, rgba(27, 39, 45, 0.18));
  mix-blend-mode: soft-light;
}

.old-tv-screen::after {
  background: radial-gradient(ellipse at center, transparent 58%, rgba(22, 20, 17, 0.38) 100%);
}

.old-tv-controls {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 15px;
  border: 1px solid rgba(255, 230, 184, 0.14);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(74, 43, 25, 0.84), rgba(33, 22, 17, 0.92)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 12px);
}

.old-tv-power {
  width: 10px;
  height: 10px;
  border: 2px solid #211510;
  border-radius: 999px;
  background: #a8281b;
  box-shadow: 0 0 12px rgba(176, 44, 29, 0.52);
}

.old-tv-dial {
  width: 50px;
  height: 50px;
  border: 5px solid #211510;
  border-radius: 999px;
  background:
    conic-gradient(from 30deg, #d8bd86, #7a5131, #f0d597, #5e371f, #d8bd86);
  box-shadow:
    inset 0 0 0 7px rgba(0, 0, 0, 0.22),
    0 8px 16px rgba(47, 24, 13, 0.2);
}

.old-tv-dial.small {
  width: 38px;
  height: 38px;
}

.old-tv-speaker {
  width: 56px;
  height: 78px;
  border-radius: 10px;
  background: repeating-linear-gradient(180deg, rgba(244, 220, 177, 0.42) 0 3px, transparent 3px 10px);
}

body.entry-mode .landing-card-stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  padding: 0;
  container-type: inline-size;
}

body.entry-mode .ark-spotlight-card {
  grid-template-columns: 188px 170px;
  gap: 16px;
  width: max-content;
  min-height: 158px;
  padding: 16px;
  border: 2px solid #4b2a17;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(156, 85, 36, 0.94), rgba(91, 53, 30, 0.94)),
    linear-gradient(180deg, rgba(255, 239, 200, 0.2), rgba(34, 54, 61, 0.14));
  box-shadow:
    0 16px 36px rgba(45, 27, 16, 0.28),
    inset 0 0 0 1px rgba(255, 239, 200, 0.18);
  animation: investorMarquee 54s linear infinite;
  transform: translate(24px, -50%);
}

body.entry-mode .ark-spotlight-card::before {
  display: none;
}

body.entry-mode .ark-logo-orb,
body.entry-mode .landing-stock-icon {
  border-radius: 10px;
  background: rgba(255, 249, 236, 0.9);
  box-shadow: inset 0 0 0 1px rgba(105, 63, 33, 0.12);
}

body.entry-mode .ark-logo-orb img,
body.entry-mode .landing-stock-icon .company-logo {
  image-rendering: auto;
  filter: none;
}

body.entry-mode .ark-spotlight-left strong {
  color: #fff9ec;
  text-shadow: 0 1px 0 rgba(75, 42, 23, 0.7);
}

body.entry-mode .ark-spotlight-left span {
  color: #ffe7b4;
}

body.entry-mode .ark-spotlight-left small {
  color: rgba(229, 245, 238, 0.86);
}

body.entry-mode .spotlight-kicker {
  color: #f9d58b;
  text-shadow: none;
}

.tv-cat {
  position: absolute;
  right: -10px;
  bottom: 74px;
  width: 116px;
  height: 92px;
  fill: rgba(255, 249, 234, 0.72);
  stroke: #b8752f;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 5;
  filter: drop-shadow(0 12px 14px rgba(91, 52, 24, 0.2));
}

body.entry-mode .entry-button {
  min-width: min(360px, 92vw);
  border-color: #8a4b22;
  background: rgba(255, 239, 205, 0.48);
  color: #512f19;
  box-shadow: 0 16px 34px rgba(117, 70, 31, 0.18);
}

body.entry-mode .entry-button:hover,
body.entry-mode .entry-button:focus-visible {
  border-color: #5d341e;
  background: rgba(255, 229, 181, 0.68);
}

body.entry-mode .investment-disclaimer {
  color: rgba(74, 50, 31, 0.74);
}

@media (max-width: 980px) {
  .mafia-landing {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .krillione-intro {
    min-height: 390px;
    justify-items: center;
    padding-top: 4px;
  }

  .krillione-mascot {
    width: min(100%, 520px);
    height: 350px;
  }

  .old-tv {
    width: min(720px, 100%);
  }
}

@media (max-width: 720px) {
  .old-tv {
    grid-template-columns: 1fr;
    min-height: 300px;
    padding: 14px;
  }

  .old-tv-controls {
    display: none;
  }

  .old-tv-screen {
    min-height: 268px;
  }

  .tv-cat {
    right: 4px;
    bottom: 86px;
    width: 88px;
  }

  body.entry-mode .ark-spotlight-card {
    grid-template-columns: 1fr;
    width: min(342px, calc(100vw - 64px));
    min-height: 232px;
  }

  body.entry-mode .ark-spotlight-left,
  body.entry-mode .ark-spotlight-right,
  body.entry-mode .home-holding-icons {
    width: auto;
  }
}
