/* 공간원팀 계정 화면 (가입·로그인·인증·비밀번호·내 계정·결제·결제 결과). site.css 토큰을 그대로 쓴다.
 * 금액·날짜·카드번호는 한 줄로 묶고(.num), 제목과 안내 문단은 균형 줄바꿈한다. 입력 16px, 터치 44px 이상.
 */
.acct-main {
  max-width: 560px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  display: grid;
  gap: 20px;
}
.acct-main.wide {
  max-width: 960px;
}
.acct-main > * {
  min-width: 0;
}
.acct-main h1 {
  font-size: 28px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.acct-main h2 {
  font-size: 19px;
  line-height: 1.4;
  font-weight: 600;
  text-wrap: balance;
}
.acct-main p,
.acct-main li {
  text-wrap: pretty;
}
.acct-lead {
  color: var(--muted);
  font-size: 15px;
  margin-top: 6px;
}
.num {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.acct-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: grid;
  gap: 16px;
}
.acct-card > h2 + p {
  margin-top: -8px;
}
.acct-form {
  display: grid;
  gap: 16px;
}
.acct-form .field input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #c9d3de;
  border-radius: var(--btn-radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
}
.acct-form .field input:focus {
  outline: 3px solid rgba(64, 99, 131, 0.35);
  outline-offset: 1px;
  border-color: var(--primary);
}
.acct-form .field.has-error input {
  border-color: var(--danger);
}
.acct-form .row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.agree-box {
  display: grid;
  gap: 4px;
  padding: 12px 16px;
  background: var(--staff);
  border-radius: 12px;
}
.agree-box label {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  min-height: 44px;
  padding: 10px 0;
  font-size: 15px;
  line-height: 1.5;
  cursor: pointer;
}
.agree-box label + label {
  border-top: 1px solid var(--border);
}
.agree-box input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--primary);
}
.agree-box a {
  color: var(--primary);
  font-weight: 600;
  white-space: nowrap;
}
.agree-all {
  font-weight: 600;
}
.btn-block {
  width: 100%;
  justify-content: center;
}
.acct-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.acct-actions .btn {
  min-height: 48px;
}
.acct-actions .btn[disabled],
.btn-block[disabled] {
  background: #aeb9c5;
  border-color: #aeb9c5;
  color: #fff;
  cursor: not-allowed;
}
.acct-links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
}
.acct-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--primary);
}
.acct-msg {
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.6;
}
.acct-msg[hidden] {
  display: none;
}
.acct-msg.is-ok {
  background: #eaf3ef;
  color: #21513f;
}
.acct-msg.is-error {
  background: #fbefee;
  color: var(--danger);
}
.acct-msg.is-wait {
  background: #fbf6ee;
  color: #6b4f22;
  border: 1px solid var(--attention);
}
.acct-msg b {
  display: block;
  margin-bottom: 2px;
}
.pw-rule {
  font-size: 13px;
  color: var(--muted);
}
.ts-box {
  min-height: 65px;
}

/* 내 계정 */
.acct-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.acct-head .who {
  font-size: 14px;
  color: var(--muted);
}
.acct-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.plan-card {
  display: grid;
  gap: 16px;
}
.plan-card .plan-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.plan-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.plan-tag.is-paid {
  background: #eaf3ef;
  color: #21513f;
}
.plan-tag.is-warn {
  background: #fbefee;
  color: var(--danger);
}
dl.kv {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 20px;
  margin: 0;
  font-size: 15px;
}
dl.kv dt {
  color: var(--muted);
}
dl.kv dd {
  margin: 0;
  min-width: 0;
}
.limits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.limits div {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--staff);
}
.limits dt {
  font-size: 13px;
  color: var(--muted);
}
.limits dd {
  margin: 2px 0 0;
  font-size: 18px;
  font-weight: 600;
  white-space: nowrap;
}
.app-note {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--attention);
  background: #fbf6ee;
  font-size: 14px;
  line-height: 1.6;
  color: #6b4f22;
}
.acct-danger summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
}

/* 결제 */
.plan-options {
  display: grid;
  gap: 10px;
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.plan-options label {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid #c9d3de;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  min-height: 72px;
}
.plan-options label:has(input:checked) {
  border-color: var(--primary);
  background: var(--soft);
  box-shadow: inset 0 0 0 1px var(--primary);
}
.plan-options input {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
  margin: 0;
}
.plan-options .p-name {
  font-weight: 600;
  font-size: 17px;
}
.plan-options .p-meta {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}
.plan-options .p-price {
  text-align: right;
  font-weight: 600;
  font-size: 17px;
  white-space: nowrap;
}
.plan-options .p-price small {
  display: block;
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
}
.pay-summary {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 12px;
  background: var(--staff);
}
.pay-summary .total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-weight: 600;
}
.pay-summary .total .num {
  font-size: 22px;
}
.secure-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.secure-note svg {
  flex: none;
  margin-top: 2px;
}

/* 결제 결과 */
.result-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.result-icon.ok {
  background: #eaf3ef;
  color: var(--success);
}
.result-icon.fail {
  background: #fbefee;
  color: var(--danger);
}
.result-icon.wait {
  background: #fbf6ee;
  color: var(--attention);
}

@media (min-width: 900px) {
  .acct-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: start;
  }
  .acct-grid .span2 {
    grid-column: 1/-1;
  }
}
@media (max-width: 640px) {
  .acct-main {
    padding: 24px 16px 64px;
    gap: 16px;
  }
  .acct-main h1 {
    font-size: 24px;
  }
  .acct-card {
    padding: 20px;
  }
  .acct-form .row2 {
    grid-template-columns: 1fr;
  }
  .plan-options label {
    grid-template-columns: 22px 1fr;
    row-gap: 6px;
  }
  .plan-options .p-price {
    grid-column: 2;
    text-align: left;
  }
  .plan-options .p-price small {
    display: inline;
    margin-left: 6px;
  }
}

/* details 제목 터치 영역 */
.acct-card > summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
}

/* hidden 속성은 카드·그리드 display보다 우선한다 */
.acct-main [hidden] {
  display: none !important;
}
.nw {
  white-space: nowrap;
}
.agree-box span,
dl.kv dd {
  text-wrap: pretty;
}

/* 카드 제목줄(요금제·유료 구독 공통)과 접힌 카드 높이 */
.acct-card .plan-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
details.acct-card {
  padding-top: 12px;
  padding-bottom: 12px;
}
details.acct-card[open] {
  padding-bottom: 24px;
}

/* 문장 속 링크는 Primary 색 */
.acct-main a:not(.btn) {
  color: var(--primary);
  font-weight: 600;
}

/* 운영 문의 (내 계정 맨 위 카드, 고객센터) */
.sub-head [hidden] {
  display: none !important;
}
.support-stats {
  font-size: 14px;
  color: var(--muted);
}
.acct-form .field select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #c9d3de;
  border-radius: var(--btn-radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
}
.acct-form .field select:focus {
  outline: 3px solid rgba(64, 99, 131, 0.35);
  outline-offset: 1px;
  border-color: var(--primary);
}
.acct-form .field.has-error select,
.acct-form .field.has-error textarea {
  border-color: var(--danger);
}
.support-items,
.support-replies {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.acct-main .support-items a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  min-height: 44px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--ink);
  font-weight: 400;
  text-decoration: none;
}
.acct-main .support-items a:hover {
  border-color: var(--primary);
}
.support-item-title {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.support-meta {
  font-size: 13px;
  color: var(--muted);
}
.support-items .support-meta {
  grid-column: 1;
}
.support-tags {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.support-q,
.support-answers {
  display: grid;
  gap: 10px;
}
.support-q {
  padding: 16px;
  border-radius: 12px;
  background: var(--staff);
}
.support-q h3,
.support-answers h3 {
  font-size: 17px;
  line-height: 1.45;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.support-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.7;
}
.support-replies li {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 12px;
  background: #fff;
}
.support-faq details {
  border-top: 1px solid var(--border);
  padding: 4px 0;
}
.support-faq summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
  font-weight: 600;
}
.support-faq details p {
  padding: 0 0 12px;
  color: var(--body, var(--ink));
  font-size: 15px;
  line-height: 1.7;
}
@media (max-width: 640px) {
  .acct-main .support-items a {
    grid-template-columns: minmax(0, 1fr);
  }
  .support-tags {
    grid-column: 1;
    grid-row: auto;
    justify-content: flex-start;
  }
}
