*, *::before, *::after { box-sizing: border-box; }
:root { --text: #14171c; --text-2: #5b6470; --line: #dfe3e8; --bg: #eef0f3; --card: #fff; --accent: #23272E; --ok: #1e7a4c; --warn: #9a5b00; --bad: #b3261e; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; font-size: 16px; line-height: 1.5; color: var(--text); background: var(--bg); word-break: keep-all; -webkit-text-size-adjust: 100%; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: 20px; margin: 4px 0 12px; }
h3 { font-size: 16px; margin: 0 0 8px; }
a { color: #1f5fbf; }
button, input, select, textarea { font: inherit; color: inherit; }
button { min-height: 44px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
button.primary { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 700; }
button.danger { color: var(--bad); border-color: #f1c4c0; }
button.small { min-height: 36px; padding: 4px 10px; font-size: 14px; }
button:disabled { opacity: .45; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid #1f5fbf; outline-offset: 2px; }
input[type=text], input[type=url], input[type=search], input[type=password], input[type=date], select, textarea { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid #c9ced6; border-radius: 10px; background: #fbfcfd; }
textarea { min-height: 90px; resize: vertical; }
label { display: block; font-weight: 600; font-size: 14px; color: var(--text-2); margin: 10px 0 4px; }
label.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 500; font-size: 15px; min-height: 44px; margin: 4px 0; }
label.check input { width: 22px; height: 22px; }
.center { text-align: center; padding: 60px 16px; color: var(--text-2); }
.top { position: sticky; top: 0; z-index: 5; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 12px calc(0px); padding-top: max(8px, env(safe-area-inset-top)); }
.top-row { max-width: 980px; margin: 0 auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.top-row h1 { font-size: 17px; margin-right: auto; }
.top-row select { width: auto; min-width: 160px; flex: 1 1 160px; max-width: 320px; }
nav.tabs { max-width: 980px; margin: 6px auto 0; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
nav.tabs button { border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; font-weight: 600; color: var(--text-2); white-space: nowrap; }
nav.tabs button[aria-current=page] { color: var(--text); border-bottom-color: var(--text); }
main { max-width: 980px; margin: 0 auto; padding: 16px 12px 120px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row > .grow { flex: 1 1 200px; min-width: 0; }
.muted { color: var(--text-2); font-size: 14px; }
.note { background: #f6f7f9; border-radius: 10px; padding: 10px 12px; font-size: 14px; color: var(--text-2); margin: 8px 0; }
.warn { background: #fff6e5; color: #6b4200; }
.err { background: #fdecea; color: var(--bad); }
.okbox { background: #e9f6ef; color: var(--ok); }
.list { display: flex; flex-direction: column; gap: 8px; }
.item { display: grid; grid-template-columns: auto 64px minmax(0, 1fr); gap: 10px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.item.off { opacity: .55; }
.item.drag-over { outline: 3px dashed #1f5fbf; }
.handle { cursor: grab; color: var(--text-2); font-size: 20px; padding: 0 4px; user-select: none; touch-action: none; }
.thumb { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: #e6e9ee; display: block; }
.thumb.tall { height: 86px; }
.item .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.item .actions { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: #e9ecf0; color: var(--text-2); margin-right: 4px; }
.badge.ad { background: #fff0d6; color: #7a4a00; }
.badge.pin { background: #23272E; color: #fff; }
.badge.ohouse { background: #469DF5; color: #fff; } .badge.coupang { background: #E52528; color: #fff; } .badge.naver { background: #03C75A; color: #fff; }
.badge.bad { background: var(--bad); color: #fff; }
.cap { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 14px; color: var(--text-2); }
.sheet { position: fixed; inset: 0; z-index: 20; background: rgba(10, 14, 20, .45); display: flex; align-items: flex-end; justify-content: center; }
.sheet > div { background: #fff; width: min(100%, 720px); max-height: 92vh; overflow-y: auto; border-radius: 18px 18px 0 0; padding: 18px 16px calc(24px + env(safe-area-inset-bottom)); }
@media (min-width: 760px) { .sheet { align-items: center; } .sheet > div { border-radius: 18px; } }
.sheet-actions { position: sticky; bottom: -24px; background: #fff; padding: 12px 0 4px; display: flex; gap: 8px; justify-content: flex-end; border-top: 1px solid var(--line); margin-top: 14px; }
.links .lrow { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 8px; }
.grid-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; max-height: 320px; overflow-y: auto; }
.grid-posts label { margin: 0; position: relative; font-size: 12px; color: var(--text); }
.grid-posts img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 8px; display: block; background: #e6e9ee; }
.grid-posts input { position: absolute; top: 6px; left: 6px; width: 22px; height: 22px; }
.grid-posts input:checked + img { outline: 3px solid #1f5fbf; }
.status { position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 30; background: rgba(14, 17, 22, .92); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; max-width: calc(100% - 24px); display: none; }
.status.on { display: block; }
.status.bad { background: var(--bad); }
.meter { height: 10px; background: #e6e9ee; border-radius: 999px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
td, th { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.login { max-width: 380px; margin: 12vh auto; }
.empty-state { text-align: center; color: var(--text-2); padding: 30px 10px; }
@media (max-width: 520px) { .item { grid-template-columns: auto 52px minmax(0, 1fr); } .thumb { width: 52px; height: 52px; } }
