@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css");

:root {
  --bg: #f5f4f0;
  --surface: #ffffff;
  --ink: #17171b;
  --ink-2: #3a3a42;
  --muted: #7a7a85;
  --line: #e7e5df;
  --line-strong: #d4d2cb;
  --accent: #2f6bff;
  --accent-soft: #e8efff;
  --danger: #e5484d;
  --ok: #1a9d5b;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(20, 20, 30, 0.04), 0 4px 16px rgba(20, 20, 30, 0.05);
  --maxw: 480px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px 48px; }

/* ── 상단바 ── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.topbar-in {
  max-width: var(--maxw); margin: 0 auto; height: 56px; padding: 0 8px;
  display: flex; align-items: center; gap: 4px;
}
.topbar h1 { font-size: 16px; font-weight: 700; flex: 1; text-align: center; margin-right: 40px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px;
  display: inline-grid; place-items: center; color: var(--ink);
}
.icon-btn:hover { background: rgba(0, 0, 0, 0.05); }
.icon-btn svg { width: 22px; height: 22px; }

/* ── 프로필 ── */
.profile { text-align: center; padding: 40px 0 24px; }
.avatar {
  width: 88px; height: 88px; border-radius: 50%; margin: 0 auto 14px;
  background: var(--ink); color: #fff; display: grid; place-items: center;
  font-size: 32px; font-weight: 800; overflow: hidden;
  box-shadow: 0 0 0 4px var(--surface), var(--shadow);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile .name { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.profile .handle { color: var(--muted); font-size: 14px; margin-top: 2px; }
.profile .bio { color: var(--ink-2); font-size: 15px; margin-top: 12px; white-space: pre-line; }
.socials { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.socials a {
  width: 40px; height: 40px; border-radius: 50%; background: var(--surface);
  display: grid; place-items: center; box-shadow: var(--shadow);
}
.socials svg { width: 20px; height: 20px; }

/* ── 링크 버튼 ── */
.links { display: grid; gap: 10px; }
.link-btn {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.link-btn:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(20,20,30,.05), 0 10px 24px rgba(20,20,30,.08); }
.link-btn:active { transform: scale(0.99); }
.link-btn .ico {
  width: 44px; height: 44px; border-radius: 14px; flex: none;
  display: grid; place-items: center; font-size: 22px; background: var(--bg);
}
.link-btn .txt { flex: 1; min-width: 0; }
.link-btn .t { display: block; font-weight: 700; font-size: 16px; }
.link-btn .s { display: block; font-size: 13px; color: var(--muted); margin-top: 1px; }
.link-btn .arr { color: var(--line-strong); font-size: 20px; }
.link-btn.primary { background: var(--ink); color: #fff; }
.link-btn.primary .ico { background: rgba(255, 255, 255, 0.12); }
.link-btn.primary .s { color: rgba(255, 255, 255, 0.6); }
.link-btn.primary .arr { color: rgba(255, 255, 255, 0.4); }

.section-title {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 32px 2px 12px; font-size: 17px; font-weight: 800;
}
.section-title a { font-size: 13px; font-weight: 600; color: var(--muted); }

/* ── 템플릿 카드 ── */
.chips { display: flex; gap: 6px; margin: 4px 0 16px; overflow-x: auto; scrollbar-width: none; }
.chip {
  padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: var(--surface); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap;
}
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.card {
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform 0.15s ease;
}
.card:hover { transform: translateY(-2px); }
.cover {
  aspect-ratio: 4 / 3; display: grid; place-items: center; font-size: 44px; position: relative;
}
.cover img { width: 100%; height: 100%; object-fit: cover; }
.badge {
  position: absolute; top: 10px; left: 10px; font-size: 11px; font-weight: 800;
  padding: 3px 8px; border-radius: 999px; background: var(--ink); color: #fff; letter-spacing: 0.02em;
}
.badge.free { background: var(--surface); color: var(--ok); }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-title { font-weight: 700; font-size: 15px; line-height: 1.35; }
.card-sub { font-size: 12.5px; color: var(--muted); line-height: 1.4; flex: 1; }
.price { font-weight: 800; font-size: 15px; margin-top: 6px; }
.price.free { color: var(--ok); }

/* ── 상세 ── */
.detail-cover { aspect-ratio: 16 / 10; border-radius: var(--radius); font-size: 72px; margin-top: 4px; overflow: hidden; }
.detail-head { padding: 20px 2px 8px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.tag { font-size: 12px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 3px 9px; border-radius: 6px; }
.detail-head h2 { font-size: 24px; font-weight: 800; line-height: 1.3; letter-spacing: -0.025em; }
.detail-head .sub { color: var(--muted); margin-top: 4px; }
.detail-head .price { font-size: 22px; margin-top: 12px; }
.block { background: var(--surface); border-radius: var(--radius); padding: 20px; margin-top: 12px; box-shadow: var(--shadow); }
.block h3 { font-size: 15px; font-weight: 800; margin-bottom: 10px; }
.block p { color: var(--ink-2); font-size: 15px; }
.checklist { list-style: none; display: grid; gap: 8px; }
.checklist li { display: flex; gap: 10px; font-size: 15px; color: var(--ink-2); }
.checklist li::before { content: "✓"; color: var(--accent); font-weight: 800; flex: none; }
.policy { font-size: 13px; color: var(--muted); display: grid; gap: 4px; }

.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 70%, transparent);
}
.sticky-cta .btn { max-width: calc(var(--maxw) - 32px); margin: 0 auto; }
.spacer-cta { height: 96px; }

/* ── 버튼 ── */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  height: 56px; border-radius: 16px; font-size: 17px; font-weight: 700;
  background: var(--ink); color: #fff; transition: opacity 0.15s, transform 0.1s;
}
.btn:active { transform: scale(0.99); }
.btn:disabled { background: #9a9aa3; color: rgba(255,255,255,.75); cursor: not-allowed; }
.btn.ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); }
.btn.sm { height: 44px; font-size: 15px; border-radius: 12px; }

/* ── 폼 ── */
.field { margin-bottom: 12px; }
.label { display: block; font-size: 14px; font-weight: 700; margin: 0 2px 8px; }
.label .req, .ph-req { color: var(--danger); }
.hint { font-size: 12.5px; color: var(--muted); margin: 6px 2px 0; }
.input, .textarea, .select {
  width: 100%; height: 56px; border: 1.5px solid var(--line); border-radius: 16px;
  background: var(--surface); padding: 0 18px; font-size: 16px; outline: none;
  transition: border-color 0.15s;
}
.textarea { height: auto; min-height: 132px; padding: 16px 18px; resize: vertical; line-height: 1.55; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--ink); }
.input::placeholder, .textarea::placeholder { color: #a5a5ae; }
.input.err { border-color: var(--danger); }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg-opt {
  height: 56px; border-radius: 16px; border: 1.5px solid var(--line-strong); background: var(--surface);
  display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 15px;
}
.seg-opt.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  padding: 9px 14px; border-radius: 999px; border: 1.5px solid var(--line-strong);
  background: var(--surface); font-size: 14px; font-weight: 600;
}
.pill.on { background: var(--ink); color: #fff; border-color: var(--ink); }

.agree { display: flex; align-items: flex-start; justify-content: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); margin-top: 14px; cursor: pointer; text-align: left; }
.agree input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--ink); flex: none; }
.agree .more { color: var(--muted); text-decoration: underline; }

.notice {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--accent-soft); color: #1e3a8a; border-radius: var(--radius-sm);
  padding: 14px 16px; font-size: 14px; margin: 12px 0;
}
.notice b { color: #102a6b; }
.notice .ni { font-size: 18px; line-height: 1.3; }

.hero-card { background: var(--surface); border-radius: var(--radius); padding: 22px 20px; box-shadow: var(--shadow); margin-top: 8px; }
.hero-card h2 { font-size: 22px; font-weight: 800; line-height: 1.35; letter-spacing: -0.025em; }
.hero-card p { color: var(--ink-2); font-size: 15px; margin-top: 10px; }
.quote {
  margin-top: 14px; background: var(--bg); border-radius: 14px; padding: 12px 14px;
  font-size: 13.5px; color: var(--ink-2); position: relative;
}
.quote::before { content: "💬 이런 요청을 받고 있어요"; display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.step { background: var(--bg); border-radius: 12px; padding: 10px; text-align: center; font-size: 12.5px; color: var(--ink-2); }
.step b { display: block; font-size: 18px; margin-bottom: 2px; }

.demo-bar {
  background: #fff4d6; color: #7a5200; font-size: 12.5px; text-align: center; padding: 6px 12px; font-weight: 600;
}

/* ── 바텀시트 (결제) ── */
.sheet-bg {
  position: fixed; inset: 0; background: rgba(10, 10, 15, 0.45); z-index: 50;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.sheet-bg.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 51;
  max-width: var(--maxw); margin: 0 auto; max-height: 92dvh; overflow-y: auto;
  background: var(--surface); border-radius: 24px 24px 0 0;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sheet.open { transform: translateY(0); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.sheet-head h3 { font-size: 19px; font-weight: 700; }
.sheet .sec-label { font-size: 16px; font-weight: 700; margin: 20px 2px 10px; }
.order-sum {
  display: flex; align-items: center; gap: 12px; background: var(--bg); border-radius: 14px; padding: 12px 14px; margin-bottom: 16px;
}
.order-sum .mini { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; font-size: 22px; flex: none; }
.order-sum .t { font-weight: 700; font-size: 14.5px; line-height: 1.3; }
.order-sum .p { font-size: 13px; color: var(--muted); }
.phone-wrap { display: flex; align-items: center; gap: 10px; }
.phone-wrap .flag { font-size: 14px; font-weight: 700; color: var(--ink-2); padding: 0 4px 0 2px; border-right: 1px solid var(--line); padding-right: 12px; }
.phone-box { display: flex; align-items: center; height: 56px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--surface); padding: 0 18px; }
.phone-box:focus-within { border-color: var(--ink); }
.phone-box input { border: 0; outline: none; flex: 1; font-size: 16px; background: transparent; height: 100%; }
.phone-box.err { border-color: var(--danger); }

.bank-box { background: var(--bg); border-radius: 16px; padding: 18px; margin: 14px 0; }
.bank-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: 15px; }
.bank-row span:first-child { color: var(--muted); }
.bank-row b { font-weight: 700; }
.copy-btn { font-size: 12.5px; font-weight: 700; padding: 5px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line-strong); margin-left: 8px; }
.done-ico { width: 64px; height: 64px; border-radius: 50%; background: #e3f6ec; color: var(--ok); display: grid; place-items: center; font-size: 30px; margin: 8px auto 14px; }
.done-title { text-align: center; font-size: 21px; font-weight: 800; }
.done-sub { text-align: center; color: var(--ink-2); font-size: 14.5px; margin-top: 6px; }
.order-no { text-align: center; font-size: 13px; color: var(--muted); margin-top: 6px; }

/* ── 토스트 ── */
.toast {
  position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 600;
  opacity: 0; transition: all 0.2s; z-index: 80; pointer-events: none; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── 챗봇 (아이폰 메시지 스타일) ── */
.chat-body {
  --im-blue: #0a84ff; --im-gray: #e9e9eb; --im-bg: #ffffff; --im-sub: #8e8e93; --im-sep: #d1d1d6;
  height: 100dvh; display: flex; flex-direction: column; overflow: hidden; background: var(--im-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard Variable", Pretendard, sans-serif;
  letter-spacing: -0.2px;
}
.chat-page { display: flex; flex-direction: column; flex: 1; min-height: 0; }

.im-head {
  flex: none; position: relative; z-index: 5;
  background: rgba(249, 249, 249, 0.86); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.12);
}
.im-head-in { max-width: var(--maxw); margin: 0 auto; height: 76px; display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; }
.im-head .icon-btn { color: var(--im-blue); margin-left: 4px; }
.im-head .icon-btn svg { width: 26px; height: 26px; }
.im-head .home { justify-self: end; margin-right: 8px; }
.im-who { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.im-who .avatar { width: 32px; height: 32px; margin: 0; font-size: 14px; box-shadow: none; }
.im-who .avatar:has(img) { background: #fff4dc; }
.im-who .nm { font-size: 11.5px; color: #000; display: flex; align-items: center; gap: 1px; }
.im-who .nm::after { content: "›"; color: var(--im-sub); font-size: 13px; margin-left: 2px; }

.chat-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }
.chat { max-width: var(--maxw); margin: 0 auto; padding: 10px 14px 12px; display: flex; flex-direction: column; overflow-x: clip; }
.im-time { text-align: center; font-size: 11.5px; color: var(--im-sub); margin: 8px 0 10px; }
.im-time b { font-weight: 600; }

.msg { display: flex; margin-top: 2px; }
.msg.first { margin-top: 10px; }
.msg.user { justify-content: flex-end; }
.bubble {
  position: relative; max-width: 76%; padding: 8px 13px; border-radius: 19px;
  font-size: 16px; line-height: 1.38; background: var(--im-gray); color: #000;
}
.msg.user .bubble { background: var(--im-blue); color: #fff; }
/* 꼬리: 연속 메시지의 마지막 말풍선에만 */
.msg.tail .bubble::before, .msg.tail .bubble::after { content: ""; position: absolute; bottom: 0; height: 20px; }
.msg.bot.tail .bubble::before { left: -7px; width: 20px; background: var(--im-gray); border-bottom-right-radius: 16px 14px; }
.msg.bot.tail .bubble::after { left: -26px; width: 26px; background: var(--im-bg); border-bottom-right-radius: 10px; }
.msg.user.tail .bubble::before { right: -7px; width: 20px; background: var(--im-blue); border-bottom-left-radius: 16px 14px; }
.msg.user.tail .bubble::after { right: -26px; width: 26px; background: var(--im-bg); border-bottom-left-radius: 10px; }
.bubble * + p, .bubble ul, .bubble ol { margin-top: 6px; }
.bubble ul, .bubble ol { padding-left: 20px; }
.bubble a { color: var(--im-blue); text-decoration: underline; text-underline-offset: 2px; }
.msg.user .bubble a { color: #fff; }
.bubble .src { display: block; margin-top: 6px; font-size: 11.5px; color: var(--im-sub); }
.im-receipt { text-align: right; font-size: 11px; color: var(--im-sub); margin: 3px 4px 0 0; font-weight: 500; }

.bubble.typing { display: flex; gap: 5px; padding: 12px 14px; }
.bubble.typing i { width: 8px; height: 8px; border-radius: 50%; background: #9c9ca1; animation: blink 1.3s infinite; }
.bubble.typing i:nth-child(2) { animation-delay: 0.18s; }
.bubble.typing i:nth-child(3) { animation-delay: 0.36s; }
@keyframes blink { 0%, 60%, 100% { opacity: 0.35; } 30% { opacity: 1; } }
.msg.pop .bubble { animation: pop 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
@keyframes pop { from { transform: scale(0.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* 카카오식 질문 카드 (가로 스와이프) */
.im-cards {
  display: flex; align-items: flex-start; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin: 8px -14px 0; padding: 2px 14px 6px; scroll-padding-inline: 14px;
}
.im-cards::-webkit-scrollbar { display: none; }
.im-card {
  flex: 0 0 78%; max-width: 300px; scroll-snap-align: start; background: #fff;
  border: 0.5px solid var(--im-sep); border-radius: 18px; overflow: hidden;
}
.im-card-top { padding: 12px 14px 10px; display: flex; align-items: center; gap: 10px; }
.im-card-top .e { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-size: 17px; }
.im-card-top b { font-size: 15.5px; font-weight: 700; }
.im-card-top small { display: block; font-size: 12px; color: var(--im-sub); font-weight: 400; }
.im-card button {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 48px; text-align: center; padding: 0 12px; font-size: 14px; line-height: 1.3; color: var(--im-blue);
  overflow: hidden; word-break: keep-all;
  border-top: 0.5px solid var(--im-sep);
}
.im-card button:active { background: #f2f2f7; }
/* ◀ 1/2 ▶ 넘기기 */
/* 모든 카드 같은 높이: 질문 3칸 고정 + 넘기기 줄 */
.im-page { height: 144px; }
/* ◀ 1/3 ▶ : 카드 제목 줄 오른쪽 */
.im-pager { margin-left: auto; flex: none; display: flex; align-items: center; gap: 0; }
.im-card .im-pager button { display: grid; place-items: center; width: 26px; height: 28px; padding: 0; border: 0; border-radius: 8px; font-size: 11px; color: var(--im-blue); }
.im-card .im-pager button:disabled { color: #c7c7cc; }
.im-pg-no { font-size: 12px; color: var(--im-sub); min-width: 26px; text-align: center; font-variant-numeric: tabular-nums; }
.im-card-top b { min-width: 0; }

/* 입력창 위 빠른 질문 칩 */
.im-chips { flex: none; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 8px 14px 6px; max-width: var(--maxw); margin: 0 auto; width: 100%; }
.im-chips::-webkit-scrollbar { display: none; }
.im-chips button {
  flex: none; padding: 7px 13px; border-radius: 999px; font-size: 14px; font-weight: 500;
  border: 1px solid var(--im-sep); background: #fff; color: #000; white-space: nowrap;
}
.im-chips button.home { color: var(--im-blue); }

/* 입력창 */
.composer { flex: none; background: var(--im-bg); padding: 4px 10px calc(8px + env(safe-area-inset-bottom)); }
.composer-in { max-width: var(--maxw); margin: 0 auto; display: flex; gap: 8px; align-items: flex-end; }
.im-plus {
  width: 36px; height: 36px; border-radius: 50%; background: #e9e9eb; color: #6b6b70; flex: none;
  display: grid; place-items: center; font-size: 24px; font-weight: 300; line-height: 1; transition: transform 0.2s;
}
.im-plus.on { transform: rotate(45deg); background: var(--im-blue); color: #fff; }
.im-field { flex: 1; position: relative; display: flex; align-items: flex-end; border: 1px solid var(--im-sep); border-radius: 19px; background: #fff; min-height: 36px; }
.im-field textarea {
  flex: 1; resize: none; border: 0; outline: none; background: transparent;
  padding: 7px 4px 7px 14px; font-size: 16px; line-height: 1.35; max-height: 120px;
}
.send-btn {
  width: 28px; height: 28px; margin: 3px; border-radius: 50%; background: var(--im-blue); color: #fff;
  display: grid; place-items: center; flex: none; transition: opacity 0.15s, transform 0.15s;
}
.send-btn:disabled { opacity: 0; transform: scale(0.6); pointer-events: none; }
.send-btn svg { width: 17px; height: 17px; }

/* + 질문 패널 (아이폰 효과 패널 스타일) */
.im-panel { flex: none; background: #d1d3d9; max-height: 0; overflow: hidden; transition: max-height 0.28s ease; }
.im-panel.open { max-height: 46dvh; overflow-y: auto; }
.im-panel-in { max-width: var(--maxw); margin: 0 auto; padding: 12px 10px calc(14px + env(safe-area-inset-bottom)); }
.im-panel h4 { font-size: 12px; font-weight: 600; color: #3c3c43; opacity: 0.7; margin: 8px 6px 6px; }
.im-panel h4:first-child { margin-top: 0; }
.im-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.im-grid button {
  background: #fff; border-radius: 9px; padding: 11px 8px; font-size: 14px; text-align: center; color: #000;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); line-height: 1.3;
}
.im-grid button:active { background: var(--im-blue); color: #fff; }

.footer { text-align: center; font-size: 12px; color: var(--muted); margin-top: 40px; }
.empty { text-align: center; color: var(--muted); padding: 60px 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* 자료 링크 카드 (아이폰 메시지 링크 미리보기) */
.bubble.link { padding: 0; overflow: hidden; background: var(--im-gray); width: 76%; }
.im-link { display: block; color: inherit !important; text-decoration: none !important; }
.im-link .lk-top { display: grid; place-items: center; height: 84px; font-size: 38px; background: linear-gradient(180deg, #dcdce1, #d1d1d6); }
.im-link .lk-body { display: block; padding: 9px 13px 11px; }
.im-link b { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.im-link small { display: block; font-size: 13px; color: #3c3c43; opacity: 0.75; margin-top: 2px; line-height: 1.35; }
.im-link em { display: block; font-style: normal; font-size: 12px; color: var(--im-sub); margin-top: 4px; }
.im-link:active { opacity: 0.7; }
/* 카드 제목은 항상 한 줄 (넘기기 버튼과 같이 있어도 높이 유지) */
.im-card-top b, .im-card-top small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 360px) { .im-card { flex-basis: 86%; } }
