/* 로그인 표시, '내 앱', '앱 제출' 화면.
   색·모서리·글꼴은 tokens.css 의 이름을 그대로 쓴다. --top 은 console.css 에 있다. 글자 굵기는 400 · 600 · 700 만 쓴다. */

/* ---------- 머리의 로그인 표시 ---------- */

.ac-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 200px;
  height: 36px;
  padding: 0 12px 0 4px;
  border-radius: var(--r-pill);
  background: var(--fill);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
}
.ac-chip:hover { background: var(--fill-2); }
.ac-chip span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-chip.out { padding: 0 14px; }

.ac-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}
.ac-avatar.lg { width: 56px; height: 56px; font-size: 24px; }
/* 색조 번호는 스토어의 사용자 얼굴과 같은 순서다: 초록, 노랑, 파랑, 빨강, 보라, 주황 */
.ac-t0 { background: var(--accent-soft); color: var(--accent); }
.ac-t1 { background: var(--warn-soft); color: var(--warn); }
.ac-t2 { background: var(--info-soft); color: var(--info); }
.ac-t3 { background: var(--danger-soft); color: var(--danger); }
.ac-t4 { background: var(--violet-soft); color: var(--violet); }
.ac-t5 { background: color-mix(in srgb, var(--star) 24%, var(--bg)); color: var(--warn); }

/* ---------- 공통 ---------- */

.ac-root { margin-top: 28px; }
.ac-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-box);
  background: var(--surface);
}
.ac-fine { margin: 14px 0 0; color: var(--text-3); font-size: 13px; line-height: 20px; }
.ac-error { margin: 8px 0 0; color: var(--danger); font-size: 13.5px; font-weight: 600; line-height: 20px; }
.ac-skel { height: 180px; border-radius: var(--r-box); background: var(--fill); animation: ac-pulse 1.4s ease-in-out infinite; }
@keyframes ac-pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .ac-skel { animation: none; } }

.ac-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}
.ac-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ac-status.pending { background: var(--warn-soft); color: var(--warn); }
.ac-status.approved { background: var(--info-soft); color: var(--info); }
.ac-status.published { background: var(--accent-soft); color: var(--accent); }
.ac-status.rejected { background: var(--danger-soft); color: var(--danger); }
.ac-status.withdrawn { background: var(--fill); color: var(--text-2); }

.ac-notice { margin-top: 16px; padding: 14px 18px; border-radius: 12px; background: var(--fill); font-size: 14.5px; line-height: 23px; }
.ac-notice b { display: block; margin-bottom: 2px; color: var(--text-2); font-size: 13px; line-height: 19px; }
.ac-notice p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ac-notice.bad { background: var(--danger-soft); }
.ac-notice.bad b { color: var(--danger); }
.ac-notice.good { background: var(--accent-soft); }
.ac-notice.good b { color: var(--accent); }

/* ---------- 로그인 ---------- */

.ac-login {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  overflow: hidden;
}
.ac-login-how { padding: 32px; }
.ac-login-how h2 { margin: 0 0 6px; font-size: 23px; line-height: 30px; }
.ac-login-how > p { margin: 0; color: var(--text-2); }
.ac-login-how > .ac-fine { margin-top: 20px; color: var(--text-3); }
.ac-steps { display: grid; gap: 12px; margin: 22px 0 0; padding: 0; list-style: none; counter-reset: step; }
.ac-steps li { position: relative; padding-left: 40px; counter-increment: step; font-size: 15px; line-height: 26px; }
.ac-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -1px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--fill);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}
.ac-login-side { display: flex; flex-direction: column; justify-content: center; padding: 32px; background: var(--fill); }
.ac-login-form label { display: block; margin-bottom: 8px; font-size: 14px; line-height: 20px; font-weight: 600; }
.ac-login-row { display: flex; gap: 8px; }
.ac-code {
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--r-field);
  background: var(--bg);
  color: var(--text);
  font: 700 24px/1 var(--mono);
  letter-spacing: .28em;
  text-align: center;
}
.ac-code::placeholder { color: var(--line-2); }
.ac-code:focus { outline: 0; border-color: var(--accent); }
.ac-login-row .btn { min-height: 52px; padding-inline: 22px; font-size: 15.5px; }

/* ---------- 내 앱 ---------- */

.ac-me { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 16px; }
/* 내 정보는 상자 없이 한 줄로 둔다 */
.ac-card.ac-me { padding: 0; border: 0; background: none; }
.ac-me-text { display: grid; flex: 1 1 200px; min-width: 0; }
.ac-me-text b { font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -.03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-me-text span { color: var(--text-3); font-size: 13.5px; line-height: 20px; }
.ac-me-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* 칸 너비를 안의 내용이 밀어내지 못하게 한다. 좁은 화면에서 카드가 화면 밖으로 나가지 않는다. */
.ac-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 14px; }
.ac-section-title { display: flex; align-items: baseline; gap: 8px; margin: 44px 0 0; font-size: 23px; line-height: 30px; }
.ac-section-title small { color: var(--text-3); font-size: 15px; font-weight: 600; letter-spacing: 0; }

.ac-app-head { display: flex; align-items: center; gap: 14px; }
.ac-tile {
  display: grid;
  place-items: center;
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 22.5%;
  background: var(--fill);
  font-size: 28px;
  line-height: 1;
}
.ac-app-name { display: grid; gap: 1px; min-width: 0; margin-right: auto; }
.ac-app-name b { font-size: 18px; line-height: 24px; font-weight: 700; letter-spacing: -.02em; overflow-wrap: anywhere; }
.ac-app-name span { color: var(--text-3); font-size: 13px; line-height: 19px; }
.ac-app-name code { padding: 0; background: none; font-size: 13px; }

/* 통계: 가는 선 사이의 숫자 */
.ac-stats { display: flex; margin: 18px 0 0; padding: 14px 0; border-block: 1px solid var(--line); }
.ac-stats div { flex: 1 1 0; min-width: 0; padding: 0 16px; }
.ac-stats div:first-child { padding-left: 0; }
.ac-stats div:last-child { padding-right: 0; }
.ac-stats div + div { border-left: 1px solid var(--line); }
.ac-stats dt { color: var(--text-3); font-size: 12px; line-height: 18px; font-weight: 600; }
.ac-stats dd { margin: 2px 0 0; font-size: 18px; line-height: 24px; font-weight: 700; letter-spacing: -.02em; }
.ac-stats dd small { color: var(--text-3); font-size: 12.5px; font-weight: 400; letter-spacing: 0; white-space: nowrap; }

.ac-latest { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 18px 0 0; color: var(--text-2); font-size: 14px; line-height: 22px; }
.ac-latest b { color: var(--text); }
.ac-app-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.ac-history { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.ac-history summary { color: var(--text-2); font-size: 13.5px; font-weight: 600; cursor: pointer; }
.ac-history ul { display: grid; gap: 10px; margin: 12px 0 0; padding: 0; list-style: none; }
.ac-history li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--text-2); font-size: 13.5px; line-height: 21px; }
.ac-history li b { color: var(--text); }
.ac-history li p { flex-basis: 100%; margin: 0; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }

.ac-empty { padding: 44px 24px; border: 1.5px dashed var(--line-2); border-radius: var(--r-card); text-align: center; }
.ac-empty h2 { margin: 0 0 6px; font-size: 20px; line-height: 26px; }
.ac-empty p { max-width: 520px; margin: 0 auto; color: var(--text-2); font-size: 14.5px; line-height: 24px; }
.ac-empty .ac-me-actions { justify-content: center; margin-top: 22px; }

/* ---------- 앱 제출 ---------- */

.ac-step-title { display: flex; align-items: center; gap: 12px; margin: 44px 0 0; font-size: 23px; line-height: 30px; }
.ac-step-title:first-child { margin-top: 0; }
#form-step { margin-top: 44px; }
.ac-step-title i {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--fill);
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}
.ac-step-lead { max-width: 720px; margin: 6px 0 0; color: var(--text-2); }
.ac-drop { margin-top: 18px; }
.ac-drop.done { padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--r-box); background: var(--surface); text-align: left; }
.ac-picked { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.ac-picked .verdict-icon { width: 42px; height: 42px; }
.ac-picked.pass .verdict-icon { background: var(--accent-soft); color: var(--accent); }
.ac-picked.warn .verdict-icon { background: var(--warn-soft); color: var(--warn); }
.ac-picked.fail .verdict-icon { background: var(--danger-soft); color: var(--danger); }
.ac-picked-text { display: grid; min-width: 0; margin-right: auto; }
.ac-picked-text b { font-size: 16.5px; line-height: 24px; font-weight: 700; letter-spacing: -.02em; overflow-wrap: anywhere; }
.ac-picked-text span { color: var(--text-2); font-size: 13.5px; line-height: 20px; }
.ac-issues { margin: 16px 0 0; padding: 0; border-top: 1px solid var(--line); list-style: none; font-size: 14px; line-height: 22px; }
.ac-issues li { padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--text-2); overflow-wrap: anywhere; }
.ac-issues li.error, .ac-issues li.warning { color: var(--text); }
.ac-issues b { display: inline-block; margin-right: 10px; padding: 0 8px; border-radius: 6px; font-size: 12px; line-height: 22px; white-space: nowrap; }
.ac-issues li.error b { background: var(--danger-soft); color: var(--danger); }
.ac-issues li.warning b { background: var(--warn-soft); color: var(--warn); }

.ac-form-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; margin-top: 18px; }
.ac-fields { display: grid; gap: 22px; }
.ac-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ac-field > label { display: flex; align-items: center; gap: 8px; min-height: 20px; margin-bottom: 7px; font-size: 14px; line-height: 20px; font-weight: 600; }
.ac-field .ac-opt { color: var(--text-3); font-size: 12.5px; font-weight: 400; }
.ac-field .ac-count { margin-left: auto; color: var(--text-3); font-size: 12.5px; font-weight: 400; font-variant-numeric: tabular-nums; }
.ac-field .ac-count.over { color: var(--danger); font-weight: 600; }
.ac-input, .ac-area, .ac-select {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: var(--r-field);
  background: var(--fill);
  color: var(--text);
  font: inherit;
  font-size: 15.5px;
  line-height: 1.5;
}
.ac-input::placeholder, .ac-area::placeholder { color: var(--text-3); }
.ac-area { min-height: 132px; resize: vertical; }
.ac-area.sm { min-height: 88px; }
.ac-input:focus, .ac-area:focus, .ac-select:focus { outline: 0; border-color: var(--accent); }
.ac-input[readonly] { color: var(--text-3); }
.ac-input[readonly]:focus { border-color: var(--line-2); }
.ac-input.mono { font-family: var(--mono); font-size: 14.5px; letter-spacing: 0; }
.ac-field.bad .ac-input, .ac-field.bad .ac-area, .ac-field.bad .ac-select { border-color: var(--danger); }
.ac-hint { margin: 7px 0 0; color: var(--text-3); font-size: 13px; line-height: 20px; }
.ac-hint.ok { color: var(--accent); font-weight: 600; }
.ac-hint.no { color: var(--danger); font-weight: 600; }
.ac-emoji-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ac-emoji-row button {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: var(--fill);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}
.ac-emoji-row button:hover { background: var(--fill-2); }
.ac-emoji-row button[aria-pressed="true"] { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.ac-emoji-input { max-width: 110px; font-size: 22px; text-align: center; }

.ac-aside { position: sticky; top: calc(var(--top) + 20px); display: grid; gap: 16px; }
.ac-aside h3 { margin: 0 0 12px; color: var(--text-3); font-size: 12px; line-height: 18px; font-weight: 600; letter-spacing: 0; }
/* 스토어 목록의 한 줄과 같은 모양 */
.ac-preview { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-block: 1px solid var(--line); }
.ac-preview img, .ac-preview .ac-letter { flex: none; width: 60px; height: 60px; border-radius: 22.5%; }
.ac-preview img { box-shadow: 0 0 0 .5px var(--tile-ring); }
.ac-preview .ac-letter { display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 26px; font-weight: 700; line-height: 1; }
.ac-preview-text { display: grid; min-width: 0; }
.ac-preview-text b { font-size: 16px; line-height: 22px; letter-spacing: -.015em; overflow-wrap: anywhere; }
.ac-preview-text span { color: var(--text-2); font-size: 13.5px; line-height: 19px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ac-preview-text small { margin-top: 2px; color: var(--text-3); font-size: 12.5px; line-height: 17px; }
.ac-library { display: flex; align-items: center; gap: 12px; margin-top: 14px; color: var(--text-2); font-size: 13px; line-height: 20px; }
.ac-library i { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--fill); font-size: 22px; font-style: normal; }
.ac-facts { display: grid; margin: 0; font-size: 14px; line-height: 21px; }
.ac-facts div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; }
.ac-facts div:first-child { padding-top: 0; }
.ac-facts div:last-child { padding-bottom: 0; }
.ac-facts div + div { border-top: 1px solid var(--line); }
.ac-facts dt { flex: none; color: var(--text-2); }
.ac-facts dd { margin: 0; text-align: right; overflow-wrap: anywhere; }

.ac-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.ac-submit .btn { min-height: 50px; padding-inline: 26px; font-size: 16px; }
.ac-submit p { flex: 1 1 260px; margin: 0; color: var(--text-3); font-size: 13px; line-height: 20px; }
.ac-submit .ac-error { flex-basis: 100%; color: var(--danger); font-size: 13.5px; }

.ac-done { padding: 44px 28px; border-radius: var(--r-card); background: var(--fill); text-align: center; }
.ac-done .verdict-icon { width: 56px; height: 56px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.ac-done .verdict-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ac-done h2 { margin: 16px 0 6px; font-size: 23px; line-height: 30px; }
.ac-done h2:focus { outline: 0; }
.ac-done > p { max-width: 540px; margin: 0 auto; color: var(--text-2); }
.ac-done ol { display: inline-grid; gap: 6px; max-width: 540px; margin: 20px auto 0; padding-left: 20px; text-align: left; font-size: 14.5px; line-height: 24px; }
.ac-done .ac-me-actions { justify-content: center; margin-top: 26px; }
.ac-done .btn:not(.primary) { background: var(--bg); }

/* ---------- 좁은 화면 ---------- */

@media (max-width: 900px) {
  .ac-login { grid-template-columns: minmax(0, 1fr); }
  .ac-form-grid { grid-template-columns: minmax(0, 1fr); }
  .ac-aside { position: static; order: -1; }
}

@media (max-width: 640px) {
  /* 머리 첫 줄에는 로고와 로그인 표시만 둔다. 닉네임은 감추고 얼굴만 보인다. */
  .ac-chip { padding: 0 4px; }
  .ac-chip:not(.out) span:last-child { display: none; }
  .ac-chip.out { padding: 0 12px; }
  .ac-card { padding: 18px; }
  .ac-login-how, .ac-login-side { padding: 22px 18px; }
  .ac-pair { grid-template-columns: minmax(0, 1fr); }
  .ac-step-title, .ac-section-title { font-size: 21px; line-height: 28px; }
  .ac-code { font-size: 21px; letter-spacing: .2em; }
  .ac-stats div { padding: 0 12px; }
  .ac-submit .btn { width: 100%; }
}
