:root {
  --bg: #0f172a;
  --card: #ffffff;
  --muted-card: #f8fafc;
  --text: #111827;
  --subtext: #475569;
  --border: #e5e7eb;
  --primary: #111827;
  --primary-soft: #1f2937;
  --accent: #2563eb;
  --danger: #b91c1c;
  --warning: #b45309;
  --success: #047857;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", "Apple SD Gothic Neo", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.24), transparent 32rem),
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.14), transparent 28rem),
    linear-gradient(180deg, #0f172a 0%, #111827 100%);
}

button {
  font: inherit;
  cursor: pointer;
}

button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.45);
  outline-offset: 3px;
}

.page-shell {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 24px 16px 56px;
}

.hero-card,
.section-card,
.notice-card,
.status-banner {
  background: var(--card);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 34px 24px 30px;
  text-align: center;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(17, 24, 39, 0.98), rgba(30, 41, 59, 0.96)),
    radial-gradient(circle at top, rgba(37, 99, 235, 0.38), transparent 24rem);
  border-color: rgba(148, 163, 184, 0.28);
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.2);
  letter-spacing: 0.18em;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
}

.hero-card h1 {
  margin: 0;
  font-size: clamp(32px, 7vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-subtitle {
  margin: 16px auto 0;
  max-width: 660px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
  line-height: 1.7;
}

.status-banner {
  margin-top: 18px;
  padding: 16px 18px;
  display: grid;
  gap: 6px;
  border-left: 6px solid var(--accent);
  overflow-wrap: anywhere;
}

.status-banner strong {
  font-size: 17px;
}

.status-banner span {
  color: var(--subtext);
  line-height: 1.6;
}

.status-success { border-left-color: var(--success); }
.status-warning { border-left-color: var(--warning); }
.status-error { border-left-color: var(--danger); }
.status-info { border-left-color: var(--accent); }

.section-card,
.notice-card {
  margin-top: 18px;
  padding: 22px;
}

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

.section-card h2,
.notice-card h2 {
  margin: 0 0 8px;
  font-size: 21px;
  letter-spacing: -0.02em;
}

.section-desc,
.notice-card p {
  margin: 0;
  color: var(--subtext);
  font-size: 15px;
  line-height: 1.65;
}

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

.info-item,
.release-card > div {
  min-height: 86px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--muted-card);
  display: grid;
  align-content: center;
  gap: 6px;
  overflow-wrap: anywhere;
}

.info-label {
  color: var(--subtext);
  font-size: 13px;
  font-weight: 700;
}

.info-item strong,
.release-card strong {
  font-size: 17px;
  color: var(--text);
}

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

.notice-box {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: #f8fafc;
  border: 1px solid var(--border);
  overflow-wrap: anywhere;
}

.notice-box strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
}

.notice-box p {
  margin: 0;
  color: var(--subtext);
  line-height: 1.65;
}

.hidden {
  display: none !important;
}

.payment-card {
  padding: 18px;
  border: 1px solid #fde68a;
  border-radius: var(--radius-lg);
  background: #fffbeb;
}

.payment-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(180, 83, 9, 0.16);
}

.payment-row:last-child {
  border-bottom: 0;
}

.payment-row span {
  color: #92400e;
  font-weight: 700;
}

.payment-row strong {
  color: #78350f;
  text-align: right;
  overflow-wrap: anywhere;
}

.divider {
  height: 1px;
  background: rgba(180, 83, 9, 0.22);
  margin: 14px 0;
}

.primary-button,
.secondary-button {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: var(--radius-md);
  font-weight: 800;
  transition: transform 0.16s ease, opacity 0.16s ease, box-shadow 0.16s ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-soft));
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.22);
}

.secondary-button {
  margin-top: 14px;
  color: #111827;
  background: #e5e7eb;
}

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

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.deposit-reveal-box {
  margin-top: 14px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: #fef3c7;
  border: 1px solid #fde68a;
}

.deposit-reveal-box span {
  display: block;
  color: #92400e;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 6px;
}

.deposit-reveal-box strong {
  display: block;
  color: #78350f;
  font-size: 24px;
  letter-spacing: 0.08em;
  word-break: break-all;
}

.deposit-reveal-box p {
  margin: 10px 0 0;
  color: #92400e;
  line-height: 1.55;
}

.result-article {
  display: grid;
  gap: 16px;
}

.article-block {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--muted-card);
}

.article-block h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.article-block p {
  margin: 0;
  color: #1f2937;
  line-height: 1.85;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.tts-button-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.tts-button-row .secondary-button {
  margin-top: 0;
}

.tts-status-text {
  margin: 12px 0 0;
  color: var(--subtext);
  font-size: 14px;
  line-height: 1.6;
}

.notice-card {
  background: #f8fafc;
}

.notice-strong {
  margin-top: 10px !important;
  font-weight: 800;
  color: #0f172a !important;
}

@media (max-width: 760px) {
  .page-shell {
    padding: 16px 12px 44px;
  }

  .hero-card {
    padding: 30px 18px 26px;
  }

  .section-card,
  .notice-card,
  .status-banner {
    padding: 18px;
    border-radius: 20px;
  }

  .info-grid,
  .release-card {
    grid-template-columns: 1fr;
  }

  .payment-row {
    display: grid;
    gap: 4px;
  }

  .payment-row strong {
    text-align: left;
  }

  .deposit-reveal-box strong {
    font-size: 21px;
  }
}
/* STEP58-13E integrated relation / conversion surfaces */

.relation-card {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(
      180deg,
      rgba(239, 246, 255, 0.92),
      rgba(248, 250, 252, 0.98)
    );
  overflow: hidden;
}

.relation-card-kicker,
.conversion-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 0.03em;
}

.relation-card-title {
  margin: 0;
  color: var(--text);
  font-size: 21px;
  line-height: 1.4;
  letter-spacing: -0.025em;
  word-break: keep-all;
}

.relation-share-message {
  margin: 10px 0 0;
  color: var(--subtext);
  font-size: 16px;
  line-height: 1.72;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.relation-orbit {
  position: relative;
  width: min(100%, 350px);
  height: 260px;
  margin: 20px auto 16px;
}

.relation-orbit::before,
.relation-orbit::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.relation-orbit::before {
  width: 196px;
  height: 120px;
}

.relation-orbit::after {
  width: 304px;
  height: 214px;
}

.relation-node {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 7px 18px rgba(15, 23, 42, 0.08);
}

.relation-node-self {
  left: 50%;
  top: 50%;
  min-width: 58px;
  min-height: 40px;
  transform: translate(-50%, -50%);
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  font-size: 13px;
}

.relation-node-family {
  left: 0;
  top: 22px;
}

.relation-node-partner {
  left: 50%;
  top: 0;
  transform: translateX(-50%);
}

.relation-node-friend {
  right: 0;
  top: 22px;
}

.relation-node-upper {
  left: 0;
  top: 105px;
}

.relation-node-senior {
  right: 0;
  top: 105px;
}

.relation-node-leading {
  left: 3%;
  bottom: 30px;
}

.relation-node-work {
  right: 3%;
  bottom: 30px;
}

.relation-node-business {
  left: 50%;
  bottom: 0;
  max-width: 190px;
  transform: translateX(-50%);
}

.relation-line {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: 94px;
  height: 1px;
  background: rgba(37, 99, 235, 0.24);
  transform-origin: left center;
}

.relation-line-family   { transform: rotate(-145deg); }
.relation-line-partner  { transform: rotate(-90deg); }
.relation-line-friend   { transform: rotate(-35deg); }
.relation-line-upper    { transform: rotate(180deg); }
.relation-line-senior   { transform: rotate(0deg); }
.relation-line-leading  { transform: rotate(145deg); }
.relation-line-work     { transform: rotate(35deg); }
.relation-line-business { transform: rotate(90deg); }

.relation-group-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  margin: 5px 0 18px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.relation-group-list p {
  margin: 0;
  color: var(--subtext);
  font-size: 13px;
  line-height: 1.55;
  word-break: keep-all;
}

.relation-group-list strong {
  color: var(--text);
  font-weight: 800;
}

.relation-group-list span {
  color: var(--subtext);
}

.relation-share-button {
  min-height: 52px;
  margin-top: 2px;
  font-size: 16px;
}

.relation-share-hint {
  margin: 10px 0 0;
  color: var(--subtext);
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
}

.conversion-surface {
  margin-top: 18px;
  padding: 20px;
  border-color: rgba(15, 23, 42, 0.16);
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.98),
      rgba(248, 250, 252, 0.98)
    );
}

#mypageHubConversionMessage {
  white-space: pre-line;
  font-size: 16px;
  line-height: 1.75;
  word-break: keep-all;
}

#mypageHubConversionActions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin-top: 14px !important;
}

#mypageHubConversionActions .primary-button {
  min-height: 50px !important;
}

@media (max-width: 760px) {
  .article-block {
    padding: 16px;
  }

  .article-block h3 {
    font-size: 18px;
    line-height: 1.4;
  }

  .article-block p {
    font-size: 16px;
    line-height: 1.78;
  }

  .relation-card,
  .conversion-surface {
    margin-top: 16px;
    padding: 18px;
    border-radius: 18px;
  }

  .relation-card-title {
    font-size: 20px;
    line-height: 1.42;
  }

  .relation-share-message {
    font-size: 16px;
    line-height: 1.72;
  }

  #mypageHubConversionActions {
    grid-template-columns: 1fr !important;
  }

  #mypageHubConversionActions .primary-button,
  .relation-share-button {
    min-height: 52px !important;
  }
}

@media (max-width: 380px) {
  .page-shell {
    padding-left: 10px;
    padding-right: 10px;
  }

  .relation-card,
  .conversion-surface {
    padding: 16px;
  }

  .relation-card-title {
    font-size: 19px;
  }

  #mypageHubConversionMessage {
    font-size: 16px;
  }
}
/* STEP58-13E relation orbit mobile v5 */

@media (max-width: 760px) {
  .relation-orbit {
    width: 100%;
    height: 248px;
    margin-top: 18px;
  }

  .relation-orbit::before {
    width: 184px;
    height: 112px;
  }

  .relation-orbit::after {
    width: 280px;
    height: 202px;
  }

  .relation-node {
    min-height: 31px;
    padding: 0 7px;
    font-size: 10.8px;
  }

  .relation-node-business {
    max-width: 184px;
  }

  .relation-group-list {
    padding: 12px;
  }
}

@media (max-width: 380px) {
  .relation-orbit {
    height: 236px;
  }

  .relation-orbit::after {
    width: 260px;
    height: 190px;
  }

  .relation-node {
    padding: 0 6px;
    font-size: 10px;
  }

  .relation-node-business {
    max-width: 170px;
  }

  .relation-group-list p {
    font-size: 12.5px;
  }
}


/* STEP7-10C mobile legal footer + action surface */

.legal-footer {
  margin-top: 24px;
  padding: 20px 12px 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
  color: #817b91;
  font-size: 12px;
  line-height: 1.8;
  text-align: center;
  word-break: keep-all;
}

.legal-footer > a {
  display: inline-block;
  padding: 6px 4px;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-footer > details {
  display: block !important;
  margin-top: 8px;
  text-align: center !important;
}

.legal-footer > details > summary {
  display: inline-block !important;
  min-height: 40px;
  padding: 8px 6px;
  cursor: pointer;
  line-height: 24px;
}

.legal-footer > details > div {
  max-width: 420px;
  margin: 6px auto 0 !important;
  padding: 12px;
  box-sizing: border-box;
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.92);
  line-height: 1.75;
  text-align: left;
}

.legal-footer-logout {
  display: block;
  width: 100%;
  max-width: 420px;
  min-height: 48px;
  margin: 18px auto 0 !important;
}

#renewalButton {
  width: 100%;
  min-height: 50px;
  font-size: 16px;
  font-weight: 800;
}

@media (max-width: 760px) {
  .legal-footer {
    margin-top: 20px;
    padding: 18px 8px 16px;
    font-size: 12px;
    line-height: 1.75;
  }

  .legal-footer > a {
    min-height: 44px;
    padding: 10px 5px;
    line-height: 24px;
  }

  .legal-footer > details > summary {
    min-height: 44px;
    padding: 10px 5px;
  }

  .legal-footer > details > div {
    width: 100%;
  }

  #renewalActionBox {
    margin: 16px 0 18px !important;
  }

  #renewalButton {
    min-height: 52px;
  }
}

@media (max-width: 380px) {
  .legal-footer {
    padding-left: 4px;
    padding-right: 4px;
  }

  .legal-footer > a {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }
}


/* STEP7-10C business info 4-card rotator */

.business-info-details {
  display: block;
  margin-top: 8px;
  text-align: center;
}

.business-info-details > summary {
  display: inline-block;
  min-height: 40px;
  padding: 8px 6px;
  cursor: pointer;
  line-height: 24px;
}

.business-info-rotator {
  position: relative;
  width: 100%;
  max-width: 420px;
  min-height: 72px;
  margin: 8px auto 0;
}

.business-info-card {
  display: none;
  width: 100%;
  min-height: 72px;
  padding: 12px 16px;
  box-sizing: border-box;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.96);
  text-align: left;
}

.business-info-card.is-active {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.business-info-label {
  color: #817b91;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 700;
}

.business-info-card strong {
  color: #4b5563;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 700;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .business-info-details > summary {
    min-height: 44px;
    padding: 10px 5px;
  }

  .business-info-rotator {
    min-height: 68px;
  }

  .business-info-card {
    min-height: 68px;
    padding: 11px 14px;
    border-radius: 16px;
  }

  .business-info-label {
    font-size: 10.5px;
  }

  .business-info-card strong {
    font-size: 12.5px;
  }
}

@media (max-width: 380px) {
  .business-info-card {
    padding: 10px 12px;
  }

  .business-info-card strong {
    font-size: 12px;
  }
}
