:root {
  --bg: #ffffff;
  --bg-soft: #f5f6f8;
  --text: #15171c;
  --text-sub: #5b616e;
  --line: #e5e7eb;
  --kakao: #fee500;
  --kakao-text: #191919;
  --danger: #c62828;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101215;
    --bg-soft: #181b20;
    --text: #f1f3f5;
    --text-sub: #a2a8b4;
    --line: #2a2e36;
    --danger: #ff8a80;
  }
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 20px; }
.wrap-wide { max-width: 1120px; }

header { border-bottom: 1px solid var(--line); }
header .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 800; letter-spacing: -.02em; color: var(--text); text-decoration: none; }
.logo svg { width: 24px; height: 24px; }
.logo .lm-mix { fill: #8a6d00; }
.logo small { font-size: 13px; font-weight: 600; color: var(--text-sub); }
.head-links { display: flex; align-items: center; gap: 16px; font-size: 14px; }
.head-links a { color: var(--text-sub); }
.link-btn { background: none; border: 0; font: inherit; font-size: 14px; color: var(--text-sub); cursor: pointer; text-decoration: underline; }

main { padding: 32px 0 80px; }
h1 { font-size: clamp(24px, 4vw, 32px); font-weight: 800; letter-spacing: -.03em; line-height: 1.3; }
h2 { font-size: 18px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 12px; }
.sub { color: var(--text-sub); font-size: 15px; }
section { margin-top: 36px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sec-head h2 { margin-bottom: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font: inherit; font-size: 15px; font-weight: 700;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: default; }
.btn-kakao { background: var(--kakao); border-color: var(--kakao); color: var(--kakao-text); }
.btn-dark { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn-danger { color: var(--danger); }
.btn svg { width: 18px; height: 18px; fill: currentColor; }

.login { text-align: center; padding: 72px 0; }
.login p { margin: 12px 0 28px; }
.notice { margin-top: 16px; padding: 12px 16px; border-radius: 12px; background: var(--bg-soft); font-size: 14px; }
.notice-warn { color: var(--danger); }

.card { background: var(--bg-soft); border-radius: var(--radius); padding: 20px; }
.copy-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.copy-row + .copy-row { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.copy-label { font-size: 13px; font-weight: 700; color: var(--text-sub); margin-bottom: 2px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; }
.copy-text { font-size: 15px; font-weight: 600; }

.usage-num { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.usage-num b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.bar { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 10px 0 12px; }
.bar i { display: block; height: 100%; width: 0; background: var(--text); border-radius: 99px; }
.bar.is-full i { background: var(--danger); }
.usage-more { font-size: 14px; color: var(--text-sub); }
.usage-more a { color: var(--text); font-weight: 700; }

.drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 22px; text-align: center; color: var(--text-sub); font-size: 14px; }
.drop.is-over { border-color: var(--text); color: var(--text); }
.drop .btn { margin-bottom: 8px; }
.msg { margin-top: 10px; font-size: 14px; min-height: 22px; }
.msg.is-error { color: var(--danger); }

.grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-top: 16px; }
.grid li { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg); }
.thumb { display: block; aspect-ratio: 1; background: var(--bg-soft); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0 8px; padding: 8px 10px 0; font-size: 12px; color: var(--text-sub); }
.acts { display: flex; gap: 6px; padding: 8px 10px 10px; }
.acts .btn { flex: 1; padding: 0 6px; }
.empty { margin-top: 16px; color: var(--text-sub); font-size: 14px; }
.more { margin-top: 16px; text-align: center; }

/* 관리자 */
.find { display: flex; gap: 8px; }
.find input {
  flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg); color: var(--text); font: inherit; font-size: 15px;
}
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; white-space: nowrap; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
th { font-size: 12px; color: var(--text-sub); font-weight: 700; background: var(--bg-soft); }
tr:last-child td { border-bottom: 0; }
td .btn + .btn { margin-left: 4px; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--bg-soft); }
.tag-paid { background: var(--kakao); color: var(--kakao-text); }
.tag-stop { color: var(--danger); }
.table-wrap .find { padding: 10px; border-bottom: 1px solid var(--line); }
.table-wrap .find input { min-height: 34px; border-radius: 9px; font-size: 14px; }
.tbl-accounts th, .tbl-accounts td { padding: 8px 12px; }
.tbl-accounts th + th, .tbl-accounts td + td { border-left: 1px solid var(--line); }
.tbl-accounts .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl-accounts th:last-child, .tbl-accounts .acts-cell { width: 1%; }
.tbl-accounts .btn-sm { min-height: 28px; padding: 0 9px; font-size: 12px; border-radius: 7px; }
#found-info:empty { display: none; }
#found-info { margin-top: 12px; }
.stats { display: flex; gap: 24px; flex-wrap: wrap; }
.stats div b { display: block; font-size: 22px; font-weight: 800; }
.stats div span { font-size: 13px; color: var(--text-sub); }

/* 확인 창 */
.confirm { margin: auto; width: min(360px, calc(100vw - 40px)); padding: 24px; border: 0; border-radius: 16px; background: var(--bg); color: var(--text); }
.confirm::backdrop { background: rgba(0, 0, 0, .5); }
.confirm p { font-size: 16px; font-weight: 600; white-space: pre-line; }
.confirm-acts { display: flex; gap: 8px; margin-top: 20px; }
.confirm-acts .btn { flex: 1; }
.btn-danger-fill { background: var(--danger); border-color: var(--danger); color: #fff; }
@media (prefers-color-scheme: dark) { .btn-danger-fill { color: #15171c; } }

/* 휴대폰: 사진은 두 칸씩 */
@media (max-width: 480px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .meta { font-size: 11px; padding: 6px 8px 0; }
  .acts { flex-direction: column; padding: 6px 8px 8px; }
}

.login .agree { margin: 16px 0 0; font-size: 13px; color: var(--text-sub); }
.login .agree a { color: inherit; }

.leave { margin-top: 56px; text-align: center; }
.leave .link-btn { font-size: 13px; }
