/* =========================================================
 * 알페스 야차뜨기 — 공통 css/style.css 위에 덧붙이는 스타일
 * 색은 아래 변수만 바꾸면 돼요.
 * ========================================================= */
@font-face { font-family: 'VITRO-INSPIRE'; src: url('https://cdn.jsdelivr.net/npm/@noonnu/vitro-inspire-ttf@0.1.0/fonts/vitro-inspire-ttf-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }

.theme-alps {
  --ap-point: #582428;      /* 버튼·팀 이름·키워드 */
  --ap-point-soft: #97787a; /* keyword 글씨 */
  --ap-card: #f5f5f5;       /* 결과 카드 바탕 */
  --ap-ink: #222222;
  --ff-vitro: 'VITRO-INSPIRE', 'Presentation', sans-serif;
  --c-point: var(--ap-point);
  background: #f3eff0;
}
.theme-alps #app { background: #fff; }

/* 1. 메인 (배경 그림에 제목이 들어 있어요) */
.ap-main {
  position: relative;
  background: #5a2a2e url('img/main.webp') center top / cover no-repeat;
}
.ap-main.is-active { justify-content: flex-end; }
.ap-main-btns { display: flex; flex-direction: column; gap: 10px; padding: 0 10px calc(26px + env(safe-area-inset-bottom)); }
.ap-mode {
  height: 62px; border: 0; border-radius: 12px; background: #fff;
  font-family: var(--ff-vitro); font-size: 22px; color: var(--ap-ink); letter-spacing: -.2px;
  box-shadow: 0 6px 20px rgba(40, 0, 6, .18);
  transition: transform .12s ease;
}
.ap-mode:active { transform: scale(.98); }

/* 공통 버튼 */
.ap-btn-fill, .ap-btn-line {
  display: flex; align-items: center; justify-content: center; width: 100%;
  font-family: var(--ff-vitro); letter-spacing: -.2px; transition: transform .12s ease, opacity .12s ease;
}
.ap-btn-fill { height: 50px; border: 0; border-radius: 999px; background: var(--ap-point); color: #fff; font-size: 21px; }
.ap-btn-fill:disabled { opacity: .35; cursor: default; }
.ap-btn-line { height: 62px; border: 1px solid var(--ap-point); border-radius: 13px; background: #fff; color: var(--ap-ink); font-size: 21px; }
.ap-btn-fill:not(:disabled):active, .ap-btn-line:active { transform: scale(.98); }

/* 2. 팀 고르기 */
.ap-pick-body { flex: 1; display: flex; flex-direction: column; padding: 52px 27px 28px; }
.ap-lead { margin: 0; font-size: 16px; font-weight: 400; text-align: center; line-height: 1.5; }
.ap-search { position: relative; margin-top: 20px; }
.ap-search-input {
  width: 100%; height: 44px; padding: 0 46px 0 20px;
  border: 1.5px solid var(--ap-point); border-radius: 999px; background: #fff;
  font-size: 16px; color: var(--ap-ink); outline: none; -webkit-appearance: none; appearance: none;
}
.ap-search-input::placeholder { color: #a5a5a5; }
.ap-search-input::-webkit-search-cancel-button { display: none; }
.ap-search-input:disabled { background: #fafafa; }
.ap-search-icon { position: absolute; right: 17px; top: 11px; width: 17px; height: 17px; border: 1.5px solid var(--ap-point); border-radius: 50%; pointer-events: none; }
.ap-search-icon::after { content: ''; position: absolute; right: -6px; bottom: -5px; width: 8px; height: 1.5px; background: var(--ap-point); transform: rotate(45deg); }
.ap-suggest {
  position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 6px);
  margin: 0; padding: 6px; list-style: none;
  background: #fff; border: 1px solid #e3d7d8; border-radius: 14px; box-shadow: 0 8px 24px rgba(40, 0, 6, .1);
  max-height: 300px; overflow-y: auto;
}
.ap-suggest li button, .ap-suggest li.ap-empty {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px 10px; border: 0; border-radius: 8px; background: none; text-align: left; font-size: 15px;
}
.ap-suggest li button:hover, .ap-suggest li button[aria-selected="true"] { background: #f7f1f1; }
.ap-suggest li button[disabled] { opacity: .45; cursor: default; }
.ap-suggest b { font-weight: 600; }
.ap-suggest .ap-alias { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--c-sub); }
.ap-suggest li.ap-empty { flex-direction: column; align-items: stretch; gap: 10px; color: var(--c-sub); font-size: 14px; cursor: default; text-align: center; }
.ap-suggest li.ap-empty .ap-btn-fill { height: 44px; font-size: 18px; }
.ap-tag { flex-shrink: 0; padding: 2px 8px; border-radius: 999px; background: #f3e9ea; font-size: 11px; color: var(--ap-point); }

.ap-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.ap-chips li { display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 14px; border-radius: 999px; background: var(--ap-point); color: #fff; max-width: 100%; }
.ap-chips .ap-chip-name { min-width: 0; font-family: var(--ff-vitro); font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-chips small { font-size: 11px; opacity: .75; white-space: nowrap; }
.ap-chips .ap-x { width: 24px; height: 24px; background: rgba(255, 255, 255, .18); color: #fff; font-size: 11px; }
.ap-chips .ap-hint { padding: 0; background: none; color: var(--c-sub); font-size: 13px; }

.ap-pick-foot { margin-top: auto; padding-top: 56px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.ap-pick-foot .ap-btn-fill { margin: 0 8px; width: calc(100% - 16px); }
.ap-new-link { padding: 4px; border: 0; background: none; font-size: 13px; color: #777; text-decoration: underline; text-underline-offset: 3px; }

/* 3. 결과 */
.ap-result-body { flex: 1; padding: 44px 10px 32px; }
.ap-intro { margin: 0; font-size: 15px; line-height: 23px; text-align: center; color: var(--ap-ink); }
/* 두 줄 고정: 화면이 좁으면 글자를 조금 줄여요 */
.ap-intro span { display: block; white-space: nowrap; font-size: min(15px, 3.5vw); }
.ap-card { display: flex; flex-direction: column; min-height: 540px; margin: 22px 5px 0; padding: 24px 21px 28px; border-radius: 22px; background: var(--ap-card); text-align: center; }
/* 멤버 두 이름은 팀 이름과 키워드 사이 가운데에 와요 */
.ap-names { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 28px 0; }
.ap-card p { margin: 0; }
.ap-team {
  display: flex; align-items: center; justify-content: center; min-height: 50px; padding: 4px 18px;
  border-radius: 999px; background: var(--ap-point); color: #fff;
  font-family: var(--ff-vitro); font-size: 26px; line-height: 1.1; word-break: keep-all;
}
.ap-team[hidden] { display: none; }
.ap-name {
  padding: 8px 0 6px;
  font-family: var(--ff-vitro); font-size: 104px; line-height: 1; color: var(--ap-ink);
  white-space: nowrap; overflow: hidden; letter-spacing: -1px;
}
.ap-line { margin: 14px 3px; border: 0; border-top: 1px solid #707070; }
.ap-card.is-cross .ap-line { margin: 18px 3px 22px; }
.ap-card.is-cross .ap-names { padding: 10px 0; }
/* 크오페스: 팀 이름은 같은 크기로, 갈색 칸 없이 회색 글씨로 멤버 이름 바로 위에 */
.ap-team-sub { min-height: 0; padding: 0 10px; background: none; color: #555555; }
.ap-card.is-cross .ap-name { margin-top: 10px !important; padding-top: 0; }
.ap-kw-label { font-family: var(--ff-vitro); font-size: 22px; color: var(--ap-point-soft); }
.ap-kw { margin-top: 2px !important; font-family: var(--ff-vitro); font-size: 40px; line-height: 1.1; color: var(--ap-point); word-break: keep-all; }
.ap-btns { display: flex; flex-direction: column; gap: 10px; margin: 14px 5px 0; }   /* 결과 카드와 같은 폭 */
.ap-btns .ap-btn-fill { height: 62px; border-radius: 13px; }
.ap-dm { margin: 20px 0 0; font-size: 12px; line-height: 19px; color: var(--c-sub); text-align: center; }
.ap-dm a { color: var(--ap-point); }
/* 아래 푸터 위 줄을 위쪽 로고 줄과 같은 색으로 */
.theme-alps .main-footer { border-top-color: var(--c-line); }

/* 새 팀 등록 (아래에서 올라오는 창) — 기본형에 색만 맞춤 */
.ap-sheet { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.ap-sheet[hidden] { display: none; }
.ap-sheet-bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .4); }
.ap-sheet-body {
  position: relative; width: 100%; max-width: var(--app-w); max-height: 92dvh; overflow-y: auto;
  padding: 20px 20px calc(28px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; background: #fff;
  display: flex; flex-direction: column;
}
.ap-sheet-body > * { flex-shrink: 0; }
.ap-sheet-head { display: flex; align-items: center; justify-content: space-between; }
.ap-sheet-head h3 { margin: 0; font-size: 19px; }
.ap-sheet-note { margin: 8px 0 0; font-size: 13px; color: var(--c-sub); line-height: 1.5; }
.ap-sheet .field-label { margin-top: 22px; }
.ap-sheet .field-label small { font-weight: 400; color: var(--c-sub); }
.ap-sheet .field:focus { border-color: var(--ap-point); }
.ap-x { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--c-graybox); font-size: 14px; color: var(--c-sub); flex-shrink: 0; }
.ap-toggle { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ap-toggle button { height: 48px; border: 1px solid var(--c-line); border-radius: 12px; background: #fff; font-size: 16px; }
.ap-toggle button[aria-pressed="true"] { background: var(--ap-point); border-color: var(--ap-point); color: #fff; font-weight: 700; }
.ap-members { display: flex; flex-direction: column; gap: 8px; }
.ap-member-row { display: flex; gap: 8px; align-items: center; }
.ap-member-row .field { height: 48px; }
.ap-add { margin-top: 10px; height: 46px; border: 1px dashed #c9b3b5; border-radius: 12px; background: #fff; color: var(--ap-point); font-size: 15px; }
.ap-sheet .btn-submit { margin: 28px 0 0; background: var(--ap-point); }
.ap-sheet .field-error { color: #c0392b; }

@media (prefers-reduced-motion: reduce) { .ap-mode, .ap-btn-fill, .ap-btn-line { transition: none; } }
