/* 로그인 홈(/home) · 셸 안 만들기(/new) 공용 — compose-box.js 의 상자와 홈 섹션. 시안 「로그인 홈·메뉴」. 위: /start 와 같은 한 문장 상자 · 아래: 이렇게 써 보세요(처음) 또는 내 다음 행사(호스트) · 지금 열리는 행사.
   지도는 여기 없다(둘러보기). 그라디언트는 「만들기」 버튼 한 곳. 카드는 테두리 없이 면 + 그림자만. */
body.hm-page { background: var(--bg); color: var(--ink); word-break: keep-all; overflow-wrap: anywhere; }
.hm { position: relative; isolation: isolate; max-width: 1040px; margin: 0 auto; padding: 72px 48px 40px; display: grid; gap: 52px; box-sizing: border-box; }
.hm::before { content: ""; position: absolute; inset: -40px 0 auto; height: 480px; pointer-events: none; z-index: -1;
  background: radial-gradient(38% 60% at 38% 18%, rgba(241,46,130,.10), transparent 70%), radial-gradient(30% 50% at 66% 14%, rgba(255,122,45,.08), transparent 70%); }
:root[data-theme="dark"] .hm::before { background: radial-gradient(38% 60% at 38% 18%, rgba(241,46,130,.16), transparent 70%), radial-gradient(30% 50% at 66% 14%, rgba(255,122,45,.10), transparent 70%); }
.hm[hidden] { display: none; }

.hm-hero { display: grid; justify-items: center; gap: 18px; text-align: center; }
.hm-hello { margin: 0 0 -6px; font-size: 15px; font-weight: 600; color: var(--muted); min-height: 1.4em; }
.hm-hq { margin: 0; font-size: clamp(30px, 4.4vw, 46px); line-height: 1.15; font-weight: 700; letter-spacing: -.04em; text-wrap: balance; }
.hm-ask { width: 100%; max-width: 780px; box-sizing: border-box; background: var(--surface); border-radius: 26px; padding: 20px 14px 14px 22px;
  box-shadow: var(--shadow); display: grid; gap: 14px; text-align: left; transition: box-shadow var(--t-move) var(--ease); }
.hm-ask:focus-within { box-shadow: var(--shadow), 0 0 0 2px color-mix(in srgb, #F12E82 45%, transparent); }
.hm-ask textarea { width: 100%; box-sizing: border-box; border: 0; outline: 0; resize: none; background: transparent; color: var(--ink);
  font: inherit; font-size: 18px; line-height: 1.55; font-weight: 500; min-height: 56px; padding: 0 8px 0 0; caret-color: #F12E82; }
.hm-ask textarea::placeholder { color: var(--muted); }
.hm-ask-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hm-chips { display: flex; gap: 8px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.hm-chips::-webkit-scrollbar { display: none; }
.hm-chip { flex: none; height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--sunken); color: var(--ink-2);
  font: inherit; font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background var(--t-press) var(--ease); }
.hm-chip:hover { background: var(--accent-wash); color: var(--ink); }
.hm-ibtn { width: 40px; height: 40px; border: 0; border-radius: 999px; background: var(--sunken); color: var(--ink-2); display: grid; place-items: center; flex: none; cursor: pointer; }
.hm-ibtn:hover { color: var(--ink); }
.hm-go { height: 44px; padding: 0 18px 0 20px; border: 0; border-radius: 999px; background: var(--brand-grad); color: #fff; font: inherit; font-weight: 800; font-size: 15.5px;
  display: inline-flex; align-items: center; gap: 6px; flex: none; cursor: pointer; box-shadow: 0 10px 22px -12px rgba(241,46,130,.7);
  transition: transform var(--t-press) var(--ease), filter var(--t-press) var(--ease); }
.hm-go:hover { filter: brightness(1.06); }
.hm-go:active { transform: scale(.97); }
.hm-go .v2-ic { width: 16px; height: 16px; stroke-width: 2.4; }
.hm-ask-note { margin: 0; font-size: 13.5px; color: var(--muted); }
.hm :focus-visible { outline: 2px solid #F12E82; outline-offset: 2px; }
.hm-ask textarea:focus-visible { outline: 0; }   /* 상자 자체가 분홍 테두리로 초점을 보인다(.hm-ask:focus-within) */

.hm-sec { display: grid; gap: 16px; min-width: 0; }
.hm-sec[hidden] { display: none; }
.hm-sh { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.hm-sh h2 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -.03em; }
.hm-more { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; white-space: nowrap; padding: 6px 0; }
.hm-more:hover { color: var(--ink); }
.hm-more .v2-ic { width: 16px; height: 16px; }

/* 이렇게 써 보세요 — 누르면 상자에 채운다 */
.hm-exs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.hm-exq { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; text-align: left; border: 0; cursor: pointer;
  background: var(--sunken); color: var(--ink); border-radius: 16px; padding: 14px 16px; font: inherit; font-size: 14.5px; line-height: 1.5; font-weight: 600;
  transition: background var(--t-press) var(--ease); }
.hm-exq:hover { background: var(--accent-wash); }
.hm-exq .v2-ic { color: var(--muted); margin-top: 2px; width: 18px; height: 18px; }

/* 내 다음 행사 */
.hm-mine { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.hm-mc { position: relative; background: var(--surface); border-radius: 22px; padding: 14px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; box-shadow: var(--shadow); min-width: 0; }
.hm-mc > a.hm-cover { position: absolute; inset: 0; border-radius: inherit; z-index: 0; }
.hm-mc > * { position: relative; }
.hm-mc > a.hm-cover { position: absolute; }
.hm-pst { display: block; aspect-ratio: 1; width: 88px; border-radius: 12px; background: var(--sunken) center / cover no-repeat; flex: none; pointer-events: none; }
.hm-pst.hm-ph { display: grid; place-items: center; color: var(--muted); font-weight: 800; font-size: 26px; }
.hm-mc-b { display: grid; gap: 4px; align-content: start; min-width: 0; pointer-events: none; }
.hm-mc-top { display: flex; gap: 8px; align-items: center; font-size: 12px; font-weight: 800; }
.hm-mc-top .hm-guest { color: var(--muted); }   /* 「참가」 — 주최보다 한 단계 옅게 */
.hm-mc-top .hm-dd { color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.hm-mc h3 { margin: 0; font-size: 16px; line-height: 1.3; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hm-mc p { margin: 0; font-size: 13px; color: var(--muted); }
.hm-acts { grid-column: 1 / -1; display: flex; gap: 6px; }
.hm-act { flex: 1; height: 38px; border: 0; border-radius: 12px; background: var(--sunken); color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; padding: 0 10px; text-decoration: none; cursor: pointer; }
.hm-act:hover { background: var(--accent-wash); }
.hm-act .v2-ic { width: 16px; height: 16px; }
.hm-none { margin: 0; padding: 18px 20px; border-radius: 16px; background: var(--sunken); color: var(--ink-2); font-size: 15px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.hm-none a { color: var(--ink); font-weight: 700; text-decoration: none; }

/* 지금 열리는 행사 */
.hm-nows { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.hm-nc { display: grid; gap: 4px; align-content: start; min-width: 0; color: inherit; text-decoration: none; }
.hm-nc .hm-pst { width: 100%; border-radius: 14px; margin-bottom: 8px; box-shadow: var(--shadow); transition: transform var(--t-move) var(--ease); }
.hm-nc:hover .hm-pst { transform: translateY(-2px); }
.hm-nc h3 { margin: 0; font-size: 15px; line-height: 1.32; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hm-nc p { margin: 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-nc .hm-rec { font-size: 12px; font-weight: 800; color: var(--ink); }
.hm-nows .hm-nc:nth-child(n+6) { display: none; }
.hm-sk { border-radius: 14px; background: var(--sunken); aspect-ratio: 1; }

@media (max-width: 1180px) and (min-width: 900px) {
  .hm-mine { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-nows { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hm-nows .hm-nc:nth-child(n+5) { display: none; }
}
@media (max-width: 899px) {
  .hm { padding: 18px 16px 32px; gap: 32px; }
  .hm-hero { justify-items: stretch; text-align: left; gap: 12px; }
  .hm-hello { margin: 0 0 -4px; font-size: 14px; }
  .hm-hq { font-size: 28px; line-height: 1.2; }
  .hm-ask { border-radius: 22px; padding: 16px 10px 10px 16px; gap: 10px; }
  .hm-ask textarea { font-size: 16px; min-height: 48px; }
  .hm-chips { -webkit-mask-image: linear-gradient(to right, #000 85%, transparent); mask-image: linear-gradient(to right, #000 85%, transparent); }
  .hm-go { padding: 0; width: 44px; justify-content: center; background: var(--ink); color: var(--bg); box-shadow: none; }   /* 모바일 그라디언트는 아래 만들기 탭 한 곳 */
  .hm-go span { display: none; }
  .hm-sh h2 { font-size: 19px; }
  .hm-exs { grid-template-columns: 1fr; gap: 8px; }
  /* 가로로 넘기는 줄 — 화면 끝까지 */
  .hm-mine, .hm-nows { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 4px 16px 16px; scroll-padding-inline: 16px; gap: 12px; }
  .hm-mine::-webkit-scrollbar, .hm-nows::-webkit-scrollbar { display: none; }
  .hm-mc { flex: 0 0 min(300px, 82%); scroll-snap-align: start; }
  .hm-pst { width: 76px; }
  .hm-nc { flex: 0 0 140px; scroll-snap-align: start; }
  .hm-nows .hm-nc:nth-child(n) { display: grid; }
  .hm-nc h3 { font-size: 14px; }
  .hm-nc p { font-size: 12px; }
}

/* 앱 웹뷰(?embed=1) — 앱의 유리 상단바(--app-top, 셸이 알려 줌)가 위를 덮는다. channel.html 과 같은 틀 */
:root.embed .hm { padding-top: calc(var(--app-top, 52px) + 12px); }
/* 앱의 만들기(/new?embed=1)는 도구 화면 — 입력 상자·칩·직접 설정만. 제목은 앱 상단바(「만들기」)가, 예시 문장은 빼고(11/20 대표 「앱은 앱스럽게」) */
:root.embed .hm-hero.big .hm-hq, :root.embed .hm-sec.narrow { display: none; }

/* 셸 안 만들기(/new) — 상자를 크게, 아래에 직접 설정·초안 이어서 */
.hm-hero.big .hm-ask { max-width: 820px; }
.hm-hero.big .hm-ask textarea { min-height: 120px; }
.hm-alt { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 820px; width: 100%; margin: 0 auto; }
.hm-alt a { display: grid; grid-template-columns: 22px minmax(0, 1fr) 16px; gap: 12px; align-items: center; padding: 16px 18px; border-radius: 16px;
  background: var(--sunken); color: var(--ink); text-decoration: none; transition: background var(--t-press) var(--ease); }
.hm-alt a:hover { background: var(--accent-wash); }
.hm-alt b { display: block; font-size: 15px; } .hm-alt small { display: block; font-size: 13px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.hm-alt .v2-ic:last-child { width: 16px; height: 16px; color: var(--muted); }
.hm-alt[hidden] { display: none; }
.hm-sec.narrow { max-width: 820px; width: 100%; margin: 0 auto; }
@media (max-width: 899px) { .hm-alt { grid-template-columns: 1fr; } }
/* /start 에서 만들기가 실패해 돌아왔을 때 — 상자 바로 아래 한 줄(new-v2.js showErr) */
.hm-err { width: 100%; max-width: 820px; box-sizing: border-box; display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px; border-radius: 16px;
  background: var(--warning-wash); color: var(--ink); font-size: 14.5px; line-height: 1.5; text-align: left; }
.hm-err .v2-ic { width: 18px; height: 18px; color: var(--warning); }
.hm-err span { flex: 1; min-width: 0; }
.hm-err button { flex: none; height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--ink); color: var(--bg); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }

/* 앱 홈 탭(?embed=1&tab=1) — 상단바가 없다. 위는 셸이 상태바만큼 비우고, 아래는 탭바만큼(--tab-clear, web.css) */
:root.embed.tabview .hm { padding-top: 14px; padding-bottom: var(--tab-clear, 96px); }

/* 로그아웃 홈(앱) — 「내 다음 행사」 자리의 로그인 카드 */
.hm-guest-card { display: flex; align-items: center; gap: 14px; padding: 16px 16px 16px 18px; border-radius: 20px; background: var(--sunken); }
.hm-guest-card > div { flex: 1; min-width: 0; display: grid; gap: 2px; }
.hm-guest-card b { font-size: 15.5px; font-weight: 700; }
.hm-guest-card span { font-size: 13.5px; color: var(--muted); }
.hm-guest-card .hm-login { flex: none; width: auto; padding: 0 18px; background: var(--ink); color: var(--bg); }

/* 행사 당일 「오늘」 카드 — 맨 위. 면 하나(참여·탭 타깃), 주 버튼 한 곳만 그라디언트 */
.hm-today { background: var(--surface); border-radius: 24px; padding: 18px; box-shadow: var(--shadow); display: grid; gap: 6px; max-width: 780px; width: 100%; margin: 0 auto; box-sizing: border-box; }
.hm-td-k { margin: 0; font-size: 13px; font-weight: 800; color: #D81F6C; }
:root[data-theme="dark"] .hm-td-k { color: #FF6FA8; }
.hm-today h2 { margin: 0; font-size: 22px; line-height: 1.25; font-weight: 800; letter-spacing: -.03em; text-wrap: balance; }
.hm-td-m, .hm-td-note { margin: 0; font-size: 14px; color: var(--muted); }
.hm-td-qr { text-align: center; }
.hm-td-qr p { margin: 8px 0 0; font-size: 14px; color: var(--ink-2); }
.hm-td-go { margin-top: 8px; height: 50px; border-radius: 16px; background: var(--brand-grad); color: #fff; font-weight: 800; font-size: 16px; text-decoration: none;
  display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 10px 22px -12px rgba(241,46,130,.7); }
.hm-td-go .v2-ic { width: 20px; height: 20px; stroke-width: 2.2; }
.hm-today .hm-acts { margin-top: 8px; }
.hm-qrbig { border: 0; border-radius: 0; margin: 0; padding: 24px; box-sizing: border-box; width: 100vw; height: 100dvh; max-width: none; max-height: none; background: #fff; color: #202129;
  display: none; place-items: center; align-content: center; gap: 14px; text-align: center; }
.hm-qrbig[open] { display: grid; }
.hm-qrbig canvas { width: min(82vw, 420px) !important; }
.hm-qrbig p { margin: 0; font-weight: 700; font-size: 17px; }
.hm-qrbig .hm-act { flex: none; width: auto; padding: 0 24px; background: #F3F3F6; color: #202129; }
/* 그날은 만들기 상자를 한 줄로 */
.hm-day .hm-hero .hm-hq, .hm-day .hm-hero .hm-hello, .hm-day .hm-hero .hm-ask-note { display: none; }
.hm-day .hm-hero .hm-ask textarea { min-height: 28px; }

/* 「오늘」 카드 배치 시안 ?hm=b(한 줄로 줄이기)·c(입력창 먼저) — 카드는 한 줄 띠, 만들기 상자가 주인공 (11/20) */
.hm-strip { grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 4px; padding: 12px 6px 12px 18px; border-radius: 20px; }
.hm-st-b { display: grid; gap: 2px; min-width: 0; min-height: 44px; align-content: center; color: inherit; text-decoration: none; }
.hm-strip .hm-td-k { display: flex; align-items: center; gap: 6px; font-size: 12.5px; white-space: nowrap; overflow: hidden; }
.hm-strip .hm-td-k em { font-style: normal; font-weight: 800; color: var(--muted); }
.hm-strip h2 { font-size: 17px; line-height: 1.3; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-wrap: nowrap; }
.hm-live { width: 7px; height: 7px; border-radius: 50%; background: #F12E82; flex: none; animation: hm-live 1.6s ease-in-out infinite; }
@keyframes hm-live { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .hm-live { animation: none; } }
.hm-st-go { height: 44px; padding: 0 16px 0 14px; margin-left: 8px; border: 0; border-radius: 999px; background: var(--brand-grad); color: #fff; font: inherit; font-size: 14.5px; font-weight: 800;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; text-decoration: none; cursor: pointer; box-shadow: 0 8px 18px -10px rgba(241,46,130,.7); }
.hm-st-go .v2-ic { width: 17px; height: 17px; stroke-width: 2.2; }
.hm-st-go:active { transform: scale(.97); }
.hm-st-more { position: relative; }
.hm-st-more summary { list-style: none; width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; color: var(--muted); cursor: pointer; }
.hm-st-more summary::-webkit-details-marker { display: none; }
.hm-st-more summary:hover, .hm-st-more[open] summary { color: var(--ink); background: var(--sunken); }
.hm-st-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; min-width: 184px; padding: 6px; border-radius: 16px; background: var(--surface);
  box-shadow: var(--shadow), 0 16px 40px -16px rgba(0,0,0,.35); display: grid; }
.hm-st-menu a { min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 600; white-space: nowrap; }
.hm-st-menu a:hover { background: var(--sunken); }
.hm-st-menu .v2-ic { width: 18px; height: 18px; color: var(--muted); }
.hm-strip + .hm-hero { margin-top: -20px; }
.hm-hero + .hm-strip { margin-top: -24px; }
/* 상자를 키운다 — 입력 칸 높이·글자, 보내기 버튼에 글자 */
.hm-b .hm-ask textarea, .hm-c .hm-ask textarea { min-height: 84px; font-size: 19px; }
@media (max-width: 899px) {
  .hm-strip { padding: 10px 4px 10px 16px; }
  .hm-strip h2 { font-size: 16px; }
  .hm-st-go { padding: 0 16px; font-size: 14px; }
  .hm-st-go .v2-ic { display: none; }   /* 좁은 화면 — 제목 자리를 늘린다 */
  .hm-strip + .hm-hero { margin-top: -12px; }
  .hm-hero + .hm-strip { margin-top: -16px; }
  .hm-b .hm-ask, .hm-c .hm-ask { padding: 18px 10px 10px 18px; gap: 12px; }
  .hm-b .hm-ask textarea, .hm-c .hm-ask textarea { min-height: 76px; font-size: 17px; }
  .hm-b .hm-go, .hm-c .hm-go { width: auto; height: 46px; padding: 0 16px 0 18px; }
  .hm-b .hm-go span, .hm-c .hm-go span { display: inline; }
}
