:root {
  --ink: #17211e;
  --ink-2: #3c4b46;
  --paper: #f5f7f6;
  --white: #fff;
  --line: #dbe2df;
  --muted: #65736d;
  --accent: #ffcf75;
  --accent-dark: #087e6b;
  --coral: #cb604a;
  --sand: #f8eee2;
  --shadow: 0 20px 60px rgba(17, 37, 31, 0.14);
}

body {
  background: var(--paper);
  color: var(--ink);
  overflow-x: clip;
}

.site-header {
  background: #fff;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: 68px;
  max-width: 1480px;
  padding: 0 32px;
}

.brand {
  gap: 11px;
}

.brand-emblem {
  width: 34px;
  height: 34px;
  background: var(--ink);
  transform: none;
  border-radius: 4px;
}

.brand-emblem span {
  background: var(--accent);
}

.brand-copy strong {
  font-family: "Black Han Sans", "Noto Sans KR", sans-serif;
  font-size: 21px;
  font-weight: 400;
  line-height: 1;
}

.brand-copy small {
  color: var(--coral);
  font-size: 9px;
  letter-spacing: 0;
  line-height: 1;
}

.auth-label {
  color: var(--muted);
}

.icon-button,
.icon-text {
  border-color: var(--line);
  color: var(--ink);
  background: var(--paper);
  border-radius: 5px;
}

.icon-button:hover,
.icon-text:hover {
  background: #e8efeb;
}

.section-nav {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.section-nav-inner {
  max-width: 1480px;
  margin: auto;
  padding: 0 32px;
  display: flex;
  gap: 26px;
}

.section-nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.section-nav a svg {
  width: 15px;
  height: 15px;
}

.section-nav a[aria-current="page"] {
  border-bottom-color: var(--accent-dark);
  color: var(--ink);
}

.section-nav a:hover,
.section-nav a:focus-visible {
  color: var(--accent-dark);
}

.shell {
  max-width: 1480px;
  padding: 0 32px 80px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
}

.site-footer-inner {
  max-width: 1480px;
  margin: auto;
  padding: 28px 32px 34px;
  display: flex;
  align-items: baseline;
  gap: 30px;
}

.site-footer strong {
  flex: none;
  font-size: 13px;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.site-footer a {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.investments-view,
.investments-route .overview,
.investments-route .workspace {
  display: none;
}

.investments-route .investments-view {
  display: block;
}

.stock-view,
.stock-route .overview,
.stock-route .schedule-strip,
.stock-route .workspace,
.stock-route .investments-view {
  display: none;
}

.stock-route .stock-view {
  display: block;
}

.investments-view {
  padding-top: 28px;
}

.investments-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.investments-heading h1 {
  margin: 0;
  font-size: 27px;
  line-height: 1.2;
}

.investments-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.investments-back svg {
  width: 15px;
  height: 15px;
}

.investment-period-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 13px;
}

.investment-period-bar > div {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.investment-period-bar > div span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.investment-period-bar > div strong {
  font-size: 13px;
  font-weight: 700;
}

.investment-period-select {
  flex: none;
}

.investment-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.investment-metrics > div {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 100px;
  padding: 15px 20px;
  border-right: 1px solid var(--line);
}

.investment-metrics > div:first-child {
  padding-left: 0;
}

.investment-metrics > div:last-child {
  border-right: 0;
}

.investment-metrics span,
.investment-cell span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.investment-metrics strong {
  font-size: 23px;
  line-height: 1.2;
}

.investment-metrics .positive,
.investment-cell .positive {
  color: var(--accent-dark);
}

.investment-metrics .negative,
.investment-cell .negative {
  color: var(--coral);
}

.investments-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 12px;
}

.investment-filters {
  display: inline-flex;
  padding: 3px;
  background: #e9eeeb;
  border-radius: 5px;
  flex: none;
}

.investment-filters button {
  border: 0;
  border-radius: 4px;
  background: transparent;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.investment-filters button[aria-pressed="true"] {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(17, 37, 31, 0.08);
}

.investment-search {
  width: min(100%, 350px);
  margin-left: auto;
}

.investment-list {
  border-top: 1px solid var(--line);
}

.investment-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) repeat(3, minmax(120px, 0.8fr)) 64px;
  align-items: center;
  gap: 16px;
  min-height: 108px;
  padding: 17px 10px;
  border-bottom: 1px solid var(--line);
}

.investment-identity {
  min-width: 0;
}

.investment-identity > button,
.investment-identity > strong {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  text-align: left;
  overflow-wrap: anywhere;
}

.investment-identity > button:hover {
  color: var(--accent-dark);
}

.investment-identity svg {
  width: 15px;
  height: 15px;
  flex: none;
}

.investment-identity > span,
.investment-identity p,
.investment-cell small {
  display: block;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.investment-identity p {
  color: var(--ink-2);
  white-space: pre-wrap;
}

.investment-cell {
  min-width: 0;
}

.investment-cell strong {
  display: block;
  margin-top: 3px;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.investment-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 34px;
  border: 1px solid #b7d5c6;
  border-radius: 4px;
  background: #eaf2ed;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 700;
}

.investment-edit svg {
  width: 14px;
  height: 14px;
}

.investment-empty {
  display: grid;
  justify-items: start;
  gap: 12px;
  padding: 48px 12px;
  border-bottom: 1px solid var(--line);
}

.investment-empty > svg {
  width: 25px;
  height: 25px;
  color: var(--accent-dark);
}

.investment-empty strong {
  font-size: 17px;
}

.investment-empty a,
.metric-link:hover {
  color: var(--accent-dark);
}

.investment-empty a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
}

.investment-empty a svg {
  width: 15px;
  height: 15px;
}

.metric-link:hover {
  background: #f2f8f4;
}

.overview {
  padding: 22px 0 24px;
  border-bottom: 0;
}

.overview-heading {
  margin-bottom: 14px;
  align-items: center;
}

.eyebrow {
  color: var(--coral);
  font-size: 10px;
  letter-spacing: 0;
  margin-bottom: 2px;
}

.overview h1 {
  font-size: 23px;
  line-height: 1.2;
  letter-spacing: 0;
}

.overview-meta {
  font-size: 11px;
  padding: 0;
}

.live-dot {
  background: var(--accent-dark);
}

.overview-grid {
  grid-template-columns: minmax(270px, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 8px;
  border: 0;
  background: transparent;
}

.focus-panel {
  min-height: 116px;
  padding: 16px 19px;
  background: #143c36;
  border-radius: 6px;
  display: grid;
  align-content: center;
  grid-template-columns: 1fr auto;
  column-gap: 12px;
}

.focus-panel::after {
  display: none;
}

.focus-panel .label {
  grid-column: 1 / -1;
  color: #b8e2d3;
  margin: 0 0 3px;
  font-size: 11px;
}

.focus-panel .name {
  grid-column: 1;
  font-size: 21px;
  line-height: 1.25;
}

.focus-panel .sub {
  grid-column: 1;
  font-size: 11px;
  margin-top: 3px;
  color: #c9dfd5;
}

.focus-panel button {
  grid-column: 2;
  grid-row: 2 / 4;
  align-self: center;
  margin: 0;
  padding: 9px 12px;
  background: var(--accent);
  border-radius: 4px;
  white-space: nowrap;
  font-size: 11px;
}

.metric {
  min-height: 116px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px 16px;
  background: #fff;
  justify-content: center;
}

.metric > span {
  font-size: 11px;
  color: var(--ink-2);
}

.metric strong {
  font-size: clamp(20px, 2vw, 29px);
  margin: 5px 0 1px;
  font-family: "DM Sans", "Noto Sans KR", sans-serif;
  letter-spacing: 0;
}

.metric small {
  font-size: 10px;
}

.workspace {
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.section-heading {
  margin-bottom: 12px;
  align-items: center;
}

.section-heading h2 {
  font-size: 25px;
  line-height: 1.2;
}

.result-count {
  font-size: 11px;
  font-weight: 700;
  background: #e4ece8;
  padding: 4px 8px;
  border-radius: 3px;
}

.tab-list {
  gap: 0;
  background: #e9eeeb;
  border: 0;
  border-radius: 5px;
  padding: 4px;
}

.tab {
  flex: 1;
  border: 0;
  border-radius: 4px;
  padding: 10px 12px;
  color: #5b6962;
  font-size: 12px;
}

.tab.active {
  background: #fff;
  border: 0;
  box-shadow: 0 1px 5px rgba(27, 54, 43, 0.11);
}

.tab span,
.tab.active span {
  font-size: 11px;
  color: var(--muted);
  background: var(--paper);
  padding: 1px 6px;
  border-radius: 8px;
}

.toolbar {
  padding: 13px 0;
}

.search,
.select-wrap select {
  border-radius: 5px;
}

.search {
  height: 39px;
  width: min(100%, 400px);
}

.stock-list {
  background: transparent;
  border-top: 2px solid var(--ink);
  counter-reset: stock;
}

.listed-year,
.listed-month {
  min-width: 0;
}

.year-summary,
.month-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  border-bottom: 1px solid var(--line);
}

.year-summary::-webkit-details-marker,
.month-summary::-webkit-details-marker {
  display: none;
}

.year-summary {
  padding: 18px 14px;
  background: #e7efeb;
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
}

.month-summary {
  padding: 12px 16px 12px 28px;
  background: #f9fbfa;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 700;
}

.year-summary:hover,
.month-summary:hover {
  background: #e9f3ed;
}

.year-summary:focus-visible,
.month-summary:focus-visible {
  outline: 2px solid var(--accent-dark);
  outline-offset: -2px;
}

.group-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.year-summary svg,
.month-summary svg {
  width: 16px;
  height: 16px;
  margin-left: auto;
  color: var(--muted);
  transition: transform 0.16s ease;
}

.listed-year[open] > .year-summary svg,
.listed-month[open] > .month-summary svg {
  transform: rotate(180deg);
}

.month-rows {
  counter-reset: stock;
}

.stock-entry {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
}

.stock-row {
  counter-increment: stock;
  grid-template-columns: 28px minmax(170px, 1.5fr) minmax(110px, 0.8fr) minmax(125px, 0.8fr) minmax(100px, 0.75fr) 18px;
  gap: 14px;
  padding: 16px 13px;
  background: transparent;
  border-bottom: 0;
  flex: 1;
  min-width: 0;
}

.stock-row::before {
  content: counter(stock, decimal-leading-zero);
  color: #89968f;
  font: 600 11px "DM Sans", sans-serif;
  align-self: start;
  padding-top: 5px;
}

.stock-row:hover,
.stock-row:focus-visible {
  background: #e6f2ec;
}

.stock-row .name {
  font-size: 15px;
  font-weight: 700;
}

.review-mark {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #fff0d7;
  color: #8a5900;
  font-size: 10px;
  font-weight: 700;
  vertical-align: middle;
}

.stock-row .market,
.stock-row .datum small {
  font-size: 10px;
}

.stock-row .datum strong {
  font-size: 13px;
}

.mobile-listed-price {
  display: none;
}

.stock-row svg {
  color: var(--accent-dark);
}

.quick-record {
  flex: none;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 66px;
  height: 31px;
  margin: 0 7px;
  padding: 0 8px;
  border: 1px solid #b7d7c9;
  border-radius: 4px;
  background: #eaf4ef;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 700;
}

.quick-record:hover,
.quick-record:focus-visible {
  background: #d5eade;
}

.quick-record svg {
  width: 13px;
  height: 13px;
}

.side {
  padding-top: 0;
  border-left: 1px solid var(--line);
  padding-left: 24px;
}

.side section {
  padding-bottom: 25px;
  margin-bottom: 25px;
}

.aside-title h2 {
  font-size: 14px;
}

.aside-icon,
.aside-icon.muted {
  border-radius: 4px;
  background: #e1ece7;
  color: var(--accent-dark);
}

.aside-icon.muted {
  background: #f8e9e2;
  color: var(--coral);
}

.aside-status {
  margin-top: 12px;
}

.aside-copy {
  margin: 5px 0 12px;
}

.side-footnote {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.detail-dialog,
.record-dialog {
  border-radius: 7px;
}

.primary-button,
.secondary-button,
.select-wrap select,
.form-grid input,
.memo-label textarea,
.close-button {
  border-radius: 4px;
}

.quality-alert {
  border-radius: 3px;
}

.form-section-title {
  margin: 25px 0 10px;
  font-size: 13px;
}

.form-section-title + .form-grid {
  margin-top: 0;
}

.sale-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
}

.sale-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-dark);
}

.sale-fields {
  margin-top: 0;
}

.record-calculation {
  padding: 11px 13px;
  background: #eaf2ed;
  border-left: 3px solid var(--accent-dark);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
  margin: 5px 0 18px;
}

@media (max-width: 1100px) {
  .overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .focus-panel {
    grid-column: 1 / -1;
    min-height: 96px;
  }

  .workspace {
    grid-template-columns: minmax(0, 1fr) 230px;
    gap: 20px;
  }

  .stock-row {
    grid-template-columns: 24px minmax(145px, 1.4fr) minmax(100px, 0.8fr) minmax(100px, 0.8fr) 16px;
  }
}

@media (max-width: 760px) {
  .header-inner {
    height: 60px;
    padding: 0 15px;
  }

  .brand-copy strong {
    font-size: 18px;
  }

  .brand-copy small {
    font-size: 8px;
  }

  .shell {
    padding: 0 15px 70px;
  }

  .overview {
    padding: 19px 0 17px;
  }

  .overview-heading {
    margin-bottom: 10px;
  }

  .overview h1 {
    font-size: 20px;
  }

  .overview-meta {
    max-width: 130px;
    font-size: 9px;
  }

  .focus-panel {
    min-height: 90px;
    padding: 13px 16px;
  }

  .focus-panel .name {
    font-size: 18px;
  }

  .metric {
    min-height: 85px;
    padding: 10px 12px;
    border: 1px solid var(--line);
  }

  .metric:nth-of-type(4) {
    grid-column: auto;
  }

  .metric strong {
    font-size: 19px;
    margin: 3px 0 0;
  }

  .metric small {
    display: none;
  }

  .workspace {
    display: block;
    padding-top: 16px;
  }

  .section-heading {
    margin-bottom: 12px;
  }

  .section-heading h2 {
    font-size: 21px;
  }

  .tab-list {
    gap: 0;
  }

  .tab {
    padding: 9px 7px;
    font-size: 11px;
  }

  .stock-row {
    grid-template-columns: 22px minmax(0, 1fr) minmax(95px, 0.7fr) 14px;
    gap: 7px;
    padding: 14px 6px;
  }

  .stock-row .datum:nth-of-type(3) {
    display: none;
  }

  .mobile-listed-price {
    display: block;
    margin-top: 5px;
    color: var(--accent-dark);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
  }

  .mobile-listed-price small {
    display: block;
    color: var(--muted);
    font-size: 10px;
    font-weight: 500;
  }

  .stock-row .name {
    font-size: 14px;
  }

  .stock-row .datum strong {
    font-size: 12px;
  }

  .quick-record {
    min-width: 58px;
    padding: 0 6px;
    margin: 0 2px;
  }

  .side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 20px 0 0;
    margin-top: 25px;
  }

  .side section {
    padding: 0;
    margin: 0;
    border: 0;
  }
}

@media (max-width: 500px) {
  .brand-emblem {
    width: 30px;
    height: 30px;
  }

  .brand-copy strong {
    font-size: 16px;
  }

  .overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .metric {
    padding: 9px 7px;
  }

  .metric > span {
    font-size: 10px;
  }

  .metric strong {
    font-size: 16px;
  }

  .tab {
    font-size: 10px;
    padding: 9px 3px;
  }

  .tab span,
  .tab.active span {
    margin-left: 1px;
    padding: 1px 4px;
  }

  .quick-record {
    min-width: 30px;
    width: 30px;
    height: 30px;
  }

  .quick-record span {
    display: none;
  }

  .side {
    display: block;
  }

  .side section {
    padding-bottom: 19px;
    margin-bottom: 19px;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 479px) {
  .google-slot {
    flex: 0 0 32px;
    width: 32px;
  }

  .google-slot > div {
    width: 32px !important;
  }
}

@media (max-width: 1100px) {
  .investments-toolbar {
    flex-wrap: wrap;
  }

  .investment-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 11px;
    padding-right: 88px;
  }

  .investment-identity {
    grid-column: 1 / -1;
  }

  .investment-edit {
    position: absolute;
    top: 18px;
    right: 10px;
    padding: 0 9px;
  }
}

@media (max-width: 760px) {
  .section-nav-inner {
    padding: 0 15px;
    gap: 22px;
  }

  .investments-view {
    padding-top: 22px;
  }

  .investments-heading h1 {
    font-size: 22px;
  }

  .investment-period-bar > div {
    display: grid;
    gap: 2px;
  }

  .investment-period-bar > div strong {
    font-size: 11px;
  }

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

  .investment-metrics > div {
    min-height: 78px;
    padding: 12px 10px;
  }

  .investment-metrics > div:nth-child(2) {
    border-right: 0;
  }

  .investment-metrics > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .investment-metrics > div:nth-child(3) {
    padding-left: 0;
  }

  .investment-metrics strong {
    font-size: 19px;
  }

  .investments-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 135px;
    gap: 9px;
    margin-top: 18px;
  }

  .investment-filters {
    grid-column: 1 / -1;
    display: flex;
  }

  .investment-filters button {
    flex: 1;
  }

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

  .investment-sort select {
    width: 135px;
  }

  .investment-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px 8px;
    padding: 17px 8px;
  }

  .investment-identity {
    padding-right: 65px;
  }

  .investment-cell:nth-child(4) {
    grid-column: 1 / -1;
  }

  .investment-edit {
    top: 16px;
    right: 8px;
  }
}

/* Ledger visual system */
:root {
  --ink: #182222;
  --ink-2: #384846;
  --paper: #f4f6f4;
  --line: #d8dfda;
  --muted: #687873;
  --accent: #e0e879;
  --accent-dark: #006f62;
  --coral: #c85042;
}

.site-header,
.section-nav {
  background: #182222;
  color: #f6faf6;
  border-color: #364240;
}

.header-inner {
  height: 76px;
}

.brand-emblem {
  width: 38px;
  height: 38px;
  background: var(--accent);
  border-radius: 3px;
}

.brand-emblem span {
  background: var(--ink);
}

.brand-copy strong {
  color: #f9fcf8;
  font-size: 23px;
}

.brand-copy small {
  color: var(--accent);
}

.auth-label {
  color: #bdcac5;
}

.site-header .icon-button,
.site-header .icon-text {
  color: #f6faf6;
  border-color: #52625c;
  background: transparent;
}

.site-header .icon-button:hover,
.site-header .icon-text:hover {
  background: #30413c;
}

.section-nav-inner {
  gap: 0;
}

.section-nav a {
  min-height: 52px;
  padding: 0 20px;
  color: #b9c6c0;
  font-size: 13px;
  border-bottom-width: 3px;
}

.section-nav a:first-child {
  padding-left: 0;
}

.section-nav a[aria-current="page"] {
  border-bottom-color: var(--accent);
  color: #fff;
}

.section-nav a:hover,
.section-nav a:focus-visible {
  color: var(--accent);
}

.overview {
  padding: 34px 0 25px;
}

.overview-heading {
  margin-bottom: 20px;
}

.overview h1,
.investments-heading h1 {
  font-size: 31px;
  line-height: 1.2;
}

.eyebrow {
  color: var(--coral);
  font-weight: 800;
}

.overview-grid {
  gap: 0;
  background: #fff;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.focus-panel {
  min-height: 150px;
  padding: 19px 23px;
  background: var(--accent);
  color: var(--ink);
  border-radius: 0;
}

.focus-panel .label,
.focus-panel .sub {
  color: #344639;
}

.focus-panel .name {
  font-size: 24px;
}

.focus-panel button {
  background: var(--ink);
  color: #fff;
}

.focus-panel button:hover {
  background: #394542;
}

.metric {
  min-height: 150px;
  padding: 19px 23px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
}

.metric:last-child {
  border-right: 0;
}

.metric strong {
  font-size: 27px;
  font-weight: 800;
}

.metric > span,
.metric small {
  color: var(--muted);
}

.metric-link:hover {
  background: #f0f6f1;
}

.schedule-strip {
  padding: 21px 0 30px;
  border-bottom: 1px solid var(--line);
}

.investments-route .schedule-strip {
  display: none;
}

.schedule-strip-heading,
.investment-trend-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.schedule-strip-heading h2,
.investment-trend-heading h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.2;
}

.schedule-strip-heading > span,
.investment-trend-heading > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.schedule-track {
  display: flex;
  border-top: 1px solid #aabbb2;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #bac9c0 transparent;
}

.schedule-event {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  align-content: start;
  flex: 1 0 0;
  min-width: 150px;
  min-height: 142px;
  padding: 20px 16px 14px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  transition: background 160ms ease;
}

.schedule-event::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 17px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--accent-dark);
}

.schedule-event.closing::before {
  background: var(--coral);
}

.schedule-event.listing::before {
  background: #ac8638;
}

.schedule-event:hover,
.schedule-event:focus-visible {
  background: #eaf2ed;
}

.schedule-event-date {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.schedule-event-date strong {
  font-family: "DM Sans", "Noto Sans KR", sans-serif;
  font-size: 30px;
  line-height: 1;
}

.schedule-event-date span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.schedule-event-info {
  display: grid;
  align-content: end;
  gap: 3px;
  min-width: 0;
  padding-right: 13px;
}

.schedule-event-info small {
  color: var(--accent-dark);
  font-size: 10px;
  font-weight: 800;
}

.schedule-event.closing .schedule-event-info small {
  color: var(--coral);
}

.schedule-event-info strong {
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.focus-panel .name-suffix {
  display: inline-block;
  max-width: 100%;
  vertical-align: baseline;
}

.schedule-event svg {
  position: absolute;
  right: 12px;
  bottom: 14px;
  width: 14px;
  height: 14px;
  color: var(--accent-dark);
}

.schedule-empty {
  padding: 25px 0;
  color: var(--muted);
  font-size: 13px;
}

.workspace {
  padding-top: 30px;
  border-top: 0;
  gap: 38px;
}

.section-heading h2 {
  font-size: 26px;
}

.tab-list {
  padding: 0;
  background: transparent;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.tab {
  border-bottom: 3px solid transparent;
  border-radius: 0;
  padding: 15px 12px 12px;
  background: transparent;
}

.tab.active {
  border-bottom: 3px solid var(--accent-dark);
  background: transparent;
  box-shadow: none;
  color: var(--ink);
}

.tab span,
.tab.active span {
  border-radius: 3px;
  background: #e3ebe5;
}

.tab.active span {
  background: var(--ink);
  color: #fff;
}

.stock-list {
  border-top-color: var(--ink);
}

.stock-entry:nth-child(even) {
  background: #f8faf8;
}

.stock-row:hover,
.stock-row:focus-visible {
  background: #e9f2eb;
}

.side {
  border-left-color: var(--line);
}

.aside-title h2 {
  font-size: 15px;
}

.investment-metrics {
  background: #fff;
  border-top-color: var(--ink);
}

.investment-trend {
  padding: 27px 0 29px;
  border-bottom: 1px solid var(--line);
}

.investment-trend-chart {
  min-height: 0;
}

.investment-trend-chart.is-empty {
  min-height: 80px;
}

.trend-empty {
  display: flex;
  align-items: center;
  min-height: 80px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.trend-bars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
  border-top: 1px solid var(--line);
}

.trend-year {
  border-top: 1px solid var(--line);
}

.trend-year:last-child {
  border-bottom: 1px solid var(--line);
}

.trend-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 16px;
  min-height: 58px;
  padding: 0 12px;
  cursor: pointer;
  list-style: none;
}

.trend-summary::-webkit-details-marker {
  display: none;
}

.trend-summary:hover,
.trend-summary:focus-visible {
  background: #f4f8f5;
}

.trend-summary > span {
  font-size: 15px;
  font-weight: 700;
}

.trend-summary small {
  margin-left: 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.trend-summary > strong {
  font-size: 15px;
}

.trend-summary > strong.positive {
  color: var(--accent-dark);
}

.trend-summary > strong.negative {
  color: var(--coral);
}

.trend-summary svg {
  width: 16px;
  height: 16px;
  transition: transform .18s ease;
}

.trend-year[open] > .trend-summary svg,
.trend-quarter[open] > .trend-summary svg {
  transform: rotate(180deg);
}

.trend-quarters {
  padding-left: 20px;
}

.trend-quarter {
  border-top: 1px solid var(--line);
}

.trend-quarter > .trend-summary {
  min-height: 48px;
}

.trend-quarter > .trend-summary > span {
  font-size: 13px;
}

.trend-undated {
  color: var(--muted);
  font-size: 12px;
}

.trend-month {
  display: grid;
  grid-template-rows: 20px 125px 20px;
  min-width: 0;
  padding: 12px 10px 0;
  border-right: 1px solid var(--line);
  text-align: center;
}

.trend-month:last-child {
  border-right: 0;
}

.trend-month > strong {
  font-size: 11px;
  white-space: nowrap;
}

.trend-month > strong.positive {
  color: var(--accent-dark);
}

.trend-month > strong.negative {
  color: var(--coral);
}

.trend-plot {
  position: relative;
  min-width: 0;
}

.trend-plot::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #bbc8c1;
}

.trend-bar {
  position: absolute;
  left: 26%;
  width: 48%;
  height: var(--bar-size);
  min-height: 2px;
  background: var(--accent-dark);
}

.trend-bar.gain {
  bottom: 50%;
}

.trend-bar.loss {
  top: 50%;
  background: var(--coral);
}

.trend-bar.zero {
  top: 50%;
  background: #aebdb4;
}

.trend-month-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

@media (max-width: 760px) {
  .header-inner {
    height: 62px;
  }

  .brand-emblem {
    width: 33px;
    height: 33px;
  }

  .brand-copy strong {
    font-size: 18px;
  }

  .section-nav a {
    min-height: 45px;
    padding: 0 12px;
    font-size: 12px;
  }

  .overview {
    padding: 24px 0 18px;
  }

  .overview h1,
  .investments-heading h1 {
    font-size: 23px;
  }

  .overview-grid {
    gap: 0;
  }

  .focus-panel {
    min-height: 104px;
    padding: 14px 16px;
  }

  .focus-panel .name {
    font-size: 19px;
  }

  .metric {
    min-height: 94px;
    padding: 12px 9px;
    border-right: 1px solid var(--line);
  }

  .metric strong {
    font-size: 18px;
  }

  .schedule-strip {
    padding: 17px 0 23px;
  }

  .schedule-strip-heading h2,
  .investment-trend-heading h2 {
    font-size: 18px;
  }

  .schedule-event {
    flex: 0 0 165px;
    min-height: 132px;
  }

  .workspace {
    padding-top: 22px;
  }

  .tab {
    padding: 12px 3px 10px;
  }

  .investment-trend-chart {
    overflow: visible;
  }

  .trend-bars {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .trend-quarters {
    padding-left: 12px;
  }

  .trend-summary {
    gap: 10px;
    padding: 0 4px;
  }

  .trend-summary > strong {
    font-size: 13px;
  }

  .trend-month {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 78px;
    grid-template-rows: 33px;
    align-items: center;
    gap: 9px;
    padding: 0 4px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    text-align: left;
  }

  .trend-month-label {
    grid-column: 1;
    grid-row: 1;
  }

  .trend-plot {
    grid-column: 2;
    grid-row: 1;
    height: 9px;
    background: #e5ece6;
  }

  .trend-plot::after {
    display: none;
  }

  .trend-bar,
  .trend-bar.gain,
  .trend-bar.loss,
  .trend-bar.zero {
    top: 0;
    bottom: auto;
    left: 0;
    width: var(--bar-width);
    height: 100%;
    min-height: 0;
  }

  .trend-bar.zero {
    width: 2px;
  }

  .trend-month > strong {
    grid-column: 3;
    grid-row: 1;
    text-align: right;
    font-size: 10px;
  }
}

@media (max-width: 500px) {
  .metric {
    padding: 12px 7px;
  }

  .metric > span {
    font-size: 10px;
  }

  .metric strong {
    font-size: 17px;
  }

  .investment-trend-heading > span {
    max-width: 130px;
    text-align: right;
  }
}

@media (prefers-reduced-motion: reduce) {
  .schedule-event {
    transition: none;
  }
}

/* Market desk: a single editorial surface for dates, prices, and personal results. */
:root {
  --ink: #172423;
  --ink-2: #344743;
  --paper: #eff2f0;
  --line: #d2ddd8;
  --muted: #667971;
  --accent: #e1ec75;
  --accent-dark: #08796c;
  --coral: #c45548;
}

body {
  background: var(--paper);
  font-size: 14px;
}

.site-header,
.section-nav {
  background: var(--ink);
  border-color: #344640;
}

.header-inner {
  height: 74px;
}

.brand {
  gap: 14px;
}

.brand-emblem {
  width: 42px;
  height: 42px;
  border-radius: 2px;
}

.brand-copy strong {
  font-family: "Gowun Batang", "Noto Sans KR", serif;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.08;
}

.brand-copy small {
  font-family: "DM Sans", sans-serif;
  font-size: 10px;
  font-weight: 800;
  color: var(--accent);
}

.section-nav a {
  min-height: 49px;
  padding: 0 20px;
  font-size: 13px;
}

.section-nav a[aria-current="page"] {
  color: var(--accent);
}

.overview {
  padding: 38px 0 31px;
}

.overview-heading {
  margin-bottom: 20px;
}

.overview h1,
.investments-heading h1 {
  font-family: "Gowun Batang", "Noto Sans KR", serif;
  font-size: 35px;
  font-weight: 700;
  line-height: 1.18;
}

.eyebrow {
  margin-bottom: 5px;
  color: var(--coral);
  font-family: "DM Sans", sans-serif;
  font-size: 10px;
  font-weight: 800;
}

.overview-meta {
  color: #50645d;
  font-size: 12px;
}

.overview-grid {
  grid-template-columns: minmax(340px, 1.35fr) repeat(3, minmax(0, 1fr));
  border: 1px solid #283b35;
  background: #fff;
}

.focus-panel {
  min-height: 190px;
  padding: 25px 29px;
  background: var(--ink);
  color: #fff;
  border-radius: 0;
  grid-template-columns: minmax(0, 1fr) auto;
}

.focus-panel .label {
  color: var(--accent);
  font-family: "DM Sans", "Noto Sans KR", sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.focus-panel .name {
  color: #fff;
  font-family: "Gowun Batang", "Noto Sans KR", serif;
  font-size: 31px;
  line-height: 1.24;
  grid-column: 1 / -1;
  min-width: 0;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.focus-panel .sub {
  color: #b9c9c1;
  font-size: 13px;
}

.focus-panel button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  grid-row: 3;
  align-self: end;
  padding: 10px 12px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  background: var(--accent);
  border: 0;
  border-radius: 3px;
}

.focus-panel button svg {
  width: 15px;
  height: 15px;
}

.metric,
.metric:last-child {
  min-width: 0;
  min-height: 190px;
  padding: 27px 22px 23px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  justify-content: space-between;
}

.metric:last-child {
  border-right: 0;
}

.metric > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric strong {
  display: block;
  margin: 0;
  font-size: 29px;
  font-weight: 800;
  line-height: 1.14;
  overflow-wrap: anywhere;
}

.metric small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.metric-link:hover,
.metric-link:focus-visible {
  background: #f3f8f4;
}

.schedule-strip {
  padding: 28px 0 35px;
}

.schedule-strip-heading h2,
.investment-trend-heading h2 {
  font-family: "Gowun Batang", "Noto Sans KR", serif;
  font-size: 25px;
}

.schedule-track {
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.schedule-event {
  min-height: 170px;
  padding: 23px 18px 17px;
}

.schedule-event::before {
  left: 19px;
  width: 10px;
  height: 10px;
}

.schedule-event-date strong {
  font-size: 38px;
  font-weight: 700;
}

.schedule-event-info small {
  font-size: 11px;
}

.schedule-event-info strong {
  font-size: 14px;
  font-weight: 700;
}

.workspace {
  padding-top: 34px;
  gap: 42px;
}

.section-heading h2 {
  font-family: "Gowun Batang", "Noto Sans KR", serif;
  font-size: 31px;
}

.result-count {
  background: var(--ink);
  color: #fff;
  padding: 5px 9px;
  font-size: 11px;
}

.tab {
  padding: 16px 12px 13px;
  font-size: 13px;
  font-weight: 700;
}

.stock-list {
  border-top: 2px solid var(--ink);
}

.stock-entry:nth-child(even) {
  background: transparent;
}

.stock-entry:hover {
  background: #e9f0eb;
}

.stock-row {
  min-height: 83px;
  padding: 18px 12px;
}

.stock-row .name {
  font-size: 17px;
  font-weight: 800;
}

.stock-row .market,
.stock-row .datum small {
  font-size: 11px;
}

.stock-row .datum strong {
  font-size: 14px;
}

.stock-row svg {
  width: 17px;
  height: 17px;
}

.quick-record {
  min-width: 66px;
  height: 36px;
  margin-right: 10px;
}

.side {
  padding-left: 26px;
}

.aside-copy,
.side-footnote,
.inline-message {
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.aside-title h2 {
  font-family: "Gowun Batang", "Noto Sans KR", serif;
  font-size: 17px;
}

.investments-view {
  padding-top: 35px;
}

.investment-period-bar {
  margin-bottom: 18px;
}

.investment-period-bar > div strong {
  font-size: 14px;
}

.investment-metrics {
  background: var(--ink);
  border-top: 3px solid var(--accent);
  border-bottom: 0;
}

.investment-metrics > div {
  min-height: 132px;
  padding: 23px 27px;
  border-color: #3b4d46;
}

.investment-metrics > div:first-child {
  padding-left: 27px;
}

.investment-metrics span {
  color: #b4c4bc;
  font-size: 12px;
}

.investment-metrics strong {
  color: #fff;
  font-family: "DM Sans", "Noto Sans KR", sans-serif;
  font-size: 30px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.investment-metrics .positive {
  color: var(--accent);
}

.investment-metrics .negative {
  color: #ff927d;
}

.investment-basis {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.investment-trend {
  padding: 36px 0 34px;
}

.trend-year {
  background: #fff;
}

.trend-year:first-child {
  border-top: 2px solid var(--ink);
}

.trend-summary {
  padding: 0 19px;
}

.trend-quarter > .trend-summary {
  background: #f8faf8;
}

.trend-bars {
  display: block;
  background: #fff;
}

.trend-month {
  grid-template-columns: 64px minmax(0, 1fr) 126px;
  grid-template-rows: 52px;
  align-items: center;
  gap: 17px;
  padding: 0 19px;
  border-right: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.trend-month:last-child {
  border-bottom: 0;
}

.trend-month-label {
  grid-column: 1;
  grid-row: 1;
  font-size: 12px;
}

.trend-plot {
  grid-column: 2;
  grid-row: 1;
  height: 10px;
  background: #e7eeea;
}

.trend-plot::after {
  display: none;
}

.trend-bar,
.trend-bar.gain,
.trend-bar.loss,
.trend-bar.zero {
  top: 0;
  bottom: auto;
  left: 0;
  width: var(--bar-width);
  height: 100%;
  min-height: 0;
}

.trend-month > strong {
  grid-column: 3;
  grid-row: 1;
  text-align: right;
  font-size: 12px;
}

.investment-row {
  min-height: 116px;
}

.investment-identity > button,
.investment-identity > strong {
  font-size: 18px;
}

.investment-cell strong {
  font-size: 16px;
}

.detail-dialog,
.record-dialog {
  border-top: 4px solid var(--accent);
  border-radius: 5px;
  box-shadow: 0 28px 80px rgba(12, 30, 25, .25);
}

.dialog-top h2 {
  font-family: "Gowun Batang", "Noto Sans KR", serif;
  font-size: 29px;
  font-weight: 700;
}

.detail-grid {
  border-top: 2px solid var(--ink);
}

.detail-grid div {
  background: #fafcfb;
}

.detail-grid strong {
  font-size: 16px;
}

.close-button:hover,
.close-button:focus-visible {
  background: var(--paper);
}

.detail-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 23px 0 27px;
  padding: 0;
  list-style: none;
  background: var(--ink);
  color: #fff;
}

.detail-progress li {
  display: grid;
  align-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 100px;
  padding: 15px 16px;
  border-right: 1px solid #42534d;
}

.detail-progress li:last-child {
  border-right: 0;
}

.detail-progress li.current {
  background: var(--accent);
  color: var(--ink);
}

.detail-progress .step-number {
  color: #aabbb1;
  font: 700 10px "DM Sans", sans-serif;
}

.detail-progress .current .step-number {
  color: #45604c;
}

.detail-progress strong {
  font-size: 14px;
}

.detail-progress .done strong {
  color: var(--accent);
}

.detail-progress small {
  color: #afbeb6;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.detail-progress .current small {
  color: #344639;
}

.detail-section h3 {
  font-family: "Gowun Batang", "Noto Sans KR", serif;
  font-size: 19px;
}

.detail-price-basis {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.calendar-download {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.calendar-download:hover,
.calendar-download:focus-visible {
  border-color: var(--accent-dark);
  color: var(--accent-dark);
}

.calendar-download svg {
  width: 17px;
  height: 17px;
}

.detail-source {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 27px;
  padding: 20px 0;
  border-top: 2px solid var(--ink);
}

.detail-source > svg {
  width: 20px;
  height: 20px;
  color: var(--accent-dark);
  flex: none;
}

.detail-source > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.detail-source span,
.detail-source small {
  color: var(--muted);
  font-size: 11px;
}

.detail-source strong {
  font-size: 13px;
}

.detail-source .source-link {
  margin-left: auto;
  white-space: nowrap;
}

.stock-view {
  padding-top: 28px;
}

.stock-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
}

.stock-back svg {
  width: 17px;
  height: 17px;
}

.stock-back:hover,
.stock-back:focus-visible {
  color: var(--ink);
}

.stock-page-content {
  max-width: 1120px;
  margin: 20px auto 0;
}

.stock-page-content .detail-body {
  padding: 0 0 80px;
}

.stock-page-content .dialog-top h2 {
  font-size: 43px;
}

.stock-page-content .detail-sub {
  margin-top: 8px;
  font-size: 14px;
}

.stock-page-content .detail-progress {
  margin: 32px 0 37px;
}

.stock-page-content .detail-progress li {
  min-height: 125px;
  padding: 20px 24px;
}

.stock-page-content .detail-progress strong {
  font-size: 18px;
}

.stock-page-content .detail-section {
  margin-top: 34px;
}

.stock-page-content .detail-section h3 {
  margin-bottom: 14px;
  font-size: 22px;
}

.stock-page-content .detail-grid div {
  min-height: 92px;
  padding: 19px 22px;
}

.stock-page-content .detail-grid span {
  font-size: 12px;
}

.stock-page-content .detail-grid strong {
  font-size: 19px;
}

.stock-page-content .detail-source {
  margin-top: 42px;
}

.record-costs {
  margin: 8px 0 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.record-costs > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  cursor: pointer;
  list-style: none;
  font-size: 13px;
  font-weight: 700;
}

.record-costs > summary::-webkit-details-marker {
  display: none;
}

.record-costs > summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.record-costs > summary svg {
  width: 16px;
  height: 16px;
  margin-left: auto;
  transition: transform .18s ease;
}

.record-costs[open] > summary svg {
  transform: rotate(180deg);
}

.record-costs .form-grid {
  margin: 0 0 16px;
}

.record-costs .form-grid .hidden {
  display: none;
}

.cost-method {
  margin: -4px 0 15px;
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 1100px) {
  .overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .focus-panel {
    grid-column: 1 / -1;
    min-height: 156px;
  }

  .metric {
    min-height: 135px;
  }

  .workspace {
    display: block;
  }

  .side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 32px;
    padding: 25px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .side section {
    margin: 0;
    padding: 0;
    border: 0;
  }
}

@media (max-width: 760px) {
  .stock-view {
    padding-top: 18px;
  }

  .stock-page-content {
    margin-top: 15px;
  }

  .stock-page-content .dialog-top h2 {
    font-size: 30px;
  }

  .stock-page-content .detail-progress {
    margin: 26px 0;
  }

  .stock-page-content .detail-progress li {
    min-height: 94px;
    padding: 13px;
  }

  .stock-page-content .detail-progress strong {
    font-size: 14px;
  }

  .stock-page-content .detail-section h3 {
    font-size: 19px;
  }

  .stock-page-content .detail-grid div {
    min-height: 84px;
    padding: 14px;
  }

  .stock-page-content .detail-grid strong {
    font-size: 15px;
  }

  .header-inner {
    height: 66px;
  }

  .brand-emblem {
    width: 37px;
    height: 37px;
  }

  .brand-copy strong {
    font-size: 18px;
  }

  .section-nav a {
    min-height: 46px;
    padding: 0 15px;
    font-size: 12px;
  }

  .overview {
    padding: 27px 0 25px;
  }

  .overview h1,
  .investments-heading h1 {
    font-size: 27px;
  }

  .overview-meta {
    font-size: 10px;
  }

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

  .focus-panel {
    grid-column: 1 / -1;
    min-height: 170px;
    padding: 22px;
  }

  .focus-panel .name {
    font-size: 25px;
  }

  .focus-panel button {
    padding: 9px 10px;
    white-space: nowrap;
  }

  .metric,
  .metric:last-child {
    min-height: 118px;
    padding: 18px 15px;
    border-right: 1px solid var(--line);
    border-top: 1px solid var(--line);
  }

  #metric-month {
    grid-column: 1 / -1;
  }

  .metric strong {
    font-size: 24px;
  }

  .metric small {
    display: block;
  }

  .schedule-strip {
    padding: 27px 0;
  }

  .schedule-strip-heading h2,
  .investment-trend-heading h2 {
    font-size: 22px;
  }

  .schedule-event {
    flex: 0 0 190px;
    min-height: 154px;
  }

  .schedule-event-date strong {
    font-size: 35px;
  }

  .workspace {
    padding-top: 28px;
  }

  .section-heading h2 {
    font-size: 27px;
  }

  .tab-list {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .tab-list::-webkit-scrollbar {
    display: none;
  }

  .tab {
    flex: 0 0 auto;
    min-width: 94px;
    padding: 12px 9px;
    font-size: 12px;
    white-space: nowrap;
  }

  .stock-row {
    min-height: 88px;
    padding: 16px 7px;
  }

  .stock-row .name {
    font-size: 15px;
  }

  .stock-row .market,
  .stock-row .datum small {
    font-size: 10px;
  }

  .stock-row .datum strong {
    font-size: 12px;
  }

  .side {
    padding-left: 0;
  }

  .investments-view {
    padding-top: 27px;
  }

  .investment-metrics > div,
  .investment-metrics > div:first-child {
    min-height: 100px;
    padding: 17px;
    border-color: #3b4d46;
  }

  .investment-metrics strong {
    font-size: 24px;
  }

  .trend-month {
    grid-template-columns: 39px minmax(0, 1fr) 85px;
    grid-template-rows: 44px;
    gap: 8px;
    padding: 0 9px;
  }

  .trend-month > strong {
    font-size: 11px;
  }

  .investment-identity > button,
  .investment-identity > strong {
    font-size: 16px;
  }
}

@media (max-width: 390px) {
  .overview-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .overview-meta {
    max-width: none;
    text-align: left;
  }

  .focus-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .focus-panel button {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    margin-top: 12px;
  }

  .metric strong {
    font-size: 21px;
  }

  .tab {
    min-width: 91px;
  }
}

@media (max-width: 500px) {
  .site-footer-inner {
    display: block;
    padding: 25px 15px 30px;
  }

  .site-footer p {
    margin-top: 8px;
  }

  .broker-table,
  .broker-table tbody,
  .broker-table tr,
  .broker-table td {
    display: block;
  }

  .broker-table thead {
    display: none;
  }

  .broker-table tbody {
    display: grid;
    gap: 10px;
  }

  .broker-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid var(--line);
    background: #fff;
  }

  .broker-table td {
    min-width: 0;
    padding: 12px !important;
    border-right: 1px solid var(--line);
    font-size: 12px;
    overflow-wrap: anywhere;
  }

  .broker-table td:nth-child(even) {
    border-right: 0;
  }

  .broker-table td:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .broker-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
  }

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

  .detail-progress li:nth-child(2) {
    border-right: 0;
  }

  .detail-progress li:nth-child(-n + 2) {
    border-bottom: 1px solid #42534d;
  }

  .detail-progress li {
    min-height: 83px;
    padding: 11px 13px;
  }

  .detail-source {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .side {
    display: block;
  }

  .side section {
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 359px) {
  .stock-page-content .dialog-top h2 {
    font-size: 25px;
  }

  .stock-page-content .detail-grid div {
    padding: 11px;
  }

  .stock-page-content .detail-grid strong {
    font-size: 13px;
  }

  .stock-row {
    grid-template-columns: minmax(0, 1fr) 17px;
    grid-template-rows: auto auto;
    row-gap: 4px;
  }

  .stock-row::before {
    display: none;
  }

  .stock-row > span:first-of-type {
    grid-column: 1;
    grid-row: 1;
  }

  .stock-row .datum:nth-of-type(2) {
    grid-column: 1;
    grid-row: 2;
  }

  .stock-row .datum:nth-of-type(2) strong {
    overflow-wrap: normal;
    white-space: nowrap;
  }

  .stock-row > svg {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .focus-panel,
  .overview-grid .metric,
  .schedule-strip {
    animation: desk-appear 380ms ease both;
  }

  .overview-grid .metric:nth-child(3) { animation-delay: 60ms; }
  .overview-grid .metric:nth-child(4) { animation-delay: 110ms; }
  .schedule-strip { animation-delay: 130ms; }

  @keyframes desk-appear {
    from { opacity: 0; transform: translateY(7px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

/* Monthly schedule: a shared date surface, with a compact agenda on small screens. */
.market-heading-actions,
.view-switch,
.calendar-toolbar,
.calendar-navigation,
.calendar-legend,
.calendar-agenda-heading {
  display: flex;
  align-items: center;
}

.market-heading-actions { gap: 14px; }
.view-switch {
  padding: 3px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 5px;
}
.view-switch button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 86px;
  height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.view-switch button[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
}
.view-switch svg,
.calendar-navigation svg { width: 15px; height: 15px; }
.market.calendar-mode .tab-list,
.market.calendar-mode .toolbar,
.market.calendar-mode .list-context,
.market.calendar-mode .stock-list { display: none; }

.ipo-calendar {
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.calendar-loading { padding: 36px 19px; color: var(--muted); font-size: 12px; }
.calendar-toolbar {
  justify-content: space-between;
  gap: 14px;
  padding: 19px 19px 12px;
}
.calendar-toolbar .eyebrow { margin: 0 0 2px; }
.calendar-toolbar h3 {
  margin: 0;
  font-family: "Gowun Batang", "Noto Sans KR", serif;
  font-size: 25px;
  line-height: 1.2;
}
.calendar-navigation { gap: 4px; }
.calendar-navigation button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}
.calendar-navigation button[data-calendar-today] { padding: 0 10px; }
.calendar-navigation button:hover,
.calendar-navigation button:focus-visible { background: #eff5f1; }
.calendar-legend { justify-content: flex-end; gap: 14px; padding: 0 19px 13px; }
.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}
.calendar-legend span::before,
.calendar-day-dots i {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #13836b;
}
.calendar-legend .refund::before,
.calendar-day-dots i.refund { background: #d99230; }
.calendar-legend .listing::before,
.calendar-day-dots i.listing { background: #c76550; }
.calendar-weekdays,
.calendar-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f0f4f1;
}
.calendar-weekdays span {
  padding: 9px 11px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}
.calendar-weekdays span:first-child { color: #b65f50; }
.calendar-days { border-left: 1px solid var(--line); }
.calendar-day,
.calendar-day-empty {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  min-height: 105px;
  padding: 10px 9px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  text-align: left;
}
.calendar-day-empty { background: #f7f9f7; }
.calendar-day:hover,
.calendar-day:focus-visible { background: #eef5f0; }
.calendar-day.is-selected { background: #e8f3eb; box-shadow: inset 0 0 0 2px #207d67; }
.calendar-day-number {
  align-self: flex-start;
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}
.calendar-day.is-today .calendar-day-number {
  padding: 5px;
  margin: -5px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
}
.calendar-day-tags { display: grid; gap: 3px; min-width: 0; margin-top: 12px; }
.calendar-tag,
.calendar-more {
  display: block;
  overflow: hidden;
  padding: 4px 5px;
  border-left: 2px solid #13836b;
  background: #e9f4ed;
  color: #216450;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calendar-tag.refund { border-color: #d99230; background: #fcf2df; color: #906012; }
.calendar-tag.listing { border-color: #c76550; background: #fbede8; color: #99513e; }
.calendar-more { border: 0; background: transparent; color: var(--muted); }
.calendar-day-dots { display: none; }
.calendar-agenda { min-height: 104px; padding: 15px 19px 19px; }
.calendar-agenda-heading { justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.calendar-agenda-heading strong { font-size: 13px; }
.calendar-agenda-heading span { color: var(--muted); font-size: 11px; }
.calendar-agenda-items { display: grid; gap: 1px; border-top: 1px solid var(--line); }
.calendar-agenda-items button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 43px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
}
.calendar-agenda-items button:hover { color: var(--accent-dark); }
.calendar-agenda-items button strong { min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
.calendar-agenda-items button svg { width: 14px; height: 14px; margin-left: auto; flex: none; }
.calendar-agenda-kind {
  flex: none;
  min-width: 56px;
  color: #13836b;
  font-size: 10px;
  font-weight: 800;
}
.calendar-agenda-kind.refund { color: #a26918; }
.calendar-agenda-kind.listing { color: #b65d49; }
.calendar-agenda-empty { margin: 16px 0 0; color: var(--muted); font-size: 12px; }

@media (max-width: 760px) {
  .market-heading-actions { gap: 7px; }
  .market-heading-actions .result-count { display: none; }
  .view-switch button { min-width: 35px; width: 35px; padding: 0; }
  .view-switch button span { display: none; }
  .calendar-toolbar { padding: 15px 12px 11px; }
  .calendar-toolbar h3 { font-size: 21px; }
  .calendar-legend { padding: 0 12px 10px; }
  .calendar-weekdays span { text-align: center; padding: 8px 0; }
  .calendar-day,
  .calendar-day-empty { min-height: 58px; padding: 7px 4px; }
  .calendar-day-number { font-size: 12px; }
  .calendar-day-tags { display: none; }
  .calendar-day-dots { display: flex; gap: 2px; flex-wrap: wrap; margin-top: auto; }
  .calendar-day-dots i { width: 5px; height: 5px; }
  .calendar-agenda { padding: 14px 12px 18px; }
}

.record-picker-dialog {
  width: min(540px, calc(100vw - 30px));
  max-height: min(760px, 86vh);
  padding: 24px;
  overflow: hidden;
  border: 0;
  border-top: 4px solid var(--accent);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 22px 70px rgba(17, 30, 25, .2);
}
.record-picker-dialog::backdrop { background: rgba(11, 21, 18, .6); }
.record-picker-dialog .dialog-top { margin-bottom: 18px; }
.record-picker-dialog .dialog-top h2 { margin: 0; font-size: 23px; }
.record-picker-search { display: flex; width: 100%; margin-bottom: 12px; }
.record-picker-search input { width: 100%; }
.record-picker-list { max-height: min(560px, 55vh); overflow-y: auto; border-top: 1px solid var(--line); }
.record-picker-list > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 68px;
  padding: 10px 3px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}
.record-picker-list > button:hover,
.record-picker-list > button:focus-visible { background: #f0f6f1; }
.record-picker-list > button > span:first-child { display: grid; gap: 4px; min-width: 0; }
.record-picker-list strong { font-size: 15px; }
.record-picker-list small { color: var(--muted); font-size: 11px; }
.record-picker-action { display: inline-flex; align-items: center; gap: 5px; flex: none; color: var(--accent-dark); font-size: 12px; font-weight: 800; }
.record-picker-action svg { width: 15px; height: 15px; }
.record-picker-empty { margin: 0; padding: 24px 3px; color: var(--muted); font-size: 13px; }

.stock-page-content .detail-source-top {
  margin: 15px 0 0;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent-dark);
  background: #f5f9f6;
}
.detail-source-top small { line-height: 1.45; }
.detail-source-top .source-link { padding: 8px 0 8px 8px; }
.record-more { margin-top: 12px; }
.record-more .memo-label { margin: 0 0 17px; }
.record-more .memo-label textarea { min-height: 66px; }
.record-more .form-grid:has(.hidden) { grid-template-columns: minmax(0, 1fr); }
.record-more .form-grid .hidden { display: none; }
.calendar-day.has-events { background: #fbfdfb; }
.calendar-day.has-events:hover,
.calendar-day.has-events:focus-visible { background: #eef5f0; }
.calendar-day.has-events.is-selected { background: #e8f3eb; }
.calendar-day:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: -3px; }
.calendar-day-dots b { color: var(--ink-2); font-size: 9px; font-weight: 800; line-height: 1; }
.local-import {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 18px;
  padding: 15px 18px;
  border-left: 3px solid var(--accent-dark);
  background: #eaf2ec;
}
.local-import.hidden { display: none; }
.local-import > div { display: grid; gap: 4px; min-width: 0; }
.local-import strong { font-size: 13px; }
.local-import span { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.local-import button { flex: none; }
.local-import button svg { width: 15px; height: 15px; }

@media (max-width: 760px) {
  .record-picker-dialog { width: calc(100vw - 20px); max-height: 88vh; padding: 18px; }
  .record-picker-dialog .dialog-top h2 { font-size: 21px; }
  .record-picker-list { max-height: 60vh; }
  .stock-page-content .detail-source-top { align-items: flex-start; gap: 8px; padding: 12px; }
  .detail-source-top > svg { width: 16px; height: 16px; }
  .detail-source-top .source-link { align-self: center; }
  .calendar-day.has-events:not(.is-selected) { background: #f1f7f2; }
  .calendar-day-dots { align-items: center; }
  .local-import { align-items: stretch; flex-direction: column; gap: 12px; padding: 14px; }
  .local-import button { align-self: flex-start; }
}
