/* Portfolio-only surfaces; preserve the original home and account design. */
body[data-mode="paper"] .view-mine .mine,
.pd-shell {
  max-width: 1140px;
  margin: auto;
  padding: 40px 28px 80px;
  width: 100%;
  box-sizing: border-box;
}
body[data-mode="paper"] .view-mine .paper-title,
.pd-heading h2 {
  font-family: var(--font-ui, system-ui), sans-serif;
  font-size: 30px;
  letter-spacing: -0.04em;
  font-weight: 700;
}
body[data-mode="paper"] .view-mine .paper-sub {
  margin-bottom: 24px;
}
.pd-shell,
.pd-dialog,
#mine-list {
  --pd-ink: #19262c;
  --pd-muted: #738087;
  --pd-border: #e6ebe7;
  --pd-green: #24765d;
}
.pd-heading,
.pd-section-head,
.pd-card-top,
.pd-card-bottom,
.pd-filterbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.pd-heading {
  margin-bottom: 28px;
}
.pd-heading p {
  color: #738087;
  font-size: 13px;
  margin: 10px 0 0;
}
.pd-heading .pd-eyebrow {
  font-size: 10px;
  letter-spacing: 0.12em;
  margin: 0 0 8px;
}
.pd-heading h2 {
  margin: 0;
}
.pd-btn {
  font: inherit;
  font-size: 12px;
  color: #19262c;
  border: 1px solid #dfe5e1;
  border-radius: 9px;
  background: white;
  min-height: 40px;
  padding: 9px 14px;
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
}
.pd-btn:hover {
  background: #f5f7f4;
  border-color: #bac8bf;
}
.pd-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}
.pd-btn.primary {
  background: #19262c;
  color: white;
  border-color: #19262c;
}
.pd-btn:focus-visible,
.pd-dialog button:focus-visible {
  outline: 3px solid #7aacc5;
  outline-offset: 3px;
}
.pd-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 0 0 20px;
}
.pd-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: #fff;
  border: 1px solid var(--pd-border);
  border-radius: 16px;
  padding: 25px 0;
  margin-bottom: 24px;
}
.pd-stats > div {
  padding: 0 22px;
  border-right: 1px solid var(--pd-border);
  min-width: 0;
}
.pd-stats > div:last-child {
  border: 0;
}
.pd-stats span,
.pd-stats small {
  display: block;
  color: var(--pd-muted);
  font-size: 11px;
}
.pd-stats strong {
  display: block;
  font-size: clamp(19px, 2vw, 27px);
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  margin: 8px 0;
  overflow-wrap: anywhere;
}
.pd-stats > div:nth-child(2) strong {
  color: var(--pd-green);
}
.pd-split {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(260px, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}
.pd-card {
  background: #fff;
  border: 1px solid var(--pd-border);
  border-radius: 16px;
  padding: 24px;
  min-width: 0;
  box-sizing: border-box;
}
.pd-card h3,
.pd-section-head h3 {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.025em;
  margin: 0;
}
.pd-section-head {
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.pd-section-head small {
  font-weight: 400;
  color: var(--pd-muted);
  margin-left: 8px;
}
.pd-segments {
  display: flex;
  align-items: center;
  background: #f5f7f5;
  border-radius: 9px;
  padding: 3px;
  gap: 2px;
  flex-wrap: wrap;
}
.pd-segments .pd-btn {
  background: transparent;
  border-color: transparent;
  padding: 7px 10px;
  min-height: 34px;
  font-size: 11px;
  color: #52615d;
}
.pd-segments .pd-btn[aria-pressed="true"] {
  background: white;
  box-shadow: 0 1px 3px #17282014;
  color: #19262c;
}
.pd-health h3 {
  margin-bottom: 12px;
}
.pd-health p,
.pd-health li {
  font-size: 12px;
  color: #66766d;
  line-height: 1.8;
}
.pd-health ul {
  padding-left: 18px;
  margin: 24px 0;
}
.pd-health > p:last-child {
  border-top: 1px solid var(--pd-border);
  padding-top: 16px;
}
.pd-chart-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--pd-green);
  margin: 6px 0;
}
.pd-chart-value small {
  display: inline-block;
  font-size: 11px;
  font-weight: 400;
  color: var(--pd-muted);
  margin-left: 10px;
}
#pd-chart svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 230px;
}
#pd-chart svg text {
  font-size: 11px;
  fill: #738087;
}
#pd-chart-slider {
  width: 100%;
  accent-color: #24765d;
  margin: 12px 0;
}
#pd-chart-reading {
  display: block;
  min-height: 18px;
}
.pd-caption {
  font-size: 11px;
  line-height: 1.8;
  color: #738087;
  margin: 9px 0;
}
.pd-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 30px;
}
.pd-grid .pf {
  margin: 0;
}
.pd-card-top {
  align-items: flex-start;
  margin-bottom: 18px;
}
.pd-logo-group {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.pd-badge {
  display: inline-block;
  flex-shrink: 0;
  border-radius: 5px;
  padding: 4px 7px;
  font-size: 10px;
  line-height: 1.4;
  background: #f1f4f5;
  color: #5f7079;
}
.pd-badge.good {
  background: #eef6f0;
  color: #24765d;
}
.pd-badge.warning {
  background: #fcf4e5;
  color: #956926;
}
.pd-pnl {
  display: block;
  font-size: 25px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--pd-green);
  margin-top: 18px;
}
.pd-pnl.negative {
  color: #b84b45;
}
.pd-status {
  font-size: 11px;
  line-height: 1.8;
  background: #f6f8f5;
  color: #67776b;
  padding: 12px;
  border-radius: 8px;
  min-height: 62px;
  margin: 16px 0;
}
.pd-status.warning {
  background: #fcf8ee;
  color: #956926;
}
.pd-card-bottom {
  padding-top: 14px;
  border-top: 1px solid var(--pd-border);
  font-size: 10px;
  color: var(--pd-muted);
}
.pd-card-bottom .pd-btn {
  border: 0;
  padding: 4px;
  min-height: 36px;
}
.pd-pf-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.pd-pf-actions .pd-btn {
  font-size: 11px;
  min-height: 36px;
  padding: 6px 9px;
}
.pd-logo {
  width: 36px;
  height: 36px;
  display: inline-block;
  border: 1px solid #e8ece8;
  border-radius: 10px;
  background: white;
  position: relative;
  overflow: hidden;
  flex: none;
  vertical-align: middle;
  box-sizing: border-box;
}
.pd-logo > span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: #52695b;
}
.pd-logo.has-image > span {
  visibility: hidden;
}
.pd-logo img {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 25px;
  height: 25px;
  object-fit: contain;
}
.pd-logo.samsung img {
  width: 64px;
  height: 28px;
  max-width: none;
}
.pd-company-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.pd-company-inline > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.row-label .pd-logo {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}
.row-label .pd-logo img {
  width: 20px;
  height: 20px;
}
.row-label .pd-logo.samsung img {
  width: 50px;
}
.pd-transactions {
  padding: 0;
  overflow: hidden;
}
.pd-transactions > .pd-section-head {
  padding: 20px 24px;
  margin: 0;
}
.pd-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.pd-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
}
.pd-scroll table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  text-align: left;
  white-space: nowrap;
}
.pd-scroll th,
.pd-scroll td {
  padding: 17px 22px;
  border-top: 1px solid #eef1ee;
}
.pd-scroll th {
  font-size: 10px;
  font-weight: 400;
  color: #738087;
  background: #f8faf7;
}
.pd-scroll td {
  font-variant-numeric: tabular-nums;
}
.pd-scroll small {
  display: block;
  font-size: 10px;
  color: #738087;
  margin-top: 5px;
}
.pd-numeric {
  text-align: right;
}
.pd-buy {
  color: #b05a4a;
}
.pd-sell {
  color: #416787;
}
.pd-table-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  font-size: 11px;
  color: #738087;
}
.pd-transactions > .pd-caption {
  padding: 12px 24px;
  border-top: 1px solid #eef1ee;
  margin: 0;
}
.pd-empty {
  text-align: center;
  padding: 36px 14px;
  color: #738087;
  font-size: 13px;
  line-height: 1.8;
}
.pd-empty .pd-btn {
  margin-top: 14px;
}
.pd-notice-intro {
  background: #f1f6f2;
  border: 1px solid #e3ece5;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
  font-size: 12px;
  line-height: 1.8;
  color: #52695b;
}
.pd-notice-intro p {
  margin: 4px 0;
}
.pd-shell a {
  color: #24765d;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pd-filterbar {
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.pd-notice-list {
  display: grid;
  gap: 12px;
}
.pd-notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
}
.pd-notice h3 {
  font-size: 14px;
}
.pd-notice-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #eef4ef;
  color: #24765d;
}
.pd-notice-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
  color: #52615d;
  line-height: 1.8;
  margin: 8px 0;
}
.pd-notice a {
  font-size: 12px;
  margin-left: 10px;
}
.pd-dialog {
  border: 1px solid #e0e7e1;
  border-radius: 18px;
  box-shadow: 0 20px 80px #142c2833;
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  padding: 0;
  color: #19262c;
  background: #fff;
  box-sizing: border-box;
}
.pd-dialog::backdrop {
  background: #19262c77;
}
.pd-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  position: sticky;
  top: 0;
  background: white;
  z-index: 2;
  border-bottom: 1px solid #eef1ee;
}
.pd-dialog h2 {
  font-size: 19px;
  margin: 0;
}
.pd-dialog header button {
  background: none;
  border: 0;
  font-size: 26px;
  cursor: pointer;
  min-width: 40px;
  height: 40px;
}
.pd-dialog > div {
  padding: 24px;
}
.pd-detail-position {
  margin: 20px 0;
  border-bottom: 1px solid #eef1ee;
  padding-bottom: 16px;
}
.pd-detail-position h3 {
  font-size: 15px;
}
.pd-detail-position dl {
  margin: 16px 0;
}
.pd-detail-position dl > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  margin: 10px 0;
}
.pd-detail-position dt {
  color: #738087;
}
.pd-detail-position dd {
  margin: 0;
}
@media (max-width: 950px) {
  .pd-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pd-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 0;
  }
  .pd-stats > div:nth-child(2) {
    border: 0;
  }
  .pd-split {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 600px) {
  body[data-mode="paper"] .view-mine .mine,
  .pd-shell {
    padding: 26px 18px 50px;
  }
  .pd-heading {
    align-items: flex-start;
    gap: 12px;
  }
  .pd-heading h2,
  body[data-mode="paper"] .view-mine .paper-title {
    font-size: 27px;
  }
  .pd-heading p {
    font-size: 12px;
  }
  .pd-heading .pd-btn {
    font-size: 11px;
    padding: 8px 10px;
  }
  .pd-stats {
    padding: 20px 0;
  }
  .pd-stats > div {
    padding: 0 14px;
  }
  .pd-stats strong {
    font-size: clamp(15px, 4.8vw, 22px);
  }
  .pd-stats small {
    font-size: 10px;
  }
  .pd-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .pd-card {
    padding: 20px;
  }
  .pd-transactions {
    padding: 0;
  }
  .pd-transactions > .pd-section-head {
    padding: 18px;
  }
  .pd-scroll th,
  .pd-scroll td {
    padding: 14px 18px;
  }
  .pd-section-head h3 {
    font-size: 15px;
  }
  .pd-card-top {
    gap: 8px;
  }
  .pd-logo {
    width: 32px;
    height: 32px;
  }
  .pd-notice {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
  }
  .pd-notice > .pd-badge {
    grid-column: 2;
    justify-self: start;
  }
  .pd-dialog > div {
    padding: 18px;
  }
  .pd-dialog header {
    padding: 14px 18px;
  }
  .pd-chart-value {
    font-size: 23px;
  }
  .pd-notice-intro {
    padding: 14px;
  }
  .pd-grid .pd-empty {
    grid-column: 1/-1;
  }
}

body[data-mode="paper"] #view-mine,
body[data-mode="paper"] #view-notifications {
  max-width: 1140px;
  padding: 0 0 64px;
}
.pd-stats strong {
  white-space: nowrap;
}
.pd-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

@media (max-width: 600px) {
  .pd-stats strong.pd-stat-long {
    font-size: 12px;
  }
}
