:root {
  --base-font-size: 14px;
  --navy-950: #091747;
  --navy-900: #0e2268;
  --navy-800: #142d85;
  --navy-700: #2343a3;
  --teal-700: #142d85;
  --teal-600: #2343a3;
  --teal-100: #dce5ff;
  --teal-50: #f2f5ff;
  --amber-500: #e8a83e;
  --amber-100: #fef3c7;
  --red-600: #dc2626;
  --red-50: #fef2f2;
  --ink: #17212b;
  --muted: #66788a;
  --line: #d9e2ec;
  --line-strong: #bcccdc;
  --surface: #ffffff;
  --surface-soft: #f5f8fb;
  --page: #edf3f7;
  --shadow: 0 18px 45px rgba(16, 42, 67, 0.1);
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --font:
    Pretendard, "Pretendard Variable", "Noto Sans KR", "Malgun Gothic",
    system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page);
  font-size: var(--base-font-size);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 0%, rgba(20, 45, 133, 0.09), transparent 28%),
    var(--page);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
}

button,
input,
select {
  font: inherit;
}

button,
select,
label[for] {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
.upload-zone:focus-within {
  outline: 3px solid rgba(35, 67, 163, 0.24);
  outline-offset: 2px;
}

body.locked {
  overflow: hidden;
}

.lock-screen {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(11, 31, 51, 0.97), rgba(23, 63, 95, 0.94)),
    var(--navy-950);
}

.lock-panel {
  width: min(440px, 100%);
  padding: 42px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 26px;
  color: white;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
}

.brand-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  margin-bottom: 20px;
  border-radius: 16px;
  color: var(--navy-950);
  background: linear-gradient(145deg, #f8cf78, var(--amber-500));
  box-shadow: 0 10px 25px rgba(232, 168, 62, 0.25);
  font-family: Georgia, serif;
  font-size: 2.1429rem;
  font-weight: 800;
}

.brand-mark.small {
  width: 42px;
  height: 42px;
  margin: 0;
  border-radius: 13px;
  font-size: 1.7143rem;
}

.brand-mark.brand-logo {
  width: 112px;
  height: 42px;
  margin: 0;
  border-radius: 12px;
  padding: 6px 8px;
  background: white;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.brand-logo-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--teal-600);
  font-size: 0.7857rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.lock-panel .eyebrow {
  color: #d1d9ff;
}

.lock-panel h1 {
  margin: 0;
  font-size: clamp(2rem, 8vw, 2.7143rem);
  letter-spacing: -0.04em;
}

.lock-copy {
  margin: 12px 0 28px;
  color: rgba(255, 255, 255, 0.72);
}

.unlock-form label {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.8571rem;
  font-weight: 700;
}

.password-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.password-row input {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.password-row input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.password-row button {
  border: 0;
  border-radius: 11px;
  padding: 0 18px;
  color: var(--navy-950);
  background: #f4c968;
  font-weight: 800;
}

.form-error {
  min-height: 21px;
  margin: 8px 0 0;
  color: #fecaca;
  font-size: 0.8571rem;
}

.app-shell {
  min-height: 100vh;
  opacity: 1;
  transition: opacity 180ms ease;
}

.global-notice-banner {
  display: none;
  width: min(1480px, calc(100% - 40px));
  max-width: 1480px;
  margin: 16px auto 0;
  padding: 12px 20px;
  border: 1px solid #bfd3ff;
  border-radius: 12px;
  background: #e8f3ff;
  color: #142d85;
  font-weight: 700;
  text-align: center;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 767px) {
  .global-notice-banner.show-mobile { display: block; }
}
@media (min-width: 768px) {
  .global-notice-banner.show-pc { display: block; }
}

.global-notice-banner[hidden] { display: none; }

body.locked .app-shell,
body.access-denied .app-shell,
body.maintenance-active .app-shell {
  visibility: hidden;
  opacity: 0;
}

body.access-pending .app-shell {
  visibility: hidden;
  pointer-events: none;
  user-select: none;
}

body.employee-locked .app-shell { display: none; }
.employee-access-screen { position: fixed; inset: 0; z-index: 1300; display: grid; place-items: center; padding: 24px; background: #f4f6fa; overflow-y: auto; }
.employee-access-screen[hidden] { display: none; }
.employee-access-card { width: min(100%, 380px); padding: 32px 28px; border: 1px solid #e5e8eb; border-radius: 18px; background: #fff; box-shadow: 0 12px 40px #142d8510; }
.employee-access-card h1 { margin: 0 0 28px; color: #142d85; font-size: 1.5rem; text-align: center; }
.employee-access-card input { width: 100%; min-height: 48px; box-sizing: border-box; padding: 12px; border: 1px solid #d1d9e4; border-radius: 10px; font-size: 16px; }
.employee-access-card input:focus-visible { outline: 2px solid #3182f6; outline-offset: 2px; }
.employee-access-card button { width: 100%; min-height: 46px; }
.employee-access-error { min-height: 1.5em; margin: 10px 0 16px; color: #dc2626; font-size: .95rem; }
.employee-access-card button:disabled { opacity: .65; cursor: wait; }
.employee-access-card .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

.app-header {
  position: sticky;
  z-index: 50;
  top: 0;
  color: white;
  background: rgba(20, 45, 133, 0.98);
  box-shadow: 0 8px 28px rgba(11, 31, 51, 0.15);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  width: min(1480px, calc(100% - 40px));
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
}

.brand,
.header-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
}

.brand h1 {
  margin: 0;
  font-size: 1.4286rem;
  letter-spacing: -0.025em;
}

.brand .eyebrow {
  color: #c4d0ff;
}

.header-actions {
  gap: 10px;
}

.status-pill,
.count-badge {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 0.8571rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill.neutral {
  color: #c8d7e5;
  background: rgba(255, 255, 255, 0.08);
}

.status-pill.ok {
  color: #dce5ff;
  background: rgba(35, 67, 163, 0.2);
}

.status-pill.warn {
  color: #fde68a;
  background: rgba(232, 168, 62, 0.18);
}

.main {
  width: min(1480px, calc(100% - 40px));
  margin: 28px auto 54px;
}

.control-card,
.result-card {
  border: 1px solid rgba(188, 204, 220, 0.88);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.control-card {
  padding: 26px;
}

.result-card {
  margin-top: 20px;
  overflow: hidden;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 3px 0 0;
  color: var(--navy-900);
  font-size: clamp(1.4286rem, 2vw, 1.8571rem);
  letter-spacing: -0.035em;
}

.setup-title-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.version-check-row {
  display: flex;
  align-items: center;
  justify-content: center;
}

.version-check-status {
  display: inline-flex;
  min-width: 142px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 1.1429rem;
  font-weight: 850;
  line-height: 1.35;
  text-align: center;
}

.version-check-status.neutral {
  color: #607286;
  background: #e9f0f5;
}

.version-check-status.latest {
  color: #142d85;
  background: #e4eaff;
}

.version-check-status.update {
  color: #9a5b00;
  background: #fff1c2;
}

.version-check-status.error {
  color: #7c5b21;
  background: #f5eee1;
}

.section-heading p {
  margin: 7px 0 0;
  color: var(--muted);
}

.step-label {
  color: var(--teal-700);
  font-size: 0.7857rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.setup-step-label {
  font-size: clamp(1.4286rem, 2vw, 1.8571rem);
  letter-spacing: -0.035em;
}

.control-grid {
  display: grid;
  grid-template-columns: minmax(560px, 1.25fr) minmax(340px, 0.75fr);
  gap: 18px;
}

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

.embedded-rules-card {
  display: grid;
  min-height: 190px;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  border: 1px solid #aab9e8;
  border-radius: var(--radius-md);
  padding: 22px 24px;
  background:
    linear-gradient(145deg, rgba(35, 67, 163, 0.08), rgba(35, 67, 163, 0.04)),
    #fafbff;
}

.embedded-rules-icon {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  align-self: center;
  border-radius: 22px;
  color: white;
  background: linear-gradient(145deg, var(--teal-700), var(--navy-700));
  font-size: 2.7143rem;
  font-weight: 900;
}

.embedded-rules-content {
  min-width: 0;
}

.embedded-rules-title {
  margin: 0 0 20px;
  color: var(--navy-900);
  font-size: clamp(1.4286rem, 2vw, 1.8571rem);
  letter-spacing: -0.035em;
}

.embedded-rules-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.embedded-rules-list > div {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.embedded-rules-list dt {
  color: var(--navy-800);
  font-size: 1rem;
  font-weight: 900;
}

.embedded-rules-list dd {
  min-width: 0;
  margin: 0;
  color: #425466;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.upload-zone {
  position: relative;
  display: flex;
  min-height: 190px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 1.5px dashed #8db4c8;
  border-radius: var(--radius-md);
  padding: 22px 16px 18px;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(20, 45, 133, 0.04), rgba(35, 67, 163, 0.05)),
    var(--surface-soft);
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

button.upload-zone {
  width: 100%;
  appearance: none;
  font-family: inherit;
}

.upload-zone:hover,
.upload-zone.is-dragging {
  border-color: var(--teal-600);
  background: var(--teal-50);
  transform: translateY(-1px);
}

.upload-zone.has-file {
  border-style: solid;
  border-color: var(--teal-600);
  background: var(--teal-50);
}

.auto-upload-zone {
  border-style: solid;
  border-color: #aab9e8;
  background:
    linear-gradient(145deg, rgba(35, 67, 163, 0.08), rgba(35, 67, 163, 0.04)),
    #fafbff;
}

.auto-upload-zone .upload-icon {
  background: linear-gradient(145deg, var(--teal-700), var(--navy-700));
}

.auto-upload-zone[data-state="permission"] {
  border-color: #e6bd63;
  background: #fffbeb;
}

.auto-upload-zone[data-state="error"],
.auto-upload-zone[data-state="unsupported"] {
  border-color: #d6b4b4;
  background: #fffafa;
}

.upload-zone.is-loading {
  cursor: wait;
  pointer-events: none;
}

.upload-zone.is-loading .upload-icon {
  animation: upload-pulse 900ms ease-in-out infinite alternate;
}

@keyframes upload-pulse {
  from {
    opacity: 0.55;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1.04);
  }
}

.upload-method-tag {
  position: absolute;
  top: 11px;
  right: 11px;
  border-radius: 999px;
  padding: 3px 7px;
  color: var(--navy-700);
  background: #e6eef5;
  font-size: 0.6429rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.auto-upload-zone .upload-method-tag {
  color: var(--teal-700);
  background: #e4eaff;
}

.auto-upload-renewal-note {
  display: block;
  margin-top: 8px;
  color: #627789;
  font-size: 0.6429rem;
  font-weight: 750;
  line-height: 1.4;
}

.direct-file-picker {
  cursor: pointer;
}

.direct-file-picker .upload-icon {
  background: var(--navy-700);
}

.upload-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 14px;
  color: white;
  background: var(--teal-700);
  font-size: 1.7857rem;
  font-weight: 500;
}

.upload-title {
  color: var(--navy-900);
  font-size: 1.0714rem;
  font-weight: 850;
}

.upload-copy {
  max-width: 100%;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.8571rem;
  overflow-wrap: anywhere;
}

.upload-format {
  margin-top: 14px;
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--navy-700);
  background: #e6eef5;
  font-size: 0.7143rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.settings-panel {
  display: flex;
  justify-content: center;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  background: var(--surface);
}

.field {
  display: block;
}

.field > span:first-child {
  display: block;
  margin-bottom: 7px;
  color: #425466;
  font-size: 0.8571rem;
  font-weight: 800;
}

input,
select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  padding: 0 12px;
  color: var(--ink);
  background: white;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

input:hover,
select:hover {
  border-color: #8da4b8;
}

input:focus,
select:focus {
  border-color: var(--teal-600);
  box-shadow: 0 0 0 3px rgba(35, 67, 163, 0.1);
  outline: 0;
}

select:disabled {
  cursor: not-allowed;
  color: #8a99a8;
  background: #f3f6f8;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 14px;
}

.suffix-input {
  position: relative;
}

.suffix-input input {
  padding-right: 38px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.suffix-input > span {
  position: absolute;
  top: 50%;
  right: 13px;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 0.8571rem;
  font-weight: 800;
}

.currency-input input {
  padding-right: 42px;
  letter-spacing: 0.01em;
}

.hint-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  border-radius: 10px;
  padding: 11px 12px;
  color: #476070;
  background: #f2f7fa;
  font-size: 0.7857rem;
}

.hint-box p {
  margin: 0;
}

.hint-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--teal-600);
}

.recognition-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
}

.recognition-summary.is-empty {
  opacity: 0.66;
}

.summary-item {
  padding: 12px 14px;
  background: #f9fbfc;
}

.summary-item span,
.summary-item strong {
  display: block;
}

.summary-item span {
  color: var(--muted);
  font-size: 0.7143rem;
  font-weight: 700;
}

.summary-item strong {
  margin-top: 2px;
  overflow: hidden;
  color: var(--navy-900);
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-heading {
  align-items: center;
  margin: 0;
  padding: 24px 26px 20px;
}

.result-title-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

#result-title {
  margin: 0;
  line-height: 36px;
}

.strategy-lookup-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  align-self: center;
  gap: 6px;
  border: 1px solid #aab9e8;
  border-radius: 10px;
  padding: 6px 11px;
  color: var(--teal-700);
  background: var(--teal-50);
  font-size: 0.7857rem;
  font-weight: 850;
  white-space: nowrap;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    transform 150ms ease;
}

.strategy-lookup-button:hover,
.strategy-lookup-button:focus-visible {
  border-color: var(--teal-600);
  background: #e9edff;
  transform: translateY(-1px);
}

.strategy-lookup-button:disabled {
  border-color: #d8e0e6;
  color: #91a0ad;
  background: #f4f7f9;
  transform: none;
  cursor: default;
}

.strategy-lookup-icon {
  font-size: 1.2857rem;
  font-weight: 500;
  line-height: 1;
}

.reference-download-links {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  align-self: center;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.reference-download-link {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  color: var(--teal-700);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: underline;
  text-decoration-color: #aab9e8;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.reference-download-link:hover,
.reference-download-link:focus-visible {
  color: var(--navy-900);
  text-decoration-color: currentColor;
}

.reference-download-link.is-loading,
.reference-download-link.is-unavailable {
  color: #91a0ad;
  text-decoration-color: #cbd4db;
  cursor: default;
}

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

.count-badge {
  color: var(--teal-700);
  background: var(--teal-100);
}

.ghost-button,
.secondary-button,
.primary-button,
.text-button {
  border: 0;
  border-radius: 10px;
  padding: 9px 13px;
  font-weight: 800;
  transition:
    transform 140ms ease,
    background 140ms ease,
    border-color 140ms ease;
}

.ghost-button:hover,
.secondary-button:hover,
.primary-button:hover,
.text-button:hover {
  transform: translateY(-1px);
}

.ghost-button {
  color: #d8e5ef;
  background: rgba(255, 255, 255, 0.08);
}

.modal-actions .ghost-button {
  color: var(--navy-700);
  background: #eef3f7;
}

.secondary-button {
  border: 1px solid var(--line-strong);
  color: var(--navy-700);
  background: white;
}

.primary-button {
  color: white;
  background: var(--teal-700);
}

.text-button {
  padding-right: 4px;
  color: var(--teal-700);
  background: transparent;
}

.tier-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  padding: 12px 26px;
  background: #f8fafc;
}

.tier-tab {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--muted);
  background: white;
  font-size: 0.8571rem;
  font-weight: 800;
}

.tier-tab.active {
  border-color: var(--navy-800);
  color: white;
  background: var(--navy-800);
}

.empty-state {
  display: grid;
  min-height: 330px;
  place-items: center;
  align-content: center;
  border-top: 1px solid var(--line);
  padding: 44px 20px;
  text-align: center;
  background: linear-gradient(180deg, #fff, #f9fbfc);
}

.empty-visual {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 18px;
  color: var(--navy-700);
  background: #e4edf3;
  font-size: 2.0714rem;
}

.empty-state h3 {
  margin: 0;
  color: var(--navy-900);
  font-size: 1.2857rem;
}

.empty-state p {
  max-width: 480px;
  margin: 7px 0 0;
  color: var(--muted);
}

.table-wrap {
  max-height: 66vh;
  overflow: auto;
  margin: 0 24px 26px;
  border: 1px solid #d8dee3;
  border-radius: 10px;
  padding: 22px 24px 24px;
  background: #fff;
}

.fee-table {
  width: 100%;
  min-width: 860px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  color: #111827;
  background: white;
  border-top: 1px solid #c9c0a2;
  border-left: 1px solid #c9c0a2;
}

.fee-table th,
.fee-table td {
  height: 36px;
  border-right: 1px solid #c9c0a2;
  border-bottom: 1px solid #c9c0a2;
  padding: 4px 6px;
  text-align: center;
  vertical-align: middle;
}

.fee-table th:last-child,
.fee-table td:last-child {
  border-right: 0;
}

.fee-table thead th {
  position: sticky;
  z-index: 4;
  top: 0;
  height: 36px;
  color: #111827;
  background: #efede2;
  font-size: 0.9286rem;
  font-weight: 850;
  text-align: center;
  white-space: nowrap;
}

.fee-table thead .company-table-title {
  top: 0;
  height: 30px;
  background: #e8e5d7;
  font-size: 0.8571rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.fee-table thead .period-title-row th {
  top: 30px;
  height: 38px;
}

.fee-table thead .combined-period {
  line-height: 1.25;
}

.fee-table thead .company-title-row .group-column,
.fee-table thead .company-title-row .product-column {
  top: 0;
  height: 68px;
}

.fee-table tbody tr {
  background: white;
  transition: background 120ms ease;
}

.fee-table tbody tr:hover {
  background: #fffdf6;
}

.fee-table tbody tr.is-calculated {
  background: #ecf8f0;
}

.fee-table tbody tr.is-calculated:hover {
  background: #e4f4ea;
}

.fee-table tbody tr.is-calculated > td {
  background: #ecf8f0;
  font-size: 1rem;
}

.fee-table tbody tr.is-calculated:hover > td {
  background: #e4f4ea;
}

.fee-table .group-column {
  width: 130px;
  min-width: 130px;
  max-width: 130px;
}

.fee-table .product-column {
  width: 160px;
  min-width: 160px;
  max-width: 160px;
}

.fee-table .total-column {
  width: 92px;
}

.fee-table .summary-column {
  width: 82px;
  background: #fff5a8;
}

.group-cell {
  position: sticky;
  z-index: 3;
  left: 0;
  width: 130px;
  min-width: 130px;
  max-width: 130px;
  color: #111827;
  border-right: 1px solid #c9c0a2 !important;
  padding: 12px 14px !important;
  background: #fff !important;
  text-align: center !important;
  line-height: 1.4;
}

.group-tier,
.group-name {
  display: block;
}

.group-tier {
  margin-bottom: 7px;
  color: var(--teal-700);
  font-size: 0.7143rem;
  font-weight: 850;
  letter-spacing: -0.01em;
}

.group-name {
  color: #111827;
  font-size: 0.7857rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.product-cell {
  position: sticky;
  z-index: 3;
  left: 0;
  width: 160px;
  min-width: 160px;
  max-width: 160px;
  border-right: 2px solid #b1a783 !important;
  box-shadow: 7px 0 10px -12px rgba(61, 54, 33, 0.8);
  padding: 2px 5px !important;
  background: #fff !important;
  text-align: center !important;
  vertical-align: middle !important;
}

.fee-table thead .group-column {
  left: 0;
  z-index: 6;
}

.fee-table thead .product-column {
  left: 0;
  z-index: 6;
  border-right: 2px solid #9f9573;
}

/* 머리글의 세로 고정을 해제해 100% 확대 스크롤에서도 본문 행을 덮지 않게 한다. */
.fee-table thead {
  position: static;
  z-index: 5;
  top: auto;
}

.fee-table thead th {
  position: static;
  top: auto;
}

.fee-table thead .product-column {
  position: static;
  top: auto;
  left: auto;
  vertical-align: middle;
}

.fee-table tbody tr.is-calculated .product-cell {
  background: #e7f6ec !important;
}

.fee-table tbody tr.is-calculated:hover .product-cell {
  background: #ddf1e4 !important;
}

.product-button {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 38px;
  place-items: center;
  border: 0;
  border-radius: 9px;
  padding: 6px 8px;
  color: #111827;
  background: transparent;
  text-align: center;
  font-size: 0.7857rem;
  font-weight: 750;
}

.product-button:hover {
  background: rgba(20, 45, 133, 0.08);
}

.product-button .edit-label {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  color: var(--teal-700);
  font-size: 0.7143rem;
  opacity: 0;
  transition: opacity 120ms ease;
}

.product-button:hover .edit-label,
.product-button.has-rates .edit-label {
  opacity: 1;
}

.product-button.has-rates::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 10px;
  width: 7px;
  height: 7px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--teal-600);
}

.product-button .product-name {
  display: block;
  width: 100%;
  line-height: 1.3;
  text-align: center;
}

.product-button.has-rates .product-name {
  padding: 0 30px;
}

.nonlife-product-name {
  display: grid;
  width: 100%;
  min-height: 38px;
  place-items: center;
  padding: 6px 8px;
  color: #111827;
  font-size: 0.7857rem;
  font-weight: 750;
  line-height: 1.3;
  text-align: center;
  overflow-wrap: anywhere;
}

.value-cell {
  text-align: center !important;
  font-variant-numeric: tabular-nums;
}

.value-cell .value {
  display: block;
  color: #111827;
  font-size: 1rem;
  font-weight: 700;
}

.summary-start {
  border-left: 2px solid #d2c44e !important;
}

.summary-cell {
  background: #fffbe0;
  text-align: center !important;
  font-size: 0.7857rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.fee-table tbody tr.is-calculated > .summary-cell {
  background: #e5f5db;
}

.fee-table tbody tr.is-calculated:hover > .summary-cell {
  background: #dcefd2;
}

.value-cell .source {
  display: block;
  margin-top: 2px;
  color: #8a99a8;
  font-size: 0.6429rem;
}

.value-cell.is-empty {
  color: #9aa8b5;
  text-align: center;
}

.value-cell.is-warning {
  color: #a16207;
  background: #fffbeb;
}

.total-cell {
  color: #111827;
  background: #f5f2e8;
  text-align: center !important;
  font-variant-numeric: tabular-nums;
  font-size: 0.7857rem;
  font-weight: 900;
}

.result-rate {
  display: block;
}

.monthly-premium-result {
  display: block;
  margin-top: 5px;
  border-top: 1px solid rgba(97, 112, 127, 0.2);
  padding-top: 4px;
  color: #4b6479;
  font-size: 0.5714rem;
  font-weight: 750;
  line-height: 1.35;
  white-space: nowrap;
}

.monthly-premium-result strong {
  display: block;
  margin-top: 1px;
  color: #142d85;
  font-size: 0.6429rem;
  font-weight: 900;
}

.rule-details {
  border-top: 1px solid var(--line);
  background: #fbfcfd;
}

.rule-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 26px;
  color: var(--navy-800);
  cursor: pointer;
  font-size: 0.8571rem;
  font-weight: 850;
  list-style: none;
}

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

.rule-details summary::after {
  content: "+";
  margin-left: 10px;
  font-size: 1.2857rem;
}

.rule-details[open] summary::after {
  content: "−";
}

.rule-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 16px 26px 22px;
}

.rule-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: white;
}

.rule-item strong,
.rule-item span {
  display: block;
}

.rule-item strong {
  color: var(--navy-900);
  font-size: 0.7857rem;
}

.rule-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.7143rem;
}

.rule-item.warn {
  border-color: #f5d48b;
  background: #fffdf5;
}

.footnote {
  margin: 16px 3px 0;
  color: #728394;
  font-size: 0.7143rem;
  text-align: center;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  z-index: 900;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 31, 51, 0.62);
  backdrop-filter: blur(4px);
}

.modal-panel {
  position: relative;
  width: min(620px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border-radius: 22px;
  padding: 26px;
  background: white;
  box-shadow: 0 28px 80px rgba(11, 31, 51, 0.26);
}

.startup-check-modal {
  z-index: 1100;
}

.access-denied-screen {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 24px;
  background: #fff;
}

.access-denied-screen[hidden] {
  display: none;
}
.maintenance-screen { position: fixed; z-index: 1200; inset: 0; display: grid; place-items: center; padding: 24px; background: #fff; color: #142d85; font-size: clamp(1.25rem, 3vw, 1.8rem); font-weight: 800; text-align: center; }
.maintenance-screen[hidden], .maintenance-admin-badge[hidden] { display: none; }
.maintenance-admin-badge { padding: 6px 10px; border: 1px solid #f5c77b; border-radius: 8px; background: #fff7e8; color: #805500; font-size: .75rem; font-weight: 800; }

.access-denied-message {
  margin: 0;
  color: #dc2626;
  font-size: clamp(1.4286rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1.5;
  text-align: center;
}

.access-denied-screen button {
  min-width: 120px;
}

.startup-check-panel {
  width: min(650px, 100%);
  padding: 36px 36px 30px;
  text-align: center;
}

.startup-check-symbol {
  position: relative;
  display: grid;
  width: 70px;
  height: 70px;
  margin: 0 auto 18px;
  place-items: center;
  border-radius: 24px;
  background: linear-gradient(145deg, #e8edff, #e9f1f8);
}

.startup-check-symbol::before,
.startup-check-symbol::after {
  position: absolute;
  content: "";
  border-radius: 50%;
}

.startup-check-symbol::before {
  width: 31px;
  height: 31px;
  border: 4px solid rgba(20, 45, 133, 0.2);
  border-top-color: var(--teal-700);
  animation: startup-check-spin 0.9s linear infinite;
}

.startup-check-symbol::after {
  width: 7px;
  height: 7px;
  background: var(--teal-700);
}

.startup-check-symbol.is-complete::before {
  top: 50%;
  left: 50%;
  width: 18px;
  height: 10px;
  border: 0;
  border-right: 4px solid #142d85;
  border-bottom: 4px solid #142d85;
  border-radius: 0;
  transform: translate(-50%, -62%) rotate(45deg);
  transform-origin: center;
  animation: none;
}

.startup-check-symbol.is-complete::after {
  display: none;
}

.startup-check-symbol.is-error::before {
  width: auto;
  height: auto;
  border: 0;
  color: #b33a3a;
  content: "!";
  font-size: 2.4286rem;
  font-weight: 900;
  animation: none;
}

.startup-check-symbol.is-error::after {
  display: none;
}

@keyframes startup-check-spin {
  to {
    transform: rotate(360deg);
  }
}

.startup-check-panel h2 {
  margin: 4px 0 8px;
  color: var(--navy-900);
  font-size: clamp(1.6429rem, 3vw, 2.0714rem);
  letter-spacing: -0.04em;
}

.startup-check-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.9286rem;
  line-height: 1.6;
}

.startup-check-list {
  display: grid;
  gap: 10px;
  margin: 26px 0 18px;
  padding: 0;
  list-style: none;
  text-align: left;
}

.startup-check-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 67px;
  border: 1px solid #dbe5ed;
  border-radius: 16px;
  padding: 11px 14px;
  color: #768698;
  background: #f7f9fb;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.startup-check-item.is-active {
  border-color: #8ea5e5;
  color: var(--navy-800);
  background: #f5f7ff;
}

.startup-check-item.is-success {
  border-color: #b6c4ee;
  color: var(--navy-800);
  background: #f5f7ff;
}

.startup-check-item.is-warning {
  border-color: #ebc879;
  color: var(--navy-800);
  background: #fff9e9;
}

.startup-check-item.is-error {
  border-color: #e6b1b1;
  color: var(--navy-800);
  background: #fff5f5;
}

.startup-check-number {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  color: #708093;
  background: #e8eef3;
  font-size: 0.9286rem;
  font-weight: 900;
  line-height: 1;
}

.startup-check-item.is-active .startup-check-number {
  color: #fff;
  background: var(--teal-700);
}

.startup-check-item.is-success .startup-check-number {
  color: transparent;
  background: #1d3d9c;
  font-size: 0;
}

.startup-check-item.is-success .startup-check-number::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  content: "✓";
  font-size: 1.2143rem;
  font-weight: 900;
  line-height: 1;
}

.startup-check-item.is-warning .startup-check-number {
  color: #8b5b00;
  background: #fce8a9;
}

.startup-check-item.is-error .startup-check-number {
  color: #fff;
  background: #bd4b4b;
}

.startup-check-text {
  min-width: 0;
}

.startup-check-text strong,
.startup-check-text small {
  display: block;
}

.startup-check-text strong {
  color: inherit;
  font-size: 1rem;
}

.startup-check-text small {
  overflow: hidden;
  margin-top: 4px;
  color: #718094;
  font-size: 0.7857rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.startup-check-status {
  min-width: 82px;
  border-radius: 999px;
  padding: 7px 11px;
  color: #738194;
  background: #e9eef3;
  font-size: 0.7857rem;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
}

.startup-check-item.is-active .startup-check-status {
  color: #142d85;
  background: #e2e8ff;
}

.startup-check-item.is-success .startup-check-status {
  color: #142d85;
  background: #e2e8ff;
}

.startup-check-item.is-warning .startup-check-status {
  color: #8b5b00;
  background: #fce8a9;
}

.startup-check-item.is-error .startup-check-status {
  color: #a23838;
  background: #f8dddd;
}

.startup-progress {
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: #e6edf2;
}

.startup-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal-700), #4868bf);
  transition: width 280ms ease;
}

.startup-check-summary {
  min-height: 22px;
  margin: 13px 0 0;
  color: #526274;
  font-size: 0.8571rem;
  font-weight: 750;
}

.startup-check-summary.is-success {
  color: #142d85;
}

.startup-check-summary.is-error {
  color: #ad3d3d;
}

.startup-check-actions {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 20px;
}

.startup-check-actions button {
  min-width: 150px;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.modal-header h2 {
  margin: 0;
  color: var(--navy-900);
  font-size: 1.7143rem;
}

.modal-header p:last-child {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.8571rem;
}

.modal-close {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  flex: 0 0 auto;
  border: 0;
  border-radius: 10px;
  color: var(--navy-700);
  background: #eef3f7;
  font-size: 1.7143rem;
}

.update-modal-panel {
  width: min(520px, 100%);
  padding: 34px 32px 30px;
  text-align: center;
}

.update-modal-panel .modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
}

.update-modal-icon {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 18px;
  color: white;
  background: linear-gradient(145deg, var(--teal-600), var(--navy-700));
  font-size: 2rem;
  font-weight: 800;
}

.update-modal-panel h2 {
  margin: 0;
  color: var(--navy-900);
  font-size: 1.7857rem;
  letter-spacing: -0.035em;
}

.update-modal-copy {
  margin: 10px auto 20px;
  color: var(--muted);
  font-size: 0.9286rem;
  line-height: 1.7;
}

.update-version-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--line);
  text-align: left;
}

.update-version-list > div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  padding: 13px 15px;
  background: #f8fbfd;
}

.update-version-list dt {
  color: #5f7182;
  font-size: 0.8571rem;
  font-weight: 800;
}

.update-version-list dd {
  margin: 0;
  color: var(--navy-900);
  font-size: 0.8571rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.update-modal-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.update-modal-actions > * {
  min-width: 150px;
}

.update-download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.auto-upload-notice-panel {
  width: min(520px, 100%);
  overflow: hidden;
  padding: 34px 30px 28px;
  text-align: center;
}

.auto-upload-notice-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 17px;
  color: #9a6700;
  background: #fff3cd;
  box-shadow: inset 0 0 0 1px #efd189;
  font-size: 2rem;
  font-weight: 900;
}

.auto-upload-notice-icon.is-info {
  color: var(--teal-700);
  background: #e8edff;
  box-shadow: inset 0 0 0 1px #bdc9ef;
}

.auto-upload-notice-panel .eyebrow {
  margin-bottom: 5px;
}

.auto-upload-notice-panel h2 {
  margin: 0;
  color: var(--navy-900);
  font-size: 1.6429rem;
  letter-spacing: -0.035em;
}

.auto-upload-notice-copy {
  margin: 15px 0 0;
  color: #526779;
  font-size: 1rem;
  line-height: 1.8;
}

.auto-upload-notice-copy strong {
  color: #b45309;
}

.auto-upload-source-path {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid #c6d9e5;
  border-radius: 14px;
  color: #324c61;
  background: #f5f9fb;
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.8;
  word-break: keep-all;
}

.auto-upload-source-path strong {
  color: var(--teal-700);
}

.auto-upload-file-name {
  color: var(--navy-900);
  font-weight: 900;
}

.auto-upload-source-copy {
  margin-top: 11px;
  font-weight: 750;
}

.auto-upload-notice-copy.is-emphasized {
  margin-top: 20px;
  font-size: 1.2857rem;
  font-weight: 700;
  line-height: 1.75;
  word-break: keep-all;
}

.auto-upload-folder-picker-guide {
  margin: 18px 0 0;
  border: 1px solid #b8d8e2;
  border-radius: 14px;
  padding: 15px 16px;
  color: #385568;
  background: #f3fafb;
  font-size: 1.0714rem;
  font-weight: 750;
  line-height: 1.75;
  word-break: keep-all;
}

.auto-upload-folder-picker-guide strong {
  color: var(--teal-700);
  font-weight: 900;
}

.auto-upload-result-panel {
  width: min(560px, 100%);
  padding: 32px 30px 28px;
  text-align: center;
}

.auto-upload-result-panel h2 {
  margin: 0;
  color: var(--navy-900);
  font-size: 1.6429rem;
  letter-spacing: -0.035em;
}

.auto-upload-result-directory {
  margin: 12px 0 0;
  color: #5d7182;
  font-size: 0.9286rem;
  font-weight: 800;
}

.auto-upload-result-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
  text-align: left;
}

.auto-upload-result-row {
  display: grid;
  grid-template-columns: 26px 72px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border: 1px solid #c4cff0;
  border-radius: 13px;
  padding: 13px 14px;
  color: var(--navy-900);
  background: #f5f7ff;
}

.auto-upload-result-row.is-missing {
  border-color: #efc6c6;
  background: #fff6f6;
}

.auto-upload-result-status {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--teal-700);
  font-size: 0.9286rem;
  font-weight: 900;
}

.auto-upload-result-row.is-missing .auto-upload-result-status {
  background: #c24141;
}

.auto-upload-result-label {
  color: var(--teal-700);
  font-size: 0.8571rem;
  font-weight: 900;
}

.auto-upload-result-row strong {
  overflow: hidden;
  font-size: 0.8571rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auto-upload-result-row.is-missing strong {
  color: #b33a3a;
}

.auto-upload-result-summary {
  margin: 18px 0 0;
  color: #3e596b;
  font-size: 1rem;
  font-weight: 800;
}

.auto-upload-result-actions {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

.direct-upload-notice-panel {
  width: min(540px, 100%);
  padding: 34px 30px 28px;
  text-align: center;
}

.direct-upload-notice-panel h2 {
  margin: 0;
  color: var(--navy-900);
  font-size: 1.6429rem;
  letter-spacing: -0.035em;
}

.direct-upload-file-list {
  text-align: left;
}

.direct-upload-multiple-copy {
  margin: 16px 0 0;
  color: #4e6576;
  font-size: 1rem;
  font-weight: 750;
}

.direct-upload-multiple-copy strong {
  color: var(--teal-700);
  font-weight: 900;
}

.direct-upload-notice-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.auto-upload-notice-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.auto-upload-notice-actions .primary-button,
.auto-upload-notice-actions .secondary-button {
  min-width: 124px;
}

.auto-upload-notice-page[hidden],
.auto-upload-notice-actions [hidden] {
  display: none;
}

.auto-upload-notice-page-count {
  min-width: 42px;
  color: #6a7d8d;
  font-size: 0.8571rem;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.guide-panel {
  width: min(960px, 100%);
  overflow: hidden;
  padding: 0;
}

.guide-header {
  padding: 24px 26px 20px;
}

.guide-menu {
  display: grid;
  gap: 14px;
  padding: 4px 26px 28px;
}

.guide-menu-card {
  display: grid;
  grid-template-columns: 52px 1fr 36px;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 21px 22px;
  border: 1px solid #cbd9e4;
  border-radius: 17px;
  color: var(--navy-900);
  background: #f9fbfc;
  text-align: left;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.guide-menu-card:hover,
.guide-menu-card:focus-visible {
  border-color: var(--teal-600);
  background: var(--teal-50);
  box-shadow: 0 10px 24px rgba(20, 45, 133, 0.1);
  transform: translateY(-1px);
}

.guide-menu-number {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 16px;
  color: white;
  background: linear-gradient(145deg, var(--teal-700), var(--navy-700));
  font-size: 1.3571rem;
  font-weight: 900;
}

.guide-menu-copy {
  display: grid;
  gap: 6px;
}

.guide-menu-copy strong {
  font-size: 1.2143rem;
  letter-spacing: -0.025em;
}

.guide-menu-copy small {
  color: #6a7d8d;
  font-size: 0.8571rem;
  font-weight: 750;
}

.guide-menu-arrow {
  color: var(--teal-700);
  font-size: 1.6429rem;
  font-weight: 900;
  text-align: center;
}

.guide-menu[hidden],
.guide-view[hidden],
.guide-media[hidden] {
  display: none;
}

.guide-view-toolbar {
  padding: 0 26px 12px;
}

.guide-back {
  border: 0;
  color: var(--teal-700);
  background: transparent;
  font-size: 0.8571rem;
  font-weight: 850;
}

.guide-back:hover,
.guide-back:focus-visible {
  text-decoration: underline;
}

.guide-stage {
  margin: 0 26px;
  overflow: hidden;
  border: 1px solid #d4dee7;
  border-radius: 16px;
  background: #091747;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.guide-media {
  display: block;
  width: 100%;
  max-height: min(62vh, 650px);
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

.guide-video {
  background: #091747;
}

.guide-image {
  background: #f3f6f8;
}

.guide-navigation {
  display: grid;
  grid-template-columns: 48px minmax(78px, auto) 48px;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 18px 26px 24px;
}

.guide-arrow {
  display: grid;
  width: 48px;
  height: 42px;
  place-items: center;
  border: 1px solid #bed0df;
  border-radius: 12px;
  color: var(--navy-800);
  background: white;
  font-size: 1.5714rem;
  font-weight: 800;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    transform 150ms ease;
}

.guide-arrow:hover:not(:disabled),
.guide-arrow:focus-visible {
  border-color: var(--teal-600);
  background: var(--teal-50);
  transform: translateY(-1px);
}

.guide-arrow:disabled {
  cursor: not-allowed;
  opacity: 0.32;
}

.guide-page {
  min-width: 78px;
  color: var(--navy-800);
  font-size: 1rem;
  font-weight: 850;
  text-align: center;
  letter-spacing: 0.03em;
}

.strategy-modal-panel {
  display: flex;
  width: min(920px, 100%);
  max-height: min(780px, calc(100vh - 40px));
  overflow: hidden;
  flex-direction: column;
  padding: 0;
}

.strategy-modal-header {
  flex: 0 0 auto;
  padding: 24px 26px 18px;
}

.strategy-search-area {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
  border-top: 1px solid #edf2f6;
  padding: 16px 26px;
  background: #f8fbfc;
}

.strategy-search-box {
  position: relative;
  flex: 1;
}

.strategy-search-box input {
  height: 48px;
  padding: 0 46px 0 44px;
  border-color: #b9cad7;
  background: white;
  font-size: 0.9286rem;
}

.strategy-search-icon {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 15px;
  color: var(--teal-700);
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 1.5714rem;
  line-height: 1;
}

.strategy-search-clear {
  position: absolute;
  top: 50%;
  right: 10px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: #66788a;
  background: #eaf0f4;
  transform: translateY(-50%);
  font-size: 1.2857rem;
}

.strategy-search-clear[hidden] {
  display: none;
}

.strategy-result-count {
  min-width: 82px;
  color: var(--teal-700);
  font-size: 0.8571rem;
  font-weight: 850;
  text-align: right;
  white-space: nowrap;
}

.strategy-result-table {
  display: flex;
  min-height: 240px;
  overflow: hidden;
  flex: 1;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.strategy-result-head,
.strategy-result-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.7fr) minmax(100px, 0.55fr) minmax(280px, 2.2fr);
  align-items: center;
  gap: 14px;
}

.strategy-result-head {
  flex: 0 0 auto;
  padding: 11px 26px;
  color: #526779;
  background: #eef3f6;
  font-size: 0.7143rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.strategy-results {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.strategy-result-row {
  min-height: 53px;
  border-bottom: 1px solid #e7edf2;
  padding: 10px 26px;
  background: white;
  font-size: 0.8571rem;
}

.strategy-result-row:hover {
  background: #f7f8ff;
}

.strategy-company {
  color: var(--navy-800);
  font-weight: 850;
}

.strategy-tag {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--teal-700);
  background: #e8edff;
  font-size: 0.7143rem;
  font-weight: 850;
  white-space: nowrap;
}

.strategy-product {
  min-width: 0;
  color: #243746;
  overflow-wrap: anywhere;
}

.strategy-result-row mark {
  border-radius: 3px;
  padding: 0 1px;
  color: inherit;
  background: #fef3a8;
}

.strategy-empty-state {
  display: grid;
  min-height: 250px;
  place-items: center;
  align-content: center;
  padding: 36px;
  color: var(--muted);
  text-align: center;
}

.strategy-empty-state strong {
  margin-top: 8px;
  color: var(--navy-800);
  font-size: 1rem;
}

.strategy-empty-state p {
  max-width: 440px;
  margin: 5px 0 0;
  font-size: 0.7857rem;
}

.strategy-empty-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: var(--teal-700);
  background: var(--teal-50);
  font-size: 1.8571rem;
}

.conversion-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 24px;
}

.conversion-grid.is-single {
  grid-template-columns: 1fr;
}

.formula-preview {
  margin-top: 18px;
  border: 1px solid #cbd5f4;
  border-radius: 12px;
  padding: 13px 14px;
  color: #334c91;
  background: var(--teal-50);
  font-size: 0.7857rem;
}

.formula-preview:empty {
  display: none;
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}

.modal-actions > div {
  display: flex;
  gap: 8px;
}

.toast {
  position: fixed;
  z-index: 1100;
  right: 20px;
  bottom: 20px;
  max-width: min(390px, calc(100% - 40px));
  border-radius: 12px;
  padding: 12px 15px;
  color: white;
  background: var(--navy-900);
  box-shadow: 0 15px 35px rgba(11, 31, 51, 0.24);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition:
    opacity 150ms ease,
    transform 150ms ease;
  font-size: 0.8571rem;
  font-weight: 750;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  background: #991b1b;
}

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

  .upload-zone {
    min-height: 160px;
  }

  .embedded-rules-card {
    min-height: 0;
  }

  .recognition-summary {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .result-title-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }
}

@media (max-width: 620px) {
  .header-inner,
  .main {
    width: min(100% - 24px, 1480px);
  }

  .header-inner {
    min-height: 68px;
  }

  .brand .eyebrow,
  .status-pill {
    display: none;
  }

  .brand h1 {
    font-size: 1.2143rem;
  }

  .control-card {
    padding: 19px;
  }

  .upload-methods {
    grid-template-columns: 1fr;
  }

  .upload-zone {
    min-height: 155px;
  }

  .embedded-rules-card {
    grid-template-columns: 1fr;
    gap: 13px;
    padding: 19px;
  }

  .embedded-rules-icon,
  .version-check-row {
    justify-self: start;
  }

  .embedded-rules-list > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .section-heading {
    flex-direction: column;
  }

  .field-row,
  .conversion-grid {
    grid-template-columns: 1fr;
  }

  .recognition-summary {
    grid-template-columns: 1fr 1fr;
  }

  .result-heading {
    padding: 20px;
  }

  .table-wrap {
    margin: 0 12px 16px;
    padding: 12px;
  }

  .result-actions {
    width: 100%;
    justify-content: space-between;
  }

  .result-title-line {
    align-items: flex-start;
  }

  .modal-panel {
    padding: 20px;
  }

  .startup-check-panel {
    padding: 27px 18px 22px;
  }

  .startup-check-item {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
  }

  .startup-check-status {
    grid-column: 2;
    min-width: 0;
    justify-self: start;
  }

  .startup-check-text small {
    white-space: normal;
  }

  .startup-check-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .startup-check-actions button {
    width: 100%;
  }

  .guide-panel {
    padding: 0;
  }

  .guide-header {
    padding: 20px 20px 16px;
  }

  .guide-stage {
    margin: 0 12px;
    border-radius: 12px;
  }

  .guide-navigation {
    gap: 14px;
    padding: 16px 20px 20px;
  }

  .strategy-modal-panel {
    max-height: calc(100vh - 24px);
    padding: 0;
  }

  .strategy-modal-header {
    padding: 20px 20px 16px;
  }

  .strategy-search-area {
    align-items: stretch;
    flex-direction: column;
    gap: 7px;
    padding: 14px 16px;
  }

  .strategy-result-count {
    min-width: 0;
    text-align: left;
  }

  .strategy-result-head,
  .strategy-result-row {
    grid-template-columns: 90px 82px minmax(160px, 1fr);
    gap: 9px;
  }

  .strategy-result-head,
  .strategy-result-row {
    padding-right: 16px;
    padding-left: 16px;
  }

  .modal-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .modal-actions > div,
  .modal-actions button {
    flex: 1;
  }

  .modal-actions > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .lock-panel {
    padding: 30px 24px;
  }

  .password-row {
    grid-template-columns: 1fr;
  }

  .password-row button {
    min-height: 44px;
  }
}

@media print {
  .app-header,
  .control-card,
  .result-actions,
  .tier-tabs,
  .rule-details,
  .footnote {
    display: none !important;
  }

  body {
    background: white;
  }

  .main {
    width: 100%;
    margin: 0;
  }

  .result-card {
    border: 0;
    box-shadow: none;
  }

  .table-wrap {
    max-height: none;
    overflow: visible;
  }
}

.install-modal {
  z-index: 1300;
}

.install-panel {
  width: min(560px, 100%);
  padding: 38px 36px 32px;
  text-align: center;
}

.install-symbol {
  position: relative;
  display: grid;
  width: 76px;
  height: 76px;
  margin: 0 auto 18px;
  place-items: center;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(145deg, var(--teal-700), #3458b7);
  box-shadow: 0 14px 30px rgba(20, 45, 133, 0.22);
}

.install-symbol-screen {
  width: 39px;
  height: 29px;
  border: 3px solid currentColor;
  border-radius: 5px;
}

.install-symbol-screen::after {
  position: absolute;
  right: 23px;
  bottom: 15px;
  left: 23px;
  height: 3px;
  border-radius: 2px;
  background: currentColor;
  content: "";
}

.install-symbol-arrow {
  position: absolute;
  top: 22px;
  left: 50%;
  width: 24px;
  height: 24px;
  transform: translateX(-50%);
  border-radius: 50%;
  color: var(--teal-700);
  background: #fff;
  font-size: 1.3571rem;
  font-weight: 900;
  line-height: 22px;
}

.install-panel h2 {
  margin: 4px 0 10px;
  color: var(--navy-900);
  font-size: clamp(1.6429rem, 3vw, 2.0714rem);
  letter-spacing: -0.04em;
}

.install-copy {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
}

.install-benefit {
  display: grid;
  gap: 5px;
  margin-top: 22px;
  border: 1px solid #cbd5f4;
  border-radius: 16px;
  padding: 16px 18px;
  color: var(--navy-800);
  background: #f5f7ff;
  line-height: 1.55;
}

.install-benefit strong {
  font-size: 1rem;
  font-weight: 900;
}

.install-benefit span {
  color: #596b7e;
  font-size: 0.8571rem;
  font-weight: 700;
}

.install-status {
  min-height: 20px;
  margin: 15px 0 0;
  color: #596b7e;
  font-size: 0.8571rem;
  font-weight: 750;
  line-height: 1.6;
}

.install-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.install-actions button {
  min-width: 142px;
}

.suggestion-header-button {
  min-height: 38px;
  border: 1px solid #aab9e8;
  border-radius: 999px;
  padding: 0 17px;
  color: #142d85;
  background: #f2f5ff;
  font-size: 0.9286rem;
  font-weight: 850;
  cursor: pointer;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    transform 150ms ease;
}

.suggestion-header-button:hover,
.suggestion-header-button:focus-visible {
  border-color: #142d85;
  background: #dce5ff;
  transform: translateY(-1px);
}

.visitor-stats {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  overflow: hidden;
  border: 1px solid #c4cff0;
  border-radius: 999px;
  color: #334c91;
  background: #f7f8ff;
  font-size: 0.7857rem;
  font-weight: 800;
  white-space: nowrap;
}

.visitor-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 0 10px;
}

.visitor-stat + .visitor-stat {
  border-left: 1px solid #dce5ff;
}

.visitor-stat strong {
  color: #142d85;
  font-size: 0.9286rem;
  font-variant-numeric: tabular-nums;
}

.visitor-stats[data-state="pending"] strong {
  color: #7b879a;
}

.suggestion-modal {
  z-index: 1250;
}

.suggestion-panel {
  width: min(620px, 100%);
  padding: 34px 34px 30px;
}

/* PC 검색·입력 사이드바 위치 전환 */
.sidebar-position-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.reference-search-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.reference-search-heading .reference-search-title {
  min-width: 0;
  margin-bottom: 0;
}

.reference-search-heading .sidebar-position-toggle {
  min-height: 34px;
  flex: 0 0 auto;
  border-radius: 10px;
  padding: 0 10px;
  font-size: 0.7857rem;
}

@media (min-width: 1024px) {
  .main.sidebar-right {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 390px);
  }

  .main.sidebar-right > .control-card {
    grid-column: 2;
  }

  .main.sidebar-right > .reference-product-result,
  .main.sidebar-right > .result-card,
  .main.sidebar-right > .footnote {
    grid-column: 1;
  }
}

@media (max-width: 1023px) {
  .reference-search-heading .sidebar-position-toggle {
    display: none;
  }
}

.suggestion-panel h2 {
  margin: 4px 0 8px;
  color: var(--navy-900);
  font-size: 1.9286rem;
  letter-spacing: -0.04em;
}

.suggestion-close {
  position: absolute;
  top: 18px;
  right: 18px;
}

.suggestion-copy {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.9286rem;
  line-height: 1.7;
}

.suggestion-form {
  display: grid;
  gap: 17px;
}

.suggestion-field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.suggestion-field-row small {
  color: var(--muted);
  font-size: 0.7857rem;
  font-weight: 700;
}

.suggestion-content-field {
  position: relative;
}

.suggestion-content-field textarea {
  width: 100%;
  min-height: 170px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 15px 34px;
  color: var(--navy-900);
  background: #fff;
  font: inherit;
  font-size: 1rem;
  line-height: 1.65;
  outline: none;
}

.suggestion-content-field textarea:focus {
  border-color: #142d85;
  box-shadow: 0 0 0 3px rgba(20, 45, 133, 0.12);
}

.suggestion-character-count {
  position: absolute;
  right: 14px;
  bottom: 10px;
  color: var(--muted);
  font-size: 0.7857rem;
  font-weight: 750;
}

.suggestion-status {
  min-height: 20px;
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 0.8571rem;
  font-weight: 750;
  line-height: 1.55;
}

.suggestion-status.is-success {
  color: #142d85;
}

.suggestion-status.is-error {
  color: #b42318;
}

.suggestion-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.suggestion-actions button {
  min-width: 132px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.embedded-rules-card {
  min-height: 310px;
  align-content: center;
}

.reference-search-section {
  position: relative;
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  margin-top: 2px;
  padding: 16px 18px 14px;
  border: 1px solid rgba(20, 45, 133, 0.28);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 22px rgba(9, 23, 71, 0.06);
}

.reference-search-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

.reference-search-select-row {
  display: flex;
  width: 100%;
  min-width: 0;
  gap: 8px;
}

.reference-search-select-row > .reference-search-field {
  flex: 1 1 0;
  width: 0;
  min-width: 0;
}

.reference-search-field {
  display: grid;
  min-width: 0;
  gap: 7px;
  margin-bottom: 0;
  color: var(--navy-800);
  font-size: 0.8571rem;
  font-weight: 850;
}

.reference-search-field select,
.reference-search-field input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 13px;
  color: var(--navy-900);
  background: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 750;
  outline: none;
}

.reference-search-field select:focus,
.reference-search-field input:focus {
  border-color: #2343a3;
  box-shadow: 0 0 0 3px rgba(35, 67, 163, 0.12);
}

.reference-search-field select:disabled,
.reference-search-field input:disabled {
  color: #8b98aa;
  background: #f4f6fb;
  cursor: not-allowed;
}

.reference-combobox {
  position: relative;
  min-width: 0;
  overflow: visible;
}

.reference-product-field .reference-combobox > #reference-product-query {
  padding-right: 48px;
}

.reference-product-field #reference-product-query::-webkit-search-cancel-button {
  display: none;
}

.reference-combobox-toggle {
  position: absolute;
  top: 1px;
  right: 1px;
  display: flex;
  width: 42px;
  height: calc(100% - 2px);
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0 11px 11px 0;
  color: #4e5968;
  background: transparent;
  cursor: pointer;
}

.reference-combobox-toggle:disabled {
  color: #8b98aa;
  cursor: not-allowed;
}

.reference-combobox-toggle:focus-visible {
  outline: 2px solid #3182f6;
  outline-offset: -3px;
}

.reference-combobox-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.reference-combobox-toggle[aria-expanded="true"] .reference-combobox-chevron {
  transform: translateY(2px) rotate(225deg);
}

.reference-suggestions {
  position: absolute;
  z-index: 50;
  top: 100%;
  left: 0;
  width: 100%;
  max-height: 300px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #2563eb;
  border-radius: 10px;
  padding: 0;
  background: #fff;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.18);
}

.reference-suggestion {
  display: grid;
  width: 100%;
  gap: 3px;
  border: 0;
  border-radius: 0;
  padding: 10px 11px;
  color: var(--navy-900);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.reference-suggestion:hover,
.reference-suggestion.is-active {
  color: #fff;
  background: #2563eb;
}

.reference-suggestion:hover strong,
.reference-suggestion:hover small,
.reference-suggestion.is-active strong,
.reference-suggestion.is-active small {
  color: #fff;
}

.reference-suggestion:hover .reference-query-highlight,
.reference-suggestion.is-active .reference-query-highlight {
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
}

.reference-suggestion:hover .reference-renewal-badge,
.reference-suggestion.is-active .reference-renewal-badge {
  border-color: rgba(255, 255, 255, 0.65);
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.reference-suggestion strong {
  font-size: 0.9286rem;
  line-height: 1.35;
}

.reference-suggestion-name,
.reference-result-product {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.reference-renewal-badge {
  flex: 0 0 auto;
  border: 1px solid #c8d4f5;
  border-radius: 999px;
  padding: 2px 7px;
  color: #2446a5;
  background: #eef2ff;
  font-size: 0.6429rem;
  font-weight: 850;
  line-height: 1.25;
}

.reference-renewal-badge.is-renewable {
  border-color: #f0c2b8;
  color: #a33b24;
  background: #fff1ed;
}

.reference-query-highlight {
  border-radius: 3px;
  padding: 0 2px;
  color: inherit;
  background: #ffe66b;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.reference-suggestion small {
  color: var(--muted);
  font-size: 0.7143rem;
  font-weight: 700;
}

.reference-product-result {
  margin-top: 12px;
  border-top: 1px solid #d8def0;
  padding-top: 12px;
}

.reference-result-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.reference-result-heading strong {
  color: var(--navy-900);
  font-size: 1rem;
  line-height: 1.45;
}

.reference-result-heading a,
.reference-pdf-links a {
  color: #142d85;
  font-size: 0.7857rem;
  font-weight: 850;
  white-space: nowrap;
}

.reference-rate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.reference-rate-groups {
  display: grid;
  gap: 12px;
}

.reference-rate-table-wrap {
  margin-top: 10px;
  overflow-x: auto;
  border: 1px solid #aeb8d4;
  border-radius: 8px;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}

.reference-section-accordions {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.reference-section-accordion {
  overflow: hidden;
  border: 1px solid #aeb8d4;
  border-radius: 8px;
  background: #fff;
}

.reference-section-accordion > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 8px 12px;
  color: #15264c;
  background: #eef2ff;
  font-size: 0.8571rem;
  font-weight: 900;
  cursor: pointer;
  list-style-position: inside;
}

.reference-section-accordion > summary span {
  color: #52627a;
  font-size: 0.7143rem;
  white-space: nowrap;
}

.reference-section-accordion > .reference-rate-table-wrap {
  margin-top: 0;
  border: 0;
  border-top: 1px solid #c9cfdf;
  border-radius: 0;
}

.reference-rate-table {
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
  table-layout: fixed;
  color: var(--navy-800);
  font-size: 0.8571rem;
}

.reference-rate-table th,
.reference-rate-table td {
  height: 44px;
  padding: 8px 10px;
  border-right: 1px solid #c9cfdf;
  border-bottom: 1px solid #c9cfdf;
  text-align: center;
  vertical-align: middle;
}

.reference-rate-table tr > :last-child {
  border-right: 0;
}

.reference-rate-table tbody tr:last-child > * {
  border-bottom: 0;
}

.reference-rate-table thead th {
  background: #eef0e7;
  color: #15264c;
  font-weight: 900;
}

.reference-rate-table thead th:first-child,
.reference-rate-table tbody th {
  width: 30%;
  min-width: 150px;
}

.reference-rate-table tbody th {
  background: #fafbff;
  font-weight: 850;
  line-height: 1.35;
  text-align: center;
}

.reference-variant-with-badges {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
}

.reference-variant-label {
  min-width: 0;
}

.reference-variant-with-badges .reference-rate-row-button {
  width: auto;
}

.reference-variant-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  border: 1px solid #b9c8eb;
  border-radius: 999px;
  padding: 2px 5px;
  color: #2446a5;
  background: #eef2ff;
  font-size: 0.6429rem;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
}

.reference-variant-badge.is-renewable {
  border-color: #edb9ad;
  color: #a33b24;
  background: #fff1ed;
}

.reference-rate-row-button {
  width: 100%;
  min-height: 34px;
  padding: 5px 6px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  line-height: inherit;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.reference-rate-row-button:hover,
.reference-rate-row-button:focus-visible {
  border-color: #4868bf;
  background: #eef2ff;
  outline: none;
}

.reference-rate-table tbody tr.is-applied-row > th {
  background: #e9eeff;
}

.reference-rate-table tbody tr.is-applied-row > td {
  background: #f3f6ff;
}

.reference-rate-table tbody tr.is-applied-row .reference-rate-row-button {
  border-color: #2343a3;
  background: #dce5ff;
  box-shadow: 0 0 0 2px rgba(35, 67, 163, 0.12);
}

.reference-rate-table tbody td {
  background: #fff;
  color: #142d85;
  font-size: 1rem;
  font-weight: 900;
}

.reference-rate-table.is-structured {
  min-width: 760px;
}

.reference-rate-table.is-structured thead th:first-child,
.reference-rate-table.is-structured tbody th.reference-product-name-cell {
  width: 24%;
  min-width: 170px;
}

.reference-rate-table.is-structured thead th:nth-child(2),
.reference-rate-table.is-structured thead th:nth-child(3) {
  width: 14%;
}

.reference-rate-table tbody td.is-missing {
  color: #8a94a6;
  background: #f7f8fa;
}

.reference-rate-table-button {
  width: 100%;
  min-height: 36px;
  padding: 6px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #142d85;
  font: inherit;
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.reference-rate-table-button:hover,
.reference-rate-table-button:focus-visible {
  border-color: #4868bf;
  background: #eef2ff;
  outline: none;
}

.reference-rate-table-button.is-applied {
  border-color: #2343a3;
  background: #dce5ff;
  box-shadow: 0 0 0 2px rgba(35, 67, 163, 0.12);
}

@media (max-width: 640px) {
  .reference-product-result {
    margin-right: -3px;
    margin-left: -3px;
    padding-top: 8px;
  }

  .reference-result-heading {
    gap: 6px;
    margin-bottom: 6px;
  }

  .reference-result-heading strong {
    font-size: 0.7857rem;
  }

  .reference-rate-table-wrap {
    margin-top: 5px;
    border-radius: 5px;
  }

  .reference-section-accordions {
    gap: 5px;
    margin-top: 5px;
  }

  .reference-section-accordion > summary {
    min-height: 36px;
    padding: 5px 7px;
    font-size: 0.7143rem;
  }

  .reference-rate-table {
    min-width: 100%;
    font-size: 0.5714rem;
  }

  .reference-rate-table th,
  .reference-rate-table td {
    height: 34px;
    padding: 3px 2px;
    overflow-wrap: anywhere;
  }

  .reference-rate-table thead th:first-child,
  .reference-rate-table tbody th {
    width: 26%;
    min-width: 0;
  }

  .reference-rate-table tbody td {
    font-size: 0.7143rem;
  }

  .reference-rate-table.is-structured {
    min-width: 100%;
  }

  .reference-rate-table.is-structured thead th:first-child,
  .reference-rate-table.is-structured tbody th.reference-product-name-cell {
    width: 22%;
    min-width: 0;
  }

  .reference-rate-table.is-structured thead th:nth-child(2),
  .reference-rate-table.is-structured thead th:nth-child(3) {
    width: 11%;
  }

  .reference-rate-table-button {
    min-height: 28px;
    padding: 2px 0;
    font-size: 0.7143rem;
  }

  .reference-rate-row-button {
    min-height: 28px;
    padding: 2px 1px;
  }
}

/* 2026-09-18: 중간 폭에서도 검색·사이드바·결과표가 자연스럽게 반응한다. */
.reference-search-controls {
  display: flex;
  width: 100%;
  min-width: 0;
  flex-wrap: wrap;
  gap: 8px;
}

.reference-search-select-row {
  display: flex;
  width: 100%;
  min-width: 0;
  flex: 1 1 100%;
  flex-wrap: nowrap;
  gap: 8px;
}

.reference-search-select-row > .reference-search-field {
  width: auto;
  min-width: 0;
  flex: 1 1 calc(50% - 4px);
}

.reference-search-controls > .reference-product-field {
  width: 100%;
  min-width: 0;
  flex: 1 1 100%;
}

@media (min-width: 1024px) {
  .main {
    grid-template-columns: 350px minmax(0, 1fr);
  }

  /* 헤더 로고와 왼쪽 검색 카드가 같은 시작점을 갖도록 폭을 통일한다. */
  .app-header .header-inner {
    width: min(1600px, calc(100% - 48px));
  }

  .main.sidebar-right {
    grid-template-columns: minmax(0, 1fr) 350px;
  }

  .main > .control-card {
    width: 350px;
    min-width: 350px;
    max-width: 350px;
  }

  .main > .reference-product-result,
  .main > .result-card,
  .main > .footnote {
    min-width: 0;
  }

  .table-wrap {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }

  .table-wrap > .fee-table {
    width: 100%;
    min-width: 860px;
  }
}

/* 2026-09-18: 파워포인트 목표 시안과 동일한 카드 분리감·여백 */
:root {
  --page: #f4f5f7;
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.055);
}

body {
  background: #f4f5f7;
}

.control-card,
.result-card,
.main > .reference-product-result {
  border: 1px solid #e5e8eb;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.reference-search-heading {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.reference-search-heading .reference-search-title {
  flex: 1 1 auto;
}

.reference-search-heading .sidebar-position-toggle {
  flex: 0 0 auto;
  margin-left: auto;
}

.main > .reference-product-result.is-empty {
  display: grid;
  min-height: 0;
  place-items: center;
  padding: 24px;
}

.reference-result-empty-state {
  display: flex;
  max-width: 520px;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: #6b7684;
  text-align: left;
}

.reference-result-empty-icon {
  display: inline-flex;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  color: #9ca3af;
  background: #f3f4f6;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.reference-result-empty-state strong {
  display: block;
  margin-bottom: 7px;
  color: #191f28;
  font-size: 1.2857rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.reference-result-empty-state p {
  margin: 0;
  color: #8b95a1;
  font-size: 0.9286rem;
  line-height: 1.65;
}

@media (min-width: 1024px) {
  .main {
    column-gap: 26px;
    row-gap: 24px;
  }

  .main > .control-card {
    padding: 26px;
  }

  .main > .reference-product-result {
    padding: 26px;
  }

  .detailed-results-section > .table-wrap {
    width: auto;
    max-height: none;
    margin: 0 20px 20px;
  }

  .reference-search-field input,
  .reference-search-field select,
  .settings-panel input:not([type="checkbox"]),
  .settings-panel select,
  .detailed-results-section #reset-rates {
    border: 1px solid #d7dce2;
    border-radius: 12px;
  }
}

@media (min-width: 1180px) {
  .detailed-results-section > .result-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 0;
    padding: 16px 20px 10px;
  }

  .detailed-results-section .table-header-primary {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
  }

  .detailed-results-section .table-header-container > div:first-child {
    min-width: 0;
    flex: 1 1 auto;
  }

  .detailed-results-section .table-header-actions {
    flex: 0 0 auto;
    align-self: center;
    justify-content: flex-end;
  }

  .detailed-results-section #result-title {
    display: flex;
    min-height: 38px;
    align-items: center;
    line-height: 1.2;
  }

  .detailed-results-section #reset-rates {
    min-height: 38px;
  }
}

@media (max-width: 1023px) {
  .reference-result-empty-state {
    display: none;
  }
}

/* 2026-09-18: 모달 형보험자료실 */
body.board-modal-open {
  overflow: hidden;
}

.board-view {
  z-index: 1250;
}

.board-library-modal > .modal-backdrop {
  background: rgba(0, 0, 0, 0.5);
}

.board-view[hidden],
.board-write-modal[hidden],
.board-admin-column[hidden] {
  display: none !important;
}

.board-toolbar-actions [hidden] {
  display: none !important;
}

.board-library-panel {
  width: min(1180px, 100%);
  max-height: min(860px, calc(100dvh - 40px));
  overflow: auto;
  border-radius: 20px;
  padding: 0;
  background: #fff;
}

.board-popup-close {
  position: absolute;
  z-index: 3;
  top: 20px;
  right: 20px;
}

.board-card {
  overflow: hidden;
  min-height: 520px;
  border: 0;
  border-radius: inherit;
  background: #fff;
  box-shadow: none;
}

.board-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 76px 24px 30px;
  border-bottom: 1px solid #e5e8eb;
}

.board-heading h2,
.board-heading p {
  margin: 0;
}

.board-heading h2 {
  color: #191f28;
  font-size: 2rem;
  line-height: 1.25;
  letter-spacing: -0.04em;
}

.board-heading > div > p:last-child {
  margin-top: 7px;
  color: #6b7684;
  font-size: 0.9286rem;
}

.board-eyebrow {
  margin-bottom: 5px !important;
  color: #3182f6;
  font-size: 0.7143rem;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.board-toolbar button,
.board-write-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
  white-space: nowrap;
}

.board-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 30px;
}

.board-filter-controls {
  display: grid;
  width: min(640px, 100%);
  min-width: 0;
  grid-template-columns: minmax(120px, 160px) minmax(220px, 1fr);
  gap: 8px;
}

.board-category-filter-field {
  display: block;
  min-width: 0;
}

.board-category-filter-field select {
  width: 100%;
  height: 44px;
  border: 1px solid #d1d6db;
  border-radius: 12px;
  padding: 0 36px 0 14px;
  color: #333d4b;
  background: #f9fafb;
  font-size: 1rem;
  font-weight: 700;
}

.board-category-filter-field select:focus {
  border-color: #3182f6;
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(49, 130, 246, 0.1);
  outline: 0;
}

.board-search-field {
  position: relative;
  display: block;
  width: 100%;
}

.board-search-field input {
  width: 100%;
  height: 44px;
  border: 1px solid #d1d6db;
  border-radius: 12px;
  padding: 0 14px 0 42px;
  color: #191f28;
  background: #f9fafb;
  line-height: 1.2;
}

.board-search-field input:focus {
  border-color: #3182f6;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(49, 130, 246, 0.1);
  outline: 0;
}

.board-search-icon {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 15px;
  color: #6b7684;
  transform: translateY(-48%);
  font-size: 1.2857rem;
  line-height: 1;
  pointer-events: none;
}

.board-toolbar-actions,
.board-write-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.board-toolbar-actions button {
  min-height: 40px;
  gap: 6px;
  padding: 0 14px;
}

.board-status,
.board-write-status {
  min-height: 20px;
  margin: 0;
  padding: 0 30px 10px;
  color: #6b7684;
  font-size: 0.8571rem;
  font-weight: 700;
}

.board-status:empty,
.board-write-status:empty {
  min-height: 0;
  padding-bottom: 0;
}

.board-status[data-state="error"],
.board-write-status[data-state="error"] {
  color: #d92d20;
}

.board-status[data-state="success"],
.board-write-status[data-state="success"] {
  color: #067647;
}

.board-table-wrap {
  position: relative;
  margin: 0 30px 30px;
  overflow-x: auto;
  border: 1px solid #e5e8eb;
  border-radius: 16px;
}

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

.board-table th,
.board-table td {
  border: 0;
  border-bottom: 1px solid #e5e8eb;
  padding: 14px 12px;
  text-align: center;
  vertical-align: middle;
}

.board-table th {
  color: #6b7684;
  background: #f9fafb;
  font-size: 0.8571rem;
  font-weight: 800;
  line-height: 1.2;
}

.board-table th:nth-child(1) {
  width: 70px;
}

.board-table th:nth-child(2) {
  width: 110px;
}

.board-table th:nth-child(3) {
  width: auto;
}

.board-table th:nth-child(4) {
  width: 100px;
}

.board-table th:nth-child(5) {
  width: 80px;
}

.board-table th:nth-child(6) {
  width: 130px;
}

.board-table th:nth-child(7) {
  width: 132px;
}

.board-table tbody tr:last-child td {
  border-bottom: 0;
}

.board-post-row:hover td,
.board-post-row.is-open td {
  background: #f5f9ff;
}

.board-number-cell,
.board-date-cell,
.board-attachment-cell {
  color: #6b7684;
  font-size: 0.8571rem;
}

.board-view-cell {
  color: #4e5968;
  font-size: 0.8571rem;
  font-variant-numeric: tabular-nums;
}

.board-title-cell {
  text-align: left !important;
}

.board-title-button {
  width: 100%;
  border: 0;
  padding: 2px 0;
  color: #191f28;
  background: transparent;
  font-weight: 750;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}

.board-title-button:hover,
.board-title-button:focus-visible {
  color: #3182f6;
}

.board-category-badge {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 10px 3px;
  color: #1b64da;
  background: #e8f3ff;
  font-size: 0.7857rem;
  font-weight: 800;
  line-height: 1;
}

.board-download-link {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #3182f6;
  background: #e8f3ff;
  font-size: 1.1429rem;
  line-height: 1;
  text-decoration: none;
}

.board-download-link:hover,
.board-download-link:focus-visible {
  background: #d8ebff;
}

.board-manage-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.board-edit-button,
.board-delete-button {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  border: 1px solid #f5b7b1;
  border-radius: 9px;
  padding: 0 10px;
  color: #c4320a;
  background: #fff6f5;
  font-size: 0.7857rem;
  font-weight: 800;
  line-height: 1;
}

.board-edit-button {
  border-color: #b8d6ff;
  color: #2563eb;
  background: #eef6ff;
}

.board-edit-button:hover,
.board-edit-button:focus-visible {
  border-color: #3182f6;
  background: #e8f3ff;
}

.board-detail-row td {
  padding: 0 !important;
  background: #f9fafb;
}

.board-detail-content {
  display: grid;
  min-height: 72px;
  gap: 20px;
  padding: 22px 24px 24px;
  color: #4e5968;
  font-size: 0.9286rem;
  line-height: 1.75;
  text-align: left;
}

.board-post-copy {
  margin: 0;
  white-space: pre-wrap;
}

.board-attachment-section {
  display: grid;
  gap: 12px;
}

.board-attachment-section h3 {
  margin: 0;
  color: #333d4b;
  font-size: 0.8571rem;
  font-weight: 750;
  line-height: 1.4;
}

.board-attachment-list {
  display: grid;
  gap: 10px;
}

.board-attachment-card {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #e5e8eb;
  border-radius: 14px;
  padding: 14px 14px 14px 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.board-attachment-card:hover {
  border-color: #3182f6;
  box-shadow: 0 6px 18px rgba(49, 130, 246, 0.12);
  transform: translateY(-1px);
}

.board-attachment-info {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: #333d4b;
  text-decoration: none;
  cursor: pointer;
}

.board-attachment-info:hover .board-attachment-name,
.board-attachment-info:focus-visible .board-attachment-name {
  color: #3182f6;
  text-decoration: underline;
}

.board-attachment-info:focus-visible {
  outline: 2px solid #3182f6;
  outline-offset: 3px;
  border-radius: 6px;
}

.board-attachment-icon {
  flex: 0 0 auto;
  line-height: 1;
}

.board-attachment-name {
  overflow: hidden;
  color: #333d4b;
  font-size: 0.9286rem;
  font-weight: 750;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-download-button {
  display: inline-flex;
  min-height: 36px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 11px;
  padding: 0 14px;
  color: #4e5968;
  background: #f2f4f6;
  font-size: 0.8571rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease;
}

.board-download-button:hover,
.board-download-button:focus-visible {
  color: #1b64da;
  background: #e8f3ff;
  outline: 0;
}

.board-no-attachment {
  margin: 0;
  color: #8b95a1;
  font-size: 0.8571rem;
}

.board-empty {
  display: none;
  min-height: 260px;
  place-items: center;
  align-content: center;
  gap: 6px;
  color: #6b7684;
  text-align: center;
}

.board-empty.is-visible:not([hidden]) {
  display: grid;
}

.board-empty > span {
  margin-bottom: 5px;
  font-size: 2.4286rem;
}

.board-empty strong {
  color: #333d4b;
  font-size: 1.0714rem;
}

.board-empty p {
  margin: 0;
  font-size: 0.8571rem;
}

.board-write-modal {
  z-index: 1350;
}

.board-write-panel {
  width: min(620px, 100%);
  padding: 32px;
}

.board-write-panel h2 {
  margin: 0 0 22px;
  color: #191f28;
  font-size: 1.7857rem;
  letter-spacing: -0.035em;
}

.board-write-form {
  display: grid;
  gap: 16px;
}

.board-form-field {
  display: grid;
  gap: 8px;
  color: #142d85;
  font-size: 0.8571rem;
  font-weight: 850;
  line-height: 1.35;
}

.board-form-field input,
.board-form-field select,
.board-form-field textarea {
  width: 100%;
  border: 1px solid #d1d6db;
  border-radius: 12px;
  padding: 11px 13px;
  color: #191f28;
  background: #f9fafb;
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.45;
}

.board-form-field input,
.board-form-field select {
  height: 44px;
  padding-top: 1px;
  padding-bottom: 0;
}

.board-form-field textarea {
  min-height: 150px;
  resize: vertical;
}

.board-form-field input:focus,
.board-form-field select:focus,
.board-form-field textarea:focus {
  border-color: #3182f6;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(49, 130, 246, 0.1);
  outline: 0;
}

.board-form-field small {
  color: #8b95a1;
  font-size: 0.7857rem;
  font-weight: 600;
}

.board-existing-files[hidden] {
  display: none;
}

.board-existing-files {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: #142d85;
  font-size: 0.8571rem;
}

.board-existing-file-list {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.board-existing-file {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 1px solid #e5e8eb;
  border-radius: 10px;
  padding: 8px 10px;
  background: #f9fafb;
}

.board-existing-file-name {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
  color: #4e5968;
}

.board-existing-file-remove {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border: 1px solid #e5e8eb;
  border-radius: 7px;
  background: #fff;
  color: #c4320a;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.board-existing-file-remove:hover,
.board-existing-file-remove:focus-visible {
  border-color: #f5b7b1;
  background: #fff6f5;
}

.board-existing-empty {
  color: #8b95a1;
}

.board-write-status {
  padding-right: 0;
  padding-left: 0;
}

@media (max-width: 640px) {
  .header-inner {
    grid-template-areas: "brand board suggestion";
    grid-template-columns: max-content max-content max-content;
  }

  #board-toggle {
    grid-area: board;
  }

  #suggestion-open {
    grid-area: suggestion;
  }

  .board-library-modal {
    align-items: start;
    padding: max(10px, env(safe-area-inset-top)) 10px
      max(10px, env(safe-area-inset-bottom));
  }

  .board-library-panel {
    width: 100%;
    max-height: calc(100dvh - 20px);
    border-radius: 18px;
  }

  .board-popup-close {
    top: 14px;
    right: 14px;
  }

  .board-heading {
    padding: 20px 58px 18px 16px;
  }

  .board-heading h2 {
    font-size: 1.6429rem;
  }

  .board-heading > div > p:last-child {
    line-height: 1.55;
  }

  .board-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
  }

  .board-filter-controls {
    width: 100%;
    grid-template-columns: minmax(96px, 0.38fr) minmax(0, 1fr);
  }

  .board-search-field {
    width: 100%;
  }

  .board-toolbar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .board-toolbar-actions button:only-child {
    grid-column: 1 / -1;
  }

  .board-status {
    padding-right: 16px;
    padding-left: 16px;
  }

  .board-table-wrap {
    margin: 0 16px 18px;
  }

  .board-write-panel {
    padding: 28px 18px 22px;
  }

  .board-detail-content {
    padding: 16px 14px;
  }

  .board-attachment-card {
    align-items: stretch;
    flex-direction: column;
  }

  .board-download-button {
    width: 100%;
  }
}

@media (max-width: 768px) {
  #visitor-stats {
    display: none !important;
  }

  #board-admin-login {
    display: none !important;
  }

  .board-toolbar-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .board-toolbar-actions #board-write-open:not([hidden]) {
    grid-column: 1 / -1;
  }

  .board-table-wrap {
    max-width: 100%;
    overflow: visible;
    border: 0;
    border-radius: 0;
    white-space: normal;
  }

  .board-table {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .board-table thead {
    display: none;
  }

  .board-table tbody {
    display: block;
    width: 100%;
  }

  .board-post-row {
    display: grid;
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
    margin-bottom: 12px;
    border: 1px solid #e5e8eb;
    border-radius: 16px;
    padding: 14px;
    background: #fff;
  }

  .board-post-row.is-open {
    margin-bottom: 0;
    border-bottom: 0;
    border-radius: 16px 16px 0 0;
  }

  .board-post-row.is-open td {
    background: transparent;
  }

  .board-post-row td {
    display: block;
    min-width: 0;
    border: 0;
    padding: 0;
    font-size: 0.8571rem;
    text-align: left;
  }

  .board-post-row .board-number-cell {
    display: none;
  }

  .board-post-row td:nth-child(2),
  .board-post-row .board-title-cell,
  .board-post-row .board-manage-cell:not([hidden]) {
    grid-column: 1 / -1;
  }

  .board-post-row .board-title-cell {
    font-size: 1rem;
  }

  .board-post-row .board-attachment-cell::before {
    content: "첨부 ";
  }

  .board-post-row .board-view-cell::before {
    content: "조회 ";
  }

  .board-post-row .board-date-cell::before {
    content: "등록 ";
  }

  .board-post-row .board-date-cell {
    grid-column: 1 / -1;
  }

  .board-detail-row[hidden] {
    display: none !important;
  }

  .board-detail-row {
    display: block;
    width: 100%;
    min-width: 0;
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid #e5e8eb;
    border-top: 0;
    border-radius: 0 0 16px 16px;
    background: #f9fafb;
  }

  .board-detail-row td,
  .board-detail-content,
  .board-attachment-section,
  .board-attachment-list,
  .board-attachment-card,
  .board-attachment-info {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }

  .board-detail-content {
    display: grid;
    gap: 16px;
    padding: 16px;
  }

  .board-attachment-section,
  .board-attachment-list {
    display: grid;
  }

  .board-attachment-card {
    display: flex;
  }

  .board-attachment-info {
    display: flex;
  }

  .board-post-copy,
  .board-attachment-name {
    overflow-wrap: anywhere;
    word-break: break-all;
  }

  .board-attachment-name {
    white-space: normal;
    text-overflow: clip;
    text-align: left;
  }

  .board-title-button {
    width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    text-overflow: clip;
    line-height: 1.5;
  }

  .board-empty.is-visible:not([hidden]) {
    border: 1px solid #e5e8eb;
    border-radius: 16px;
  }
}

/* 2026-09-18: 글자·아이콘의 시각적 수직 정렬 보정 */
.app-header .header-inner .brand h1 {
  position: relative;
  top: 2px;
}

.suggestion-header-button,
.sidebar-position-toggle,
.strategy-lookup-button,
.reference-download-link,
.table-header-actions button,
.app-header .status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
}

.visitor-stat {
  align-items: center;
  line-height: 1;
}

.visitor-stat > span,
.visitor-stat > strong {
  position: relative;
  top: 1px;
}

.sidebar-position-toggle > span,
.strategy-lookup-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.sidebar-position-toggle > span[aria-hidden="true"],
.strategy-lookup-icon {
  position: relative;
  top: 1px;
}

.reference-search-field,
.settings-panel .reference-search-field,
.field > span:first-child,
.reference-search-field > span:first-child,
.reference-search-field > label:first-child {
  line-height: 1.35;
}

.reference-search-field input,
.reference-search-field select,
.settings-panel input,
.settings-panel select {
  line-height: 1.2;
}

.reference-search-field select,
.settings-panel select {
  padding-top: 1px;
}

/* 2026-09-15: PC 표 + 모바일 선택형 환산율 UI */
.reference-rate-responsive {
  min-width: 0;
}

.reference-rate-mobile {
  display: none;
}

.reference-rate-table tbody tr.is-selectable {
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.reference-rate-table tbody tr.is-selectable:hover > th,
.reference-rate-table tbody tr.is-selectable:hover > td,
.reference-rate-table tbody tr.is-selectable:focus-visible > th,
.reference-rate-table tbody tr.is-selectable:focus-visible > td {
  color: #3182f6;
  background: #e8f3ff;
}

.reference-rate-table tbody tr.is-selectable:focus-visible {
  outline: 3px solid rgba(49, 130, 246, 0.2);
  outline-offset: -3px;
}

.reference-selection-toast {
  position: fixed;
  z-index: 1600;
  top: max(20px, env(safe-area-inset-top));
  left: 50%;
  max-width: min(520px, calc(100% - 32px));
  padding: 12px 20px;
  border-radius: 999px;
  color: #fff;
  background: #3182f6;
  box-shadow: 0 10px 30px rgba(49, 130, 246, 0.28);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -14px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.reference-selection-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1023px) {
  .reference-rate-desktop {
    display: none;
  }

  .reference-rate-mobile {
    display: grid;
    gap: 14px;
    margin-top: 10px;
    border: 1px solid #e5e8eb;
    border-radius: 16px;
    padding: 16px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  }

  .reference-mobile-rate-field {
    display: grid;
    gap: 8px;
    color: #4e5968;
    font-size: 0.9286rem;
    font-weight: 800;
  }

  .reference-mobile-rate-select {
    width: 100%;
    min-height: 48px;
    border: 1px solid #d1d6db;
    border-radius: 12px;
    padding: 0 42px 0 14px;
    color: #191f28;
    background: #f9fafb;
    font-size: 1.1429rem;
    font-weight: 750;
    text-align: center;
    text-align-last: center;
    outline: none;
  }

  .reference-mobile-rate-select:focus {
    border-color: #3182f6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(49, 130, 246, 0.12);
  }

  .reference-mobile-rate-panels {
    min-width: 0;
  }

  .reference-mobile-rate-panel[hidden] {
    display: none;
  }

  .reference-mobile-rate-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .reference-mobile-rate-button,
  .reference-mobile-rate-value {
    display: grid;
    min-width: 0;
    min-height: 72px;
    align-content: center;
    gap: 5px;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 10px 6px;
    color: #4e5968;
    background: #f2f4f6;
    text-align: center;
  }

  .reference-mobile-rate-button {
    cursor: pointer;
    transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease, transform 150ms ease;
  }

  .reference-mobile-rate-button:hover,
  .reference-mobile-rate-button:focus-visible,
  .reference-mobile-rate-button.is-applied {
    border-color: #3182f6;
    color: #3182f6;
    background: #e8f3ff;
    outline: none;
  }

  .reference-mobile-rate-button:active {
    transform: scale(0.98);
  }

  .reference-mobile-rate-button span,
  .reference-mobile-rate-value span {
    overflow: hidden;
    font-size: 0.7857rem;
    font-weight: 750;
    line-height: 1.3;
    text-overflow: ellipsis;
  }

  .reference-mobile-rate-button strong,
  .reference-mobile-rate-value strong {
    color: #191f28;
    font-size: 1.1429rem;
    font-weight: 850;
    line-height: 1.2;
  }

  .reference-mobile-rate-button.is-applied strong {
    color: #3182f6;
  }

  .reference-mobile-rate-value.is-missing {
    color: #8b95a1;
    background: #f7f8fa;
  }

  .reference-section-accordion > .reference-rate-responsive {
    border-top: 1px solid #e5e8eb;
  }

  .reference-section-accordion > .reference-rate-responsive .reference-rate-mobile {
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}

@media (max-width: 420px) {
  .reference-mobile-rate-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reference-selection-toast {
    top: max(12px, env(safe-area-inset-top));
    width: calc(100% - 24px);
    max-width: none;
    box-sizing: border-box;
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 0.9286rem;
  }
}

.reference-rate-select-only.result-card {
  display: grid;
  width: 100%;
  gap: 16px;
  margin: 14px 0 0;
  border: 1px solid #e5e8eb;
  border-radius: 16px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.reference-rate-select-only .product-name {
  color: #191f28;
  font-size: 1.2143rem;
  font-weight: 800;
  line-height: 1.45;
  word-break: keep-all;
}

.reference-rate-select-only .inner-label {
  display: grid;
  gap: 8px;
  margin: 0;
  color: #4e5968;
  font-size: 0.9286rem;
  font-weight: 700;
}

.reference-rate-select-only .native-select.option-dropdown {
  display: block;
  width: 100%;
  min-height: 52px;
  border: 1px solid #d1d6db;
  border-radius: 12px;
  padding: 0 42px 0 14px;
  color: #191f28;
  background-color: #f9fafb;
  font-size: 1.0714rem;
  font-weight: 750;
  text-align: center;
  text-align-last: center;
  outline: none;
}

.reference-rate-select-only .native-select.option-dropdown:focus {
  border-color: #3182f6;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(49, 130, 246, 0.12);
}

.reference-samsung-matrix-card {
  display: grid;
  gap: 16px;
  margin-top: 14px;
  border: 1px solid #e5e8eb;
  border-radius: 16px;
  padding: 24px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.reference-samsung-matrix-card .product-name {
  color: #191f28;
  font-size: 1.2143rem;
  font-weight: 800;
}

.reference-samsung-matrix-card .inner-label {
  color: #4e5968;
  font-size: 0.9286rem;
  font-weight: 700;
}

.reference-samsung-matrix-scroll {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #e5e8eb;
  border-radius: 14px;
  background: #fff;
}

.reference-samsung-matrix {
  width: 100%;
  min-width: max-content;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
}

.reference-samsung-matrix th,
.reference-samsung-matrix td {
  min-width: 116px;
  border: 0;
  border-top: 1px solid #e5e8eb;
  border-left: 1px solid #e5e8eb;
  padding: 8px;
  text-align: center;
  vertical-align: middle;
}

.reference-samsung-matrix tr > :first-child {
  min-width: 150px;
  border-left: 0;
}

.reference-samsung-matrix thead th {
  border-top: 0;
  padding: 13px 12px;
  color: #4e5968;
  background: #f9fafb;
  font-size: 0.8571rem;
  font-weight: 800;
  white-space: nowrap;
}

.reference-samsung-matrix tbody th {
  position: sticky;
  left: 0;
  z-index: 1;
  color: #191f28;
  background: #fff;
  font-size: 1rem;
  font-weight: 800;
  white-space: nowrap;
}

.reference-samsung-matrix-missing {
  color: #8b95a1;
  background: #f9fafb;
}

.reference-samsung-matrix-button {
  display: flex;
  width: 100%;
  min-height: 52px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 11px;
  color: #4e5968;
  background: #fff;
  font: inherit;
  cursor: pointer;
}

.reference-samsung-matrix-button strong {
  color: #191f28;
  font-size: 1.2143rem;
  font-weight: 800;
}

.reference-samsung-matrix-button:hover,
.reference-samsung-matrix-button:focus-visible {
  border-color: #99c2ff;
  background: #f2f7ff;
}

.reference-samsung-matrix-button.active,
.reference-samsung-matrix-button.selected {
  border-color: #3182f6;
  background: #e8f3ff;
}

.reference-samsung-matrix-button.active strong,
.reference-samsung-matrix-button.selected strong {
  color: #1b64da;
}

.reference-shinhan-year-matrix td {
  min-width: 132px;
}

.reference-shinhan-year-rate-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.reference-shinhan-year-rate {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  width: 100%;
  line-height: 1.3;
  white-space: nowrap;
}

.reference-shinhan-year-rate small {
  color: #6b7684;
  font-size: 0.7857rem;
  font-weight: 700;
}

.reference-shinhan-year-rate strong {
  font-size: 0.9286rem;
}

.reference-abl-matrix td {
  min-width: 138px;
}

.reference-abl-rate-total {
  width: 100%;
  margin-top: 7px;
  border-top: 1px solid #e5e8eb;
  padding-top: 6px;
  color: #4e5968;
  font-size: 0.7857rem;
  font-weight: 800;
  text-align: right;
}

.reference-dongyang-hybrid-card {
  gap: 18px;
}

.reference-dongyang-detail-field {
  display: grid;
  min-width: 0;
  gap: 8px;
  color: #2343a3;
  font-size: 0.8571rem;
  font-weight: 800;
}

.reference-dongyang-detail-select {
  width: 100%;
  min-width: 0;
  height: 44px;
  border: 1px solid #d1d6db;
  border-radius: 12px;
  padding: 0 40px 0 14px;
  color: #191f28;
  background-color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 750;
  outline: none;
}

.reference-dongyang-detail-select:focus {
  border-color: #3182f6;
  box-shadow: 0 0 0 3px rgba(49, 130, 246, 0.12);
}

.reference-dongyang-hybrid-panels,
.reference-dongyang-hybrid-panel {
  min-width: 0;
}

.reference-dongyang-hybrid-panel:not([hidden]) {
  animation: reference-dongyang-panel-in 160ms ease-out;
}

.reference-dongyang-year-table {
  min-width: 480px;
}

.reference-dongyang-year-table thead th {
  background: #f9fafb;
}

.reference-dongyang-year-table tbody tr.active > th,
.reference-dongyang-year-table tbody tr.active > td,
.reference-dongyang-year-table tbody tr.is-applied-row > th,
.reference-dongyang-year-table tbody tr.is-applied-row > td {
  color: #1b64da;
  background: #e8f3ff;
  box-shadow: inset 0 0 0 1px #3182f6;
}

.reference-heungkuk-matrix-button.is-multi-rate strong {
  font-size: 1rem;
  line-height: 1.4;
  white-space: nowrap;
}

@keyframes reference-dongyang-panel-in {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .reference-samsung-matrix-card {
    padding: 16px;
  }

  .reference-dongyang-detail-select {
    min-height: 46px;
    font-size: 1.1429rem;
  }
}

/* 선택된 세부 조건의 환산율을 드롭다운 바로 아래에서 확인한다. */
.reference-mobile-rate-panels {
  min-width: 0;
}

.reference-inline-rate-placeholder {
  margin: 0;
  border: 1px dashed #d1d6db;
  border-radius: 14px;
  padding: 20px 14px;
  color: #8b95a1;
  background: #f9fafb;
  font-size: 0.9286rem;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}

.reference-inline-rate-placeholder[hidden],
.reference-inline-rate-summary[hidden] {
  display: none;
}

.reference-inline-rate-summary {
  display: grid;
  min-width: 0;
  gap: 9px;
}

.reference-inline-rate-title {
  color: #4e5968;
  font-size: 0.9286rem;
  font-weight: 800;
  line-height: 1.4;
}

.reference-inline-rate-scroll {
  overflow-x: auto;
  border: 1px solid #e5e8eb;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  scrollbar-width: thin;
}

.reference-inline-rate-table {
  width: 100%;
  min-width: calc(var(--reference-inline-rate-columns, 1) * 92px);
  border-collapse: collapse;
  table-layout: fixed;
}

.reference-inline-rate-table th,
.reference-inline-rate-table td {
  border-right: 1px solid #e5e8eb;
  text-align: center;
  white-space: nowrap;
}

.reference-inline-rate-table th:last-child,
.reference-inline-rate-table td:last-child {
  border-right: 0;
}

.reference-inline-rate-table th {
  padding: 10px 8px;
  color: #6b7684;
  background: #f9fafb;
  font-size: 0.8571rem;
  font-weight: 750;
  line-height: 1.3;
}

.reference-inline-rate-table td {
  border-top: 1px solid #e5e8eb;
  padding: 15px 8px;
  color: #191f28;
  background: #fff;
}

.reference-inline-rate-table td strong {
  color: #3182f6;
  font-size: 1.2857rem;
  font-weight: 850;
  line-height: 1.2;
}

/* 2026-09-16: 모바일 결과는 거대 표 대신 카드·드롭다운 중심으로 렌더링 */
@media (max-width: 1023px) {
  .reference-rate-mobile.result-card {
    display: grid;
    gap: 18px;
    width: 100%;
    margin: 14px 0 0;
    border: 1px solid #e5e8eb;
    border-radius: 16px;
    padding: 20px;
    box-sizing: border-box;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  }

  .reference-rate-mobile .product-name {
    margin: 0;
    color: #191f28;
    font-size: 1.2143rem;
    font-weight: 800;
    line-height: 1.45;
    word-break: keep-all;
  }

  .reference-rate-mobile .inner-label {
    display: grid;
    gap: 8px;
    margin: 0;
    color: #4e5968;
    font-size: 0.9286rem;
    font-weight: 700;
    line-height: 1.4;
  }

  .reference-rate-mobile .native-select.option-dropdown {
    display: block;
    width: 100%;
    min-height: 50px;
    border: 1px solid #d1d6db;
    border-radius: 12px;
    padding: 0 42px 0 14px;
    box-sizing: border-box;
    color: #191f28;
    background-color: #f9fafb;
    font: inherit;
    font-size: 1.0714rem;
    font-weight: 750;
    text-align: center;
    text-align-last: center;
    outline: none;
  }

  .reference-rate-mobile .native-select.option-dropdown:focus {
    border-color: #3182f6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(49, 130, 246, 0.12);
  }

  .reference-rate-mobile .rate-inputs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
    gap: 10px;
  }

  .reference-rate-mobile .rate-input-wrap {
    display: grid;
    min-width: 0;
    gap: 7px;
  }

  .reference-rate-mobile .rate-input-label {
    overflow: hidden;
    color: #6b7684;
    font-size: 0.8571rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .reference-rate-mobile .rate-input-field {
    width: 100%;
    min-width: 0;
    min-height: 52px;
    border: 1px solid #e5e8eb;
    border-radius: 12px;
    padding: 10px 7px;
    box-sizing: border-box;
    color: #191f28;
    background: #f9fafb;
    font-size: 1.2143rem;
    font-weight: 800;
    line-height: 1;
    text-align: center;
    outline: none;
    -moz-appearance: textfield;
  }

  .reference-rate-mobile .rate-value-box.active {
    border: 2px solid #3182f6 !important;
    border-radius: 12px;
    color: #191f28;
    background-color: #e8f3ff !important;
    box-shadow: 0 0 0 3px rgba(49, 130, 246, 0.1);
    font-weight: 700;
  }

  .reference-rate-mobile .rate-input-field::-webkit-inner-spin-button,
  .reference-rate-mobile .rate-input-field::-webkit-outer-spin-button {
    margin: 0;
    -webkit-appearance: none;
  }

  .reference-rate-mobile .rate-input-wrap.is-missing .rate-input-field {
    color: #8b95a1;
    background: #f2f4f6;
  }

  .reference-rate-mobile .reference-mobile-rate-panel[hidden] {
    display: none;
  }

  .reference-section-accordion > .reference-rate-mobile.result-card {
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}

.reference-rate-group {
  display: grid;
  gap: 7px;
}

.reference-rate-group h4 {
  margin: 0;
  color: var(--navy-800);
  font-size: 0.8571rem;
  font-weight: 900;
  line-height: 1.4;
}

.reference-rate-card {
  display: grid;
  gap: 4px;
  min-height: 66px;
  align-content: center;
  border: 1px solid #d4dcf2;
  border-radius: 11px;
  padding: 9px 11px;
  background: #f7f9ff;
  text-align: center;
}

button.reference-rate-card {
  width: 100%;
  font: inherit;
}

.reference-rate-card.is-selectable {
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.reference-rate-card.is-selectable:hover,
.reference-rate-card.is-selectable:focus-visible {
  border-color: #4868bf;
  background: #eef2ff;
  outline: none;
  transform: translateY(-1px);
}

.reference-rate-card.is-selectable.is-applied {
  border-color: #2343a3;
  background: #dce5ff;
  box-shadow: 0 0 0 2px rgba(35, 67, 163, 0.12);
}

.reference-rate-card span {
  color: #52627a;
  font-size: 0.7143rem;
  font-weight: 800;
  line-height: 1.35;
}

.reference-rate-card strong {
  color: #142d85;
  font-size: 1.1429rem;
}

.reference-rate-card.is-missing {
  background: #f4f5f8;
  border-color: #dfe3eb;
}

.reference-rate-card.is-missing strong {
  color: #8a94a6;
}

.reference-rate-picker {
  display: grid;
  gap: 12px;
  margin-top: 20px;
  border: 1px solid #c4d0ff;
  border-radius: 15px;
  padding: 15px;
  background: #f7f9ff;
}

.reference-rate-picker[hidden] {
  display: none;
}

.reference-rate-picker-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.reference-rate-picker-heading > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.reference-rate-picker-heading span {
  color: #2343a3;
  font-size: 0.7143rem;
  font-weight: 900;
}

.reference-rate-picker-heading strong {
  overflow: hidden;
  color: var(--navy-900);
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-rate-picker-heading small {
  color: #52627a;
  font-size: 0.7143rem;
  font-weight: 750;
  line-height: 1.5;
  text-align: right;
}

.reference-rate-picker .reference-rate-grid {
  grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
}

.reference-rate-feedback {
  min-height: 16px;
  margin: 0;
  color: #2343a3;
  font-size: 0.7143rem;
  font-weight: 850;
  text-align: right;
}

.reference-pdf-only {
  color: #52627a;
  font-size: 0.8571rem;
  font-weight: 750;
  line-height: 1.6;
}

.reference-pdf-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 7px;
}

@media (max-width: 640px) {
  .install-panel {
    padding: 28px 20px 22px;
  }

  .install-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .install-actions button {
    width: 100%;
  }

  .suggestion-panel {
    padding: 28px 20px 22px;
  }

  .suggestion-field-row {
    grid-template-columns: 1fr;
  }

  .reference-search-section {
    padding: 8px 6px;
  }

  .reference-search-select-row {
    gap: 8px;
  }
}

/* 2026-09-17: 헤더 브랜드 정렬과 수수료율 고정 컨트롤 */
.app-header .header-inner .brand {
  align-items: center;
}

.app-header .header-inner .brand > div:last-child {
  display: flex;
  align-items: center;
}

.app-header .header-inner .brand h1 {
  margin: 0;
  font-size: 1.7143rem;
  line-height: 1.15;
}

.commission-rate-entry .commission-rate-lock {
  display: inline-flex;
  min-width: max-content;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 0;
  padding: 0 4px;
  color: var(--navy-800);
  font-size: 0.8571rem;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
}

.commission-rate-lock input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #3182f6;
}

.settings-panel .reference-search-field > label:first-child {
  margin: 0;
  color: var(--navy-800);
  font-size: 0.8571rem;
  font-weight: 850;
}

@media (max-width: 640px) {
  .app-header .header-inner .brand h1 {
    font-size: 1.1429rem;
  }
}

@media (max-width: 380px) {
  .app-header .header-inner .brand h1 {
    font-size: 1rem;
  }
}

/* 2026-08-31: 규정 파일명·체크 아이콘을 제거한 상품 검색 카드 */
.embedded-rules-card {
  grid-template-columns: minmax(0, 1fr);
}

.embedded-rules-content {
  grid-column: 1 / -1;
}

@media (max-width: 640px) {
  /* 모바일은 별도 단계 이동 메뉴 없이 입력 흐름을 위에서 아래로 유지한다. */
  .mobile-workflow-nav {
    display: none !important;
  }

  .embedded-rules-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .table-wrap {
    max-height: none;
    overflow-y: visible;
  }

  .fee-table thead .period-title-row > .product-column,
  .fee-table thead .period-title-row > .summary-column,
  .fee-table thead .period-title-row > .total-column {
    min-height: 32px;
    padding-top: 3px;
    padding-bottom: 3px;
  }

  .fee-table tbody .product-cell,
  .fee-table tbody .summary-cell,
  .fee-table tbody .total-cell {
    min-height: 40px;
    padding-top: 2px;
    padding-bottom: 2px;
  }

  .fee-table .product-button {
    min-height: 34px;
    padding-top: 2px;
    padding-bottom: 2px;
  }
}

@media (min-width: 1024px) and (max-width: 1179px) {
  .fee-table thead .period-title-row > .product-column {
    display: flex;
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    align-items: center;
    justify-content: center;
  }

  .fee-table thead .period-title-row > .summary-column,
  .fee-table thead .period-title-row > .total-column {
    grid-row: 1;
  }
}

/* 사이드바 폼의 라벨 간격과 수수료율 한 줄 정렬 */
.control-card .reference-search-field {
  row-gap: 0;
}

.control-card .reference-search-field > span:first-child,
.control-card .reference-search-field > label:first-child {
  display: block;
  margin: 0 0 8px !important;
}

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

.commission-rate-entry > select,
.commission-rate-entry > .suffix-input {
  height: 40px;
  min-width: 0;
  flex: 1 1 0;
}

.commission-rate-entry > .suffix-input > input {
  height: 40px;
}

.commission-rate-entry .commission-rate-lock {
  display: flex;
  height: 40px;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  cursor: pointer;
}

.commission-rate-entry .commission-rate-lock > span {
  line-height: 1;
}

/* 수수료 표 제목과 초기화 버튼은 중복 보험 유형 탭 없이 한 줄로 정렬한다. */
.detailed-results-section .table-header-container {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.detailed-results-section .table-header-primary {
  display: flex;
  width: auto;
  min-width: 0;
  align-items: center;
}

.detailed-results-section .table-header-container #result-title {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.detailed-results-section .table-header-actions {
  display: flex;
  width: auto;
  flex: 0 0 auto;
  justify-content: flex-end;
  margin-left: auto;
}

.detailed-results-section .table-header-actions #reset-rates {
  width: auto;
  min-width: 92px;
}

@media (min-width: 1024px) {
  .control-card .control-grid {
    gap: 18px;
  }

  .control-card .embedded-rules-card {
    padding-bottom: 18px;
  }
}

@media (max-width: 380px) {
  .commission-rate-entry {
    gap: 8px;
  }
}

/* INCAR brand palette and fixed desktop canvas */
:root {
  --navy-950: #091747;
  --navy-900: #0e2268;
  --navy-800: #142d85;
  --navy-700: #2343a3;
  --teal-700: #142d85;
  --teal-600: #2343a3;
  --teal-100: #dce5ff;
  --teal-50: #f2f5ff;
  --page: #eef2fb;
  --shadow: 0 18px 45px rgba(20, 45, 133, 0.1);
}

html,
body,
.app-shell {
  min-width: 1180px;
}

.app-header {
  color: #142d85;
  border-bottom: 1px solid #dce5ff;
  background: #ffffff;
  box-shadow: 0 8px 28px rgba(20, 45, 133, 0.09);
}

.header-inner,
.main {
  width: min(1480px, calc(100% - 40px));
  min-width: 1140px;
}

.header-inner {
  min-height: 76px;
}

.brand .eyebrow,
.status-pill {
  display: inline-flex;
}

.brand h1 {
  color: #142d85;
  font-size: 1.4286rem;
}

.brand-mark.brand-logo {
  width: 112px;
  height: 42px;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.brand .eyebrow {
  color: #142d85;
}

.app-header .status-pill.neutral {
  color: #142d85;
  background: #f2f5ff;
}

.app-header .status-pill.ok {
  color: #142d85;
  background: #dce5ff;
}

.control-card {
  padding: 26px;
}

.control-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
}

.control-grid > *,
.embedded-rules-card,
.settings-panel {
  min-width: 0;
}

.reference-search-section {
  container-type: inline-size;
}

.result-card {
  container-type: inline-size;
}

.reference-search-controls {
  grid-template-columns:
    minmax(120px, 0.72fr)
    minmax(150px, 0.9fr)
    minmax(180px, 1.35fr);
  gap: 10px;
}

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

.embedded-rules-card {
  min-height: 190px;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 24px;
  padding: 22px 24px;
}

.embedded-rules-icon,
.version-check-row {
  justify-self: auto;
}

.embedded-rules-list > div {
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 10px;
}

.section-heading,
.result-heading,
.result-title-line {
  align-items: center;
  flex-direction: row;
}

.setup-title-line,
.result-title-line,
.reference-download-links {
  flex-wrap: nowrap;
}

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

.recognition-summary {
  grid-template-columns: repeat(4, 1fr);
}

.result-heading {
  padding: 16px 20px 10px;
}

.result-actions {
  width: auto;
  justify-content: flex-start;
}

.table-wrap {
  margin: 0 24px 26px;
  padding: 22px 24px 24px;
}

.mobile-workflow-nav,
.mobile-settings-header {
  display: none;
}

@container (max-width: 560px) {
  .reference-search-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reference-product-field {
    grid-column: 1 / -1;
  }
}

@container (max-width: 380px) {
  .reference-search-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .reference-product-field {
    grid-column: auto;
  }
}

/*
 * Responsive canvas
 *
 * The desktop application deliberately keeps a fixed minimum canvas so browser
 * zoom does not rearrange the business table.  Below that desktop breakpoint we
 * release only the page canvas: cards become a single column while the wide fee
 * table keeps its exact column geometry inside its own horizontal scroller.
 */
@media (max-width: 1179px) {
  html,
  body,
  .app-shell {
    width: 100%;
    min-width: 0;
  }

  body {
    overflow-x: hidden;
  }

  .header-inner,
  .main {
    width: min(100% - 32px, 960px);
    min-width: 0;
  }

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

  .embedded-rules-card,
  .settings-panel,
  .result-card,
  .result-heading,
  .result-title-line {
    min-width: 0;
  }

  .setup-title-line,
  .result-title-line,
  .reference-download-links {
    flex-wrap: wrap;
  }

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

  .result-title-line {
    align-items: flex-start;
  }
}

/* 좁은 PC 창에서는 전체 열을 유지하되 표 자체가 카드 폭에 맞춰 축소된다. */
@media (min-width: 901px) and (max-width: 1179px) {
  .table-wrap {
    width: calc(100% - 32px);
    margin: 0 16px 18px;
    overflow-x: hidden;
    padding: 12px;
  }

  .fee-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }

  .fee-table th,
  .fee-table td {
    height: clamp(34px, 4.2vw, 42px);
    padding: clamp(2px, 0.55vw, 6px);
  }

  .fee-table thead th {
    font-size: clamp(0.5714rem, 0.95vw, 0.7857rem);
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .fee-table .product-column,
  .fee-table tbody .product-cell {
    position: static;
    left: auto;
    width: 20%;
    min-width: 0;
    max-width: none;
  }

  .fee-table .total-column,
  .fee-table .summary-column {
    width: 9%;
  }

  .fee-table .product-button {
    min-height: 38px;
    padding: 3px 2px;
    font-size: clamp(0.5714rem, 0.9vw, 0.7143rem);
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .fee-table .value-cell,
  .fee-table .summary-cell,
  .fee-table .total-cell {
    min-width: 0;
    padding-inline: 2px;
    font-size: clamp(0.5rem, 0.8vw, 0.7143rem);
    overflow-wrap: anywhere;
  }

  .fee-table .monthly-premium-result {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* 태블릿·아주 좁은 PC 창은 모바일과 같은 핵심 4열 표로 전환한다. */
@media (max-width: 900px) {
  .table-wrap {
    width: calc(100% - 16px);
    max-width: none;
    margin: 0 8px 12px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 7px 5px;
  }

  .fee-table {
    display: block;
    width: 100%;
    min-width: 0;
    table-layout: auto;
  }

  .fee-table thead {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) repeat(3, minmax(0, 1fr));
    position: sticky;
    z-index: 6;
    top: 0;
  }

  .fee-table thead .company-title-row,
  .fee-table thead .period-title-row {
    display: contents;
  }

  .fee-table thead .company-table-title {
    display: flex;
    min-width: 0;
    height: auto;
    min-height: 32px;
    grid-column: 1 / -1;
    grid-row: 1;
    align-items: center;
    justify-content: center;
    border-right: 0;
    padding: 6px 4px;
    font-size: clamp(0.5714rem, 1.5vw, 0.7143rem);
    line-height: 1.25;
    white-space: normal;
  }

  .fee-table thead .company-title-row .product-column {
    display: flex;
    width: auto;
    min-width: 0;
    max-width: none;
    height: auto;
    min-height: 38px;
    grid-column: 1;
    grid-row: 2;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #c9c0a2;
    font-size: clamp(0.5714rem, 1.45vw, 0.7143rem);
  }

  .fee-table thead .period-title-row > th:not(.total-column):not(.summary-column) {
    display: none;
  }

  .fee-table thead .period-title-row > .summary-start {
    grid-column: 2;
    grid-row: 2;
  }

  .fee-table thead .period-title-row > .summary-column:not(.summary-start) {
    grid-column: 3;
    grid-row: 2;
  }

  .fee-table thead .period-title-row > .total-column {
    grid-column: 4;
    grid-row: 2;
  }

  .fee-table thead .period-title-row > .summary-column,
  .fee-table thead .period-title-row > .total-column {
    display: flex;
    width: auto;
    min-width: 0;
    height: auto;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #c9c0a2;
    padding: 4px 2px;
    font-size: clamp(0.5714rem, 1.45vw, 0.7143rem);
  }

  .fee-table tbody {
    display: block;
  }

  .fee-table tbody tr {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1.55fr) repeat(3, minmax(0, 1fr));
  }

  .fee-table tbody .value-cell {
    display: none;
  }

  .fee-table tbody .product-cell {
    position: static;
    width: auto;
    min-width: 0;
    max-width: none;
    min-height: 50px;
    grid-column: 1;
    grid-row: 1;
    border-right: 1px solid #c9c0a2 !important;
    box-shadow: none;
    padding: 3px !important;
  }

  .fee-table tbody .summary-start {
    grid-column: 2;
    grid-row: 1;
  }

  .fee-table tbody .summary-cell:not(.summary-start) {
    grid-column: 3;
    grid-row: 1;
  }

  .fee-table tbody .total-cell {
    grid-column: 4;
    grid-row: 1;
  }

  .fee-table tbody .summary-cell,
  .fee-table tbody .total-cell {
    display: flex;
    min-width: 0;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border-right: 1px solid #c9c0a2;
    padding: 4px 2px;
    font-size: clamp(0.5714rem, 1.35vw, 0.6429rem);
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .fee-table .summary-start {
    border-left: 0 !important;
  }

  .fee-table .product-button {
    min-height: 42px;
    padding: 3px 2px;
    font-size: clamp(0.5714rem, 1.35vw, 0.6429rem);
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .fee-table .product-name,
  .fee-table .monthly-premium-result,
  .fee-table .monthly-premium-result strong {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 640px) {
  :root {
    --radius-lg: 20px;
    --radius-md: 16px;
  }

  .header-inner,
  .main {
    width: calc(100% - 12px);
  }

  .header-inner {
    min-height: 64px;
    gap: 8px;
  }

  .brand {
    min-width: 0;
    gap: 8px;
  }

  .brand-mark.brand-logo {
    width: 84px;
    height: 34px;
    flex: 0 0 auto;
  }

  .brand .eyebrow,
  .status-pill {
    display: none;
  }

  .brand h1 {
    overflow: hidden;
    font-size: 1.1429rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .header-actions {
    flex: 0 0 auto;
    gap: 6px;
  }

  .suggestion-header-button {
    min-height: 44px;
    border-radius: 10px;
    padding: 0 10px;
    font-size: 0.7857rem;
    white-space: nowrap;
  }

  .main {
    margin: 8px auto 24px;
  }

  #setup-title,
  #calculation-settings,
  #result-title {
    scroll-margin-top: 124px;
  }

  .control-card {
    padding: 10px;
  }

  .section-heading {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
  }

  .setup-title-line {
    min-width: 0;
    flex: 1 1 auto;
  }

  .setup-step-label {
    font-size: 1.4286rem;
  }

  .section-heading .text-button {
    min-height: 44px;
    margin-left: auto;
    padding: 8px;
  }

  .mobile-workflow-nav {
    position: sticky;
    z-index: 35;
    top: 66px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    margin: 0 0 8px;
    border: 1px solid #ccd5ee;
    border-radius: 14px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 22px rgba(9, 23, 71, 0.1);
    backdrop-filter: blur(12px);
  }

  .mobile-workflow-nav a {
    display: inline-flex;
    min-width: 0;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border-radius: 10px;
    color: #142d85;
    background: #f4f7ff;
    font-size: 0.7857rem;
    font-weight: 850;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
  }

  .mobile-workflow-nav a:focus-visible,
  .mobile-workflow-nav a:active {
    background: #dce5ff;
  }

  .mobile-workflow-nav a span {
    display: inline-grid;
    width: 20px;
    height: 20px;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    color: #fff;
    background: #142d85;
    font-size: 0.7143rem;
  }

  .control-grid {
    gap: 8px;
  }

  .embedded-rules-card {
    min-height: 0;
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    padding: 12px 10px;
  }

  .embedded-rules-icon {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    font-size: 1.8571rem;
  }

  .embedded-rules-title {
    margin-bottom: 8px;
    font-size: 1.3571rem;
    line-height: 1.35;
  }

  .embedded-rules-list {
    gap: 5px;
  }

  .embedded-rules-list > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .embedded-rules-list dt,
  .embedded-rules-list dd {
    font-size: 0.8571rem;
  }

  .reference-search-section {
    grid-column: 1 / -1;
    padding: 8px 6px;
    border-radius: 12px;
  }

  .reference-search-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .reference-product-field {
    grid-column: 1 / -1;
  }

  input,
  select,
  .reference-search-field select,
  .reference-search-field input {
    min-height: 46px;
    min-width: 0;
    font-size: 1.1429rem;
  }

  .reference-suggestions {
    max-height: min(42vh, 300px);
  }

  .reference-result-heading,
  .reference-rate-picker-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .reference-result-heading a,
  .reference-rate-picker-heading small {
    min-height: 36px;
    text-align: left;
  }

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

  .reference-rate-picker-heading strong {
    white-space: normal;
  }

  .settings-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: initial;
    gap: 8px;
    border-color: #c9d3ef;
    padding: 11px 10px;
    background: linear-gradient(180deg, #ffffff 0%, #f7f9ff 100%);
    scroll-margin-top: 124px;
  }

  .mobile-settings-header {
    display: grid;
    grid-column: 1 / -1;
    gap: 2px;
    margin-bottom: 2px;
  }

  .mobile-settings-header h3,
  .mobile-settings-header p {
    margin: 0;
  }

  .mobile-settings-header h3 {
    color: #0e2268;
    font-size: 1rem;
    font-weight: 900;
  }

  .mobile-settings-header p {
    color: #65748b;
    font-size: 0.7143rem;
    font-weight: 700;
    line-height: 1.45;
  }

  .settings-panel > .field {
    grid-column: 1 / -1;
  }

  .settings-panel > .field-row {
    display: block;
    min-width: 0;
    margin-top: 0;
  }

  .settings-panel .reference-search-field,
  .settings-panel .suffix-input {
    min-width: 0;
  }

  .result-card {
    margin-top: 8px;
  }

  .result-heading {
    gap: 10px;
    padding: 12px 10px 10px;
  }

  .result-heading > div:first-child,
  .result-title-line {
    width: 100%;
  }

  .result-title-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
  }

  #result-title {
    min-width: 0;
    font-size: 1.5714rem;
    line-height: 1.3;
  }

  .strategy-lookup-button {
    width: auto;
    min-height: 44px;
    justify-content: center;
    padding-inline: 10px;
  }

  .reference-download-links {
    display: grid;
    width: 100%;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .reference-download-link {
    min-height: 44px;
    justify-content: center;
    padding: 8px 4px;
    font-size: 0;
    text-align: center;
    white-space: nowrap;
  }

  .reference-download-link::before {
    content: attr(data-mobile-label);
    font-size: 0.7143rem;
    line-height: 1.25;
  }

  .result-actions {
    width: 100%;
    justify-content: space-between;
  }

  .result-actions .secondary-button,
  .primary-button,
  .secondary-button {
    min-height: 44px;
  }

  .table-wrap {
    width: calc(100% - 8px);
    max-width: none;
    margin: 0 4px 10px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 6px 4px;
  }

  .fee-table {
    display: block;
    width: 100%;
    min-width: 0;
    table-layout: auto;
  }

  .fee-table thead {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) repeat(3, minmax(0, 1fr));
    position: sticky;
    z-index: 6;
    top: 0;
  }

  .fee-table thead .company-title-row,
  .fee-table thead .period-title-row {
    display: contents;
  }

  .fee-table thead .company-table-title {
    display: flex;
    min-width: 0;
    height: auto;
    min-height: 34px;
    grid-column: 1 / -1;
    grid-row: 1;
    align-items: center;
    justify-content: center;
    border-right: 0;
    padding: 7px 6px;
    font-size: 0.7143rem;
    line-height: 1.3;
    white-space: normal;
  }

  .fee-table thead .company-title-row .product-column {
    display: flex;
    width: auto;
    min-width: 0;
    max-width: none;
    height: auto;
    min-height: 40px;
    grid-column: 1;
    grid-row: 2;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #c9c0a2;
    font-size: 0.7143rem;
  }

  .fee-table thead .period-title-row > th:not(.total-column):not(.summary-column) {
    display: none;
  }

  .fee-table thead .period-title-row > .summary-start {
    grid-column: 2;
    grid-row: 2;
  }

  .fee-table thead .period-title-row > .summary-column:not(.summary-start) {
    grid-column: 3;
    grid-row: 2;
  }

  .fee-table thead .period-title-row > .total-column {
    grid-column: 4;
    grid-row: 2;
  }

  .fee-table thead .period-title-row > .summary-column,
  .fee-table thead .period-title-row > .total-column {
    display: flex;
    width: auto;
    min-width: 0;
    height: auto;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #c9c0a2;
    padding: 5px 3px;
    font-size: 0.7143rem;
  }

  .fee-table tbody {
    display: block;
  }

  .fee-table tbody tr {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1.55fr) repeat(3, minmax(0, 1fr));
  }

  .fee-table tbody .value-cell {
    display: none;
  }

  .fee-table tbody .product-cell {
    position: static;
    width: auto;
    min-width: 0;
    max-width: none;
    min-height: 54px;
    grid-column: 1;
    grid-row: 1;
    border-right: 1px solid #c9c0a2 !important;
    box-shadow: none;
    padding: 3px !important;
  }

  .fee-table tbody .summary-start {
    grid-column: 2;
    grid-row: 1;
  }

  .fee-table tbody .summary-cell:not(.summary-start) {
    grid-column: 3;
    grid-row: 1;
  }

  .fee-table tbody .total-cell {
    grid-column: 4;
    grid-row: 1;
  }

  .fee-table tbody .summary-cell,
  .fee-table tbody .total-cell {
    display: flex;
    min-width: 0;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border-right: 1px solid #c9c0a2;
    padding: 5px 2px;
    font-size: 0.6429rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .fee-table .summary-start {
    border-left: 0 !important;
  }

  .fee-table .product-button {
    min-height: 46px;
    padding: 4px 2px;
    font-size: 0.6429rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .fee-table .product-name {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .fee-table .edit-label {
    font-size: 0.5714rem;
  }

  .fee-table .monthly-premium-result {
    margin-top: 3px;
    padding-top: 3px;
    font-size: 0.4643rem;
    line-height: 1.25;
    white-space: normal;
  }

  .fee-table .monthly-premium-result strong {
    font-size: 0.5357rem;
    overflow-wrap: anywhere;
  }

  .footnote {
    padding: 0 8px 2px;
    font-size: 0.7143rem;
    line-height: 1.55;
  }

  .modal {
    align-items: start;
    padding:
      max(12px, env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right))
      max(12px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
  }

  .modal-panel,
  .startup-check-panel,
  .install-panel,
  .suggestion-panel {
    width: 100%;
    max-height: calc(100dvh - 24px);
    border-radius: 18px;
    padding: 20px 16px;
  }

  .startup-check-symbol {
    width: 58px;
    height: 58px;
    margin-bottom: 14px;
    border-radius: 18px;
  }

  .startup-check-panel h2 {
    font-size: 1.5714rem;
  }

  .startup-check-actions,
  .install-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .startup-check-actions button,
  .install-actions button {
    width: 100%;
    min-height: 46px;
  }

  .strategy-modal-panel {
    width: 100%;
    max-height: calc(100dvh - 24px);
    padding: 0;
  }

  .strategy-result-head {
    display: none;
  }

  .strategy-result-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 10px;
    padding: 12px 16px;
  }

  .strategy-company {
    grid-column: 1;
  }

  .strategy-tag {
    grid-column: 2;
  }

  .strategy-product {
    grid-column: 1 / -1;
  }

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

  .modal-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .modal-actions > div,
  .modal-actions button {
    width: 100%;
  }

  .toast {
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 12px;
    width: auto;
  }
}

@media (max-width: 380px) {
  .brand-mark.brand-logo {
    width: 72px;
  }

  .brand h1 {
    font-size: 1rem;
  }

  .suggestion-header-button {
    padding: 0 8px;
    font-size: 0.7143rem;
  }

  .reference-rate-grid,
  .reference-rate-picker .reference-rate-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .mobile-workflow-nav a {
    gap: 3px;
    font-size: 0.7143rem;
  }

  .mobile-workflow-nav a span {
    width: 18px;
    height: 18px;
    font-size: 0.6429rem;
  }

  .reference-search-controls,
  .settings-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .reference-product-field,
  .mobile-settings-header,
  .settings-panel > .field {
    grid-column: auto;
  }
}

/* 2026-08-31: 상품 검색·계산 입력 카드와 수수료율 프리셋 */
.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.embedded-rules-card {
  min-height: 0;
  align-content: stretch;
  padding: 12px;
}

.reference-search-section {
  min-height: 100%;
  margin-top: 0;
  padding: 20px;
}

.reference-search-title,
.settings-panel-header h2 {
  margin: 0 0 16px;
  color: #0e2268;
  font-size: 1.5714rem;
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: -0.035em;
}

.settings-panel-header h2 {
  min-width: 0;
  margin-bottom: 0;
}

.settings-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.summary-copy-button {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 0;
  border-radius: 6px;
  color: #4b5563;
  background: #f3f4f6;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.summary-copy-button:hover:not(:disabled) {
  background: #e5e7eb;
}

.summary-copy-button:focus-visible {
  outline: 2px solid #3182f6;
  outline-offset: 2px;
}

.summary-copy-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.settings-panel > .field-row {
  margin-bottom: 10px;
}

.settings-panel .reference-search-field {
  color: var(--navy-800);
  font-size: 0.8571rem;
  font-weight: 850;
}

.settings-panel .reference-search-field > span:first-child {
  margin-bottom: 8px !important;
  color: var(--navy-800);
  font-size: 0.8571rem;
  font-weight: 850;
}

.control-card .reference-search-field > span:first-child,
.control-card .reference-search-field > label:first-child {
  margin-bottom: 8px !important;
}

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

.commission-rate-entry > select,
.commission-rate-entry > .suffix-input {
  flex: 1 1 0;
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  min-width: 0;
}

.commission-rate-entry > .suffix-input > input,
.commission-rate-entry .commission-rate-lock {
  height: 40px;
  min-height: 40px;
  max-height: 40px;
}

.commission-rate-entry .commission-rate-lock {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  cursor: pointer;
}

@media (max-width: 640px) {
  .header-inner {
    flex-wrap: wrap;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .header-actions {
    width: 100%;
  }

  .header-actions .suggestion-header-button {
    flex: 1 1 0;
  }

  .reference-search-title,
  .settings-panel-header h2 {
    margin-bottom: 10px;
    font-size: 1.2857rem;
  }

  .settings-panel-header h2 {
    margin-bottom: 0;
  }

  .reference-search-section {
    padding: 12px 10px;
  }

  .settings-panel-header {
    grid-column: 1 / -1;
  }

  .settings-panel > .field-row {
    grid-column: 1 / -1;
  }

  .commission-rate-entry {
    gap: 8px;
  }
}

/* 2026-09-03: 방문자 현황 및 모바일 헤더 배치 */
@media (max-width: 640px) {
  .header-inner {
    display: grid;
    grid-template-areas: "brand board suggestion";
    grid-template-columns: max-content max-content max-content;
    justify-content: start;
    align-items: center;
    gap: 6px;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .brand {
    grid-area: brand;
  }

  .brand-mark.brand-logo {
    width: 64px;
  }

  .brand h1 {
    font-size: 0.9286rem;
  }

  .header-actions {
    display: contents;
    width: auto;
  }

  .header-actions .suggestion-header-button {
    grid-area: suggestion;
    min-height: 30px;
    align-self: center;
    border-radius: 8px;
    padding: 0 8px;
    font-size: 0.7143rem;
    line-height: 1.15;
  }

  #board-toggle {
    grid-area: board;
  }

  #suggestion-open {
    grid-area: suggestion;
  }

  .visitor-stats {
    grid-area: visitors;
    min-height: 30px;
    border-radius: 8px;
    font-size: 0.6429rem;
  }

  .visitor-stat {
    gap: 3px;
    padding: 0 7px;
  }

  .visitor-stat strong {
    font-size: 0.7143rem;
  }

  .app-header .status-pill {
    display: none;
  }
}

@media (max-width: 380px) {
  .header-actions .suggestion-header-button {
    padding: 0 6px;
    font-size: 0.6429rem;
  }
}

@media (max-width: 340px) {
  .brand-mark.brand-logo {
    display: none;
  }

  .brand {
    gap: 0;
  }
}

/* 2026-09-15: Toss-inspired responsive dashboard shell */
:root {
  --page: #f4f5f7;
  --surface: #ffffff;
  --line: #e5e8eb;
  --line-strong: #d1d6db;
  --ink: #191f28;
  --muted: #6b7684;
  --incar-action: #3182f6;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

body {
  color: #191f28;
  background: #f4f5f7;
}

.control-card,
.result-card,
.main > .reference-product-result {
  border: 1px solid #e5e8eb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.reference-search-field select,
.reference-search-field input,
.settings-panel input,
.settings-panel select {
  border-color: #d1d6db;
  color: #191f28;
  background: #f9fafb;
}

.reference-search-field select:focus,
.reference-search-field input:focus,
.settings-panel input:focus,
.settings-panel select:focus {
  border-color: #3182f6;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(49, 130, 246, 0.1);
}

.count-badge {
  color: #fff;
  background: #3182f6;
}

.reference-result-heading a,
.reference-pdf-links a {
  color: #3182f6;
}

@media (min-width: 1024px) {
  .main {
    display: grid;
    width: min(1600px, calc(100% - 48px));
    min-width: 0;
    grid-template-columns: minmax(330px, 390px) minmax(0, 1fr);
    align-items: start;
    gap: 24px;
    margin: 24px auto 48px;
  }

  .control-card {
    position: sticky;
    top: 92px;
    display: block;
    align-self: start;
    max-height: none;
    grid-column: 1;
    grid-row: 1 / span 3;
    overflow: visible;
    padding: 24px;
  }

  .control-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .embedded-rules-card {
    display: block;
    min-height: 0;
    border: 0;
    border-bottom: 1px solid #e5e8eb;
    border-radius: 0;
    padding: 0 0 20px;
    background: transparent;
    box-shadow: none;
  }

  .reference-search-section {
    min-height: 0;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }

  .reference-search-controls {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .reference-product-field {
    grid-column: auto;
  }

  .reference-search-title,
  .settings-panel-header h2 {
    color: #191f28;
    font-size: 1.4286rem;
    font-weight: 800;
  }

  .settings-panel {
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
  }

  .settings-panel .field-row + .field-row {
    margin-top: 14px;
  }

  .main > .reference-product-result,
  .result-card,
  .footnote {
    min-width: 0;
    grid-column: 2;
  }

  .main > .reference-product-result {
    margin: 0;
    border-top: 1px solid #e5e8eb;
    padding: 24px;
  }

  .main > .reference-product-result[hidden] {
    display: none;
  }

  .main > .reference-product-result .reference-result-heading {
    margin-bottom: 14px;
  }

  .result-card {
    margin-top: 0;
  }

  .reference-rate-table-wrap {
    border-color: #e5e8eb;
    border-radius: 12px;
    box-shadow: none;
  }

  .reference-rate-table thead th {
    position: sticky;
    z-index: 2;
    top: 0;
    color: #4e5968;
    background: #f9fafb;
  }

  .reference-rate-table th,
  .reference-rate-table td {
    border-color: #e5e8eb;
    padding: 12px 14px;
  }

  .reference-rate-table tbody th,
  .reference-rate-table tbody td {
    background: #fff;
  }
}

@media (max-width: 1023px) {
  html,
  body,
  .app-shell {
    width: 100%;
    min-width: 0;
  }

  .header-inner,
  .main {
    width: min(960px, calc(100% - 24px));
    min-width: 0;
  }

  .main {
    display: block;
    margin: 14px auto 28px;
  }

  .control-card {
    position: static;
    max-height: none;
    overflow: visible;
    padding: 14px;
  }

  .control-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .embedded-rules-card,
  .reference-search-section,
  .settings-panel {
    border-color: #e5e8eb;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  }

  .reference-search-section {
    padding: 18px;
  }

  .result-card {
    margin-top: 16px;
  }

  .reference-result-heading strong {
    color: #191f28;
    font-size: 1.1429rem;
  }
}

@media (max-width: 640px) {
  .header-inner,
  .main {
    width: calc(100% - 12px);
  }

  .main {
    margin-top: 8px;
  }

  .control-card {
    padding: 8px;
  }

  .reference-search-section,
  .settings-panel {
    padding: 14px 12px;
  }

  .reference-search-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .reference-product-field {
    grid-column: auto;
  }
}

/* 2026-09-16: Toss-style result controls, option list and responsive fee cards */
.table-header-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
}

.table-header-container > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.table-header-primary,
.table-header-link-group,
.table-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.table-header-container .title,
.table-header-container button,
.table-header-container a {
  white-space: nowrap;
  word-break: keep-all;
}

.table-header-container #reset-rates {
  min-width: 92px;
  padding-right: 12px;
  padding-left: 12px;
}

.reference-options-list {
  overflow: hidden;
  border: 1px solid #e5e8eb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.reference-options-product {
  padding: 18px 20px;
  border-bottom: 1px solid #e5e8eb;
  color: #191f28;
  font-size: 1.2143rem;
  font-weight: 800;
}

.reference-options-list-header,
.reference-option-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(0, 2fr);
  align-items: stretch;
}

.reference-options-list-header {
  color: #6b7684;
  background: #f9fafb;
  font-size: 0.9286rem;
  font-weight: 700;
}

.reference-options-list-header > span,
.reference-option-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 18px;
}

.reference-option-rate-headings,
.reference-option-rates {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  min-width: 0;
}

.reference-option-rate-headings > span {
  padding: 13px 10px;
  text-align: center;
}

.reference-option-row {
  border-top: 1px solid #e5e8eb;
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

.reference-option-row.is-selectable {
  cursor: pointer;
}

.reference-option-row.is-selectable:hover,
.reference-option-row.is-selectable:focus-visible {
  outline: 0;
  background: #e8f3ff;
}

.reference-option-row.selected,
.reference-option-row.active,
.reference-option-row.is-applied-row {
  background: #dbeeff;
  box-shadow: inset 4px 0 #3182f6;
}

.reference-options-list.is-row-selection-mode .reference-option-row.active .reference-option-rate,
.reference-options-list.is-row-selection-mode .reference-option-row.selected .reference-option-rate,
.reference-options-list.is-row-selection-mode .reference-option-row.is-applied-row .reference-option-rate {
  color: #1b64da;
  background: #e8f3ff;
  box-shadow: inset 0 0 0 2px #3182f6;
}

.reference-option-summary {
  flex-wrap: wrap;
  color: #333d4b;
}

.reference-option-badge {
  border-radius: 999px;
  padding: 3px 7px;
  color: #4e5968;
  background: #f2f4f6;
  font-size: 0.7857rem;
  font-weight: 700;
}

.reference-option-badge.is-renewable {
  color: #f04452;
  background: #fff0f1;
}

.reference-option-rate {
  display: flex;
  min-width: 0;
  min-height: 58px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 0;
  border-left: 1px solid #eef0f2;
  border-radius: 0;
  padding: 9px 7px;
  color: #191f28;
  background: transparent;
}

.reference-option-rate span {
  color: #8b95a1;
  font-size: 0.7857rem;
}

.reference-option-rate strong {
  font-size: 1.0714rem;
}

.reference-option-rate.is-selectable {
  width: 100%;
  font: inherit;
  cursor: pointer;
}

.reference-option-rate.is-selectable:hover,
.reference-option-rate.is-selectable:focus-visible,
.reference-option-rate.is-selectable.active,
.reference-option-rate.is-selectable.selected {
  outline: 0;
  color: #1b64da;
  background: rgba(49, 130, 246, 0.08);
}

.reference-option-rate.is-selectable.active,
.reference-option-rate.is-selectable.selected {
  border: 2px solid #3182f6;
  background: #e8f3ff;
  box-shadow: inset 0 0 0 1px rgba(49, 130, 246, 0.08);
}

.table-wrap {
  overflow: auto;
  border: 1px solid #e5e8eb !important;
  border-radius: 16px !important;
  padding: 0 !important;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.fee-table {
  border-spacing: 0;
  border-collapse: separate;
  font-size: 0.9286rem;
}

.fee-table th,
.fee-table td {
  border: 0 !important;
  border-bottom: 1px solid #e5e8eb !important;
  height: 36px;
  padding: 4px 6px;
}

.fee-table thead th {
  color: #4e5968 !important;
  background: #f9fafb !important;
  height: 36px;
  font-size: 0.9286rem;
}

.fee-table thead .period-title-row th {
  height: 36px;
}

.fee-table tbody .product-cell {
  padding: 2px 5px !important;
}

.fee-table .summary-cell,
.fee-table .total-cell,
.fee-table .value-cell {
  font-size: 0.9286rem;
}

.fee-table tbody tr:last-child th,
.fee-table tbody tr:last-child td {
  border-bottom: 0 !important;
}

.product-label {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 30px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 4px 6px;
  color: #191f28;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
}

.product-label .product-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: keep-all;
}

.card-title-wrapper {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-title-wrapper .title,
.card-title-wrapper .product-name {
  white-space: nowrap;
  word-break: keep-all;
}

.mapping-label {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 8px;
  color: #1b64da;
  background: #e8f3ff;
  font-size: 0.7857rem;
  font-weight: 800;
  white-space: nowrap;
}

.fee-table tbody tr.is-auto-mapped td {
  background: #e8f3ff !important;
}

.fee-table tbody tr.is-auto-mapped .product-cell {
  box-shadow: inset 4px 0 #3182f6;
}

.mobile-fee-card.is-auto-mapped {
  border-color: #8fc4ff;
  box-shadow: 0 0 0 3px rgba(49, 130, 246, 0.12), 0 4px 12px rgba(0, 0, 0, 0.03);
}

.summary-result-card {
  grid-column: 1 / -1;
  min-width: 0;
  margin-top: 4px;
  animation: summarySlideUp 0.4s ease-out;
}

.summary-result-card[hidden] {
  display: none !important;
}

.summary-result-card .calc-card {
  border: 1px solid #e5e8eb;
  border-radius: 16px;
  padding: 20px;
  background: #f9fafb;
}

.summary-result-card .calc-top {
  margin-bottom: 16px;
}

.summary-result-card .calc-top .title {
  min-width: 0;
  overflow: hidden;
  color: #191f28;
  font-size: 1.0714rem;
  font-weight: 800;
  text-overflow: ellipsis;
}

.summary-result-card .badge-tag {
  flex: 0 0 auto;
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  border: 1px solid #3182f6;
  border-radius: 999px;
  padding: 0 10px;
  color: #3182f6;
  background: #fff;
  font-size: 0.7857rem;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.summary-result-card .calc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.summary-result-card .stat-box {
  min-width: 0;
  border: 1px solid #e5e8eb;
  border-radius: 12px;
  padding: 14px 10px;
  text-align: center;
  background: #fff;
}

.summary-result-card .stat-label {
  margin-bottom: 4px;
  color: #6b7684;
  font-size: 0.8571rem;
  line-height: 1.4;
}

.summary-result-card .stat-value {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  color: #191f28;
  font-size: 1.2857rem;
  font-weight: 800;
  line-height: 1.25;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.summary-result-card .summary-rate {
  display: block;
  font-size: 1.2857rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.summary-result-card .summary-amount {
  display: block;
  color: #4e5968;
  font-size: 0.9286rem;
  font-weight: 650;
  line-height: 1.3;
  white-space: nowrap;
}

.summary-result-card .total-box {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 12px;
  padding: 16px;
  color: #fff;
  background: #3182f6;
}

.summary-result-card .total-box .stat-label {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1rem;
}

.summary-result-card .total-box .stat-value {
  color: #fff;
  font-size: 1.4286rem;
}

.summary-result-card .total-box .summary-rate {
  font-size: 1.4286rem;
}

.summary-result-card .total-box .summary-amount {
  color: rgba(255, 255, 255, 0.84);
}

@keyframes summarySlideUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.mobile-result-cards[hidden] {
  display: none !important;
}

.monthly-premium-disclosure {
  min-width: 0;
  grid-column: 1 / -1;
}

.monthly-premium-disclosure > summary {
  display: none;
}

.monthly-premium-disclosure > .reference-search-field {
  display: grid;
}

@media (max-width: 1023px) {
  .detailed-results-section {
    display: none !important;
  }

  .monthly-premium-disclosure > summary.monthly-premium-summary {
    display: flex;
    min-height: 38px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-radius: 10px;
    padding: 0 4px;
    color: #3182f6;
    font-size: 0.9286rem;
    font-weight: 750;
    cursor: pointer;
    list-style: none;
  }

  .monthly-premium-disclosure > summary.monthly-premium-summary::-webkit-details-marker {
    display: none;
  }

  .monthly-premium-disclosure > summary.monthly-premium-summary::after {
    content: "+";
    font-size: 1.4286rem;
    line-height: 1;
  }

  .monthly-premium-disclosure[open] > summary.monthly-premium-summary::after {
    content: "−";
  }

  .monthly-premium-disclosure:not([open]) > .reference-search-field {
    display: none;
  }

  .monthly-premium-disclosure[open] > .reference-search-field {
    display: grid;
    margin-top: 8px;
  }

  .table-header-container {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 20px;
  }

  .table-header-container > div:first-child {
    width: 100%;
    flex-basis: auto;
  }

  .table-header-primary {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .table-header-primary .title,
  .table-header-link-group {
    grid-column: 1 / -1;
  }

  .table-header-container .title {
    white-space: nowrap;
    word-break: keep-all;
  }

  .table-header-primary .strategy-lookup-button,
  .table-header-actions button {
    width: 100%;
    min-width: 0;
  }

  .table-header-link-group,
  .table-header-actions {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .table-header-link-group .reference-download-link,
  .table-header-actions > * {
    width: 100%;
    min-width: 0;
  }

  .table-header-link-group .reference-download-link {
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
  }

  .table-wrap {
    display: none !important;
  }

  .mobile-result-cards {
    display: grid;
    gap: 12px;
  }

  .mobile-fee-card {
    margin: 0;
    padding: 18px;
  }

  .mobile-fee-card-title .product-button,
  .mobile-fee-card-title .product-label {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 0;
    padding: 0 0 14px;
    text-align: left;
    background: transparent;
  }

  .mobile-fee-card-title .product-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    color: #191f28;
    font-size: 1.2143rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-break: keep-all;
  }

  .mobile-fee-card-title .edit-label {
    flex: 0 0 auto;
    color: #3182f6;
    font-size: 0.9286rem;
    font-weight: 700;
  }

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

  .fee-card-stat {
    display: flex;
    min-width: 0;
    min-height: 72px;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    border: 1px solid #eef0f2;
    border-radius: 12px;
    padding: 12px;
    background: #f9fafb;
  }

  .fee-card-stat > span {
    color: #6b7684;
    font-size: 0.8571rem;
    font-weight: 700;
  }

  .fee-card-stat > strong {
    min-width: 0;
    color: #191f28;
    font-size: 1.0714rem;
    font-weight: 800;
    overflow-wrap: anywhere;
  }

  .fee-card-stat.is-total {
    border-color: #c9e2ff;
    background: #e8f3ff;
  }

  .reference-mobile-rate-select.selected {
    border-color: #3182f6;
    background: #e8f3ff;
    box-shadow: 0 0 0 3px rgba(49, 130, 246, 0.12);
  }
}

@media (max-width: 520px) {
  .table-header-link-group {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Comparison cart: isolated from the calculator's table and modal styles. */
.comparison-floating {
  position: fixed;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 45;
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid #235dd0;
  border-radius: 999px;
  background: #1d4ed8;
  color: #fff;
  box-shadow: 0 6px 22px #1d4ed833;
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
}
.comparison-floating:hover { background: #1e40af; }
.comparison-is-open { overflow: hidden; }
.comparison-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(540px, 100%);
  max-width: 100%;
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  color: #172333;
  background: #fff;
  box-shadow: -8px 0 36px #1723331f;
  overflow: hidden;
}
.comparison-drawer[open] { animation: comparison-slide-in 180ms ease-out; }
.comparison-drawer::backdrop { background: #16233c66; }
.comparison-panel { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.comparison-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 24px 24px 16px; border-bottom: 1px solid #e5e8eb;
}
.comparison-header h2 { margin: 0 0 8px; font-size: 1.5rem; color: #071e53; }
.comparison-header p, .comparison-footer p { margin: 0; font-size: .9286rem; line-height: 1.6; color: #64748b; }
.comparison-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; }
.comparison-toolbar > span { font-size: 1rem; font-weight: 800; }
.comparison-content { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 24px 20px; }
.comparison-list { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.comparison-item { min-width: 0; padding: 16px; border: 1px solid #e5e8eb; border-radius: 14px; background: #fff; overflow-wrap: anywhere; }
.comparison-item-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: #64748b; font-size: .9286rem; }
.comparison-item h3 { margin: 4px 0 8px; color: #142d85; font-size: 1.1429rem; line-height: 1.55; }
.comparison-condition { margin: 0 0 10px; font-size: 1rem; line-height: 1.6; }
.comparison-inputs { margin: 0 0 14px; color: #64748b; font-size: .9286rem; line-height: 1.6; }
.comparison-icon-button {
  display: grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px;
  padding: 0; border: 1px solid #e5e8eb; border-radius: 9px; background: #fff;
  color: #64748b; font: inherit; font-size: 1.5rem; cursor: pointer;
}
.comparison-icon-button:hover { color: #b42318; background: #fff1f0; }
.comparison-metrics { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 8px; margin: 0; padding: 12px; border-radius: 10px; background: #f5f8fc; text-align: center; }
.comparison-metrics dt { margin-bottom: 6px; color: #64748b; font-size: .8571rem; }
.comparison-metrics dd { margin: 0; font-weight: 800; font-size: 1.1429rem; }
.comparison-total dd { color: #2563eb; }
.comparison-amount { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin: 14px 0 0; font-size: 1rem; }
.comparison-empty { margin: 32px 0; text-align: center; color: #64748b; line-height: 1.8; }
.comparison-footer { flex-shrink: 0; padding: 16px 24px max(20px, env(safe-area-inset-bottom)); border-top: 1px solid #e5e8eb; background: #f9fafb; }
.comparison-footer .comparison-session-note { margin-top: 8px; font-size: .8571rem; }
.comparison-footer .comparison-status { color: #142d85; margin-top: 8px; }
.comparison-footer button { width: 100%; margin-top: 12px; min-height: 44px; font-size: 1rem; }
.comparison-add-mobile { display: none; }
.comparison-floating:focus-visible, .comparison-drawer button:focus-visible { outline: 3px solid #3182f6; outline-offset: 3px; }
.comparison-drawer button:disabled, [data-comparison-add]:disabled { opacity: .5; cursor: not-allowed; }
@keyframes comparison-slide-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) { .comparison-drawer[open] { animation: none; } }
@media (max-width: 1023px) {
  .comparison-add-mobile { display: block; width: 100%; margin-top: 12px; min-height: 40px; }
  .comparison-floating { right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); }
  .app-shell { padding-bottom: 80px; }
}
@media (max-width: 520px) {
  .comparison-header { padding: 20px 16px 12px; }
  .comparison-toolbar { padding: 12px 16px; }
  .comparison-content { padding: 0 16px 16px; }
  .comparison-footer { padding: 12px 16px max(16px, env(safe-area-inset-bottom)); }
}

/* 중간 폭 PC에서도 사이드바는 안정적으로 유지하고 결과 영역만 유연하게 줄인다. */
.reference-search-controls {
  display: flex;
  width: 100%;
  min-width: 0;
  flex-wrap: wrap;
  gap: 8px;
}

.reference-search-select-row {
  display: flex;
  width: 100%;
  min-width: 0;
  flex: 1 1 100%;
  flex-wrap: nowrap;
  gap: 8px;
}

.reference-search-select-row > .reference-search-field {
  width: auto;
  min-width: 0;
  flex: 1 1 calc(50% - 4px);
}

.reference-search-controls > .reference-product-field {
  width: 100%;
  min-width: 0;
  flex: 1 1 100%;
}

@media (min-width: 1024px) {
  .main {
    grid-template-columns: 350px minmax(0, 1fr);
  }

  .main.sidebar-right {
    grid-template-columns: minmax(0, 1fr) 350px;
  }

  .main > .control-card {
    width: 350px;
    min-width: 350px;
    max-width: 350px;
  }

  .main > .reference-product-result,
  .main > .result-card,
  .main > .footnote {
    min-width: 0;
  }

  .table-wrap {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }

  .table-wrap > .fee-table {
    width: 100%;
    min-width: 860px;
  }
}
