:root {
  --red: #c8102e; --red-dark: #a00d24;
  --black: #000; --ink: #1a1a1a; --white: #fff;
  --gray-6: #666; --gray-9: #999; --gray-c: #ccc; --gray-e: #eee; --gray-f5: #f5f5f5;
  --font-sans: 'Pretendard',-apple-system,BlinkMacSystemFont,'Apple SD Gothic Neo',sans-serif;
  --radius: 6px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body { font-family: var(--font-sans); background: #f8f9fc; color: var(--ink); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* LOGIN */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%); padding: 1rem; }
.login-card { background: #fff; width: 100%; max-width: 400px; border-radius: 12px; padding: 2.5rem 2rem; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.login-logo { font-size: 1.5rem; font-weight: 900; margin-bottom: 1rem; }
.logo-biz { color: var(--red); } .logo-ch { color: var(--black); margin-left: .2rem; font-weight: 400; }
.login-title { font-size: 1.25rem; font-weight: 800; margin-bottom: .25rem; }
.login-sub { font-size: .82rem; color: var(--gray-9); margin-bottom: 1.5rem; }
.login-error { background: #fff0f0; border: 1px solid #ffcccc; color: var(--red); padding: .6rem .8rem; border-radius: var(--radius); font-size: .82rem; margin-bottom: 1rem; }
.login-form { display: flex; flex-direction: column; gap: .9rem; }

/* FIELDS */
.field-group { display: flex; flex-direction: column; gap: .35rem; position: relative; }
.field-label { font-size: .8rem; font-weight: 700; color: #444; display: flex; align-items: center; gap: .4rem; }
.field-required { color: var(--red); }
.field-hint { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; background: var(--gray-c); color: #fff; border-radius: 50%; font-size: .65rem; cursor: help; flex-shrink: 0; }
.field-input { border: 1.5px solid var(--gray-c); padding: .65rem .85rem; font-size: .9rem; font-family: inherit; border-radius: var(--radius); transition: border-color .2s; background: #fff; }
.field-input:focus { outline: none; border-color: var(--red); }
.field-input.is-error { border-color: var(--red); }
select.field-input { cursor: pointer; }
.field-textarea { resize: vertical; min-height: 80px; }
.field-textarea--sm { min-height: 70px; }
.field-counter { font-size: .68rem; color: var(--gray-9); text-align: right; }
.field-editor { min-height: 300px; border: 1.5px solid var(--gray-c); padding: .75rem .85rem; border-radius: var(--radius); font-size: .92rem; line-height: 1.75; overflow-y: auto; }
.field-editor:focus { outline: none; border-color: var(--red); }
.field-editor:empty::before { content: attr(data-placeholder); color: var(--gray-9); pointer-events: none; }
.field-editor h2 { font-size: 1.15rem; font-weight: 700; margin: .75rem 0 .4rem; }
.field-editor h3 { font-size: 1rem; font-weight: 700; margin: .6rem 0 .3rem; }
.field-editor ul { padding-left: 1.5rem; list-style: disc; }
.field-editor blockquote { border-left: 3px solid var(--red); padding: .4rem .8rem; margin: .5rem 0; color: #555; font-style: italic; background: #f9f9f9; }

/* EDITOR TOOLBAR */
.editor-toolbar { display: flex; align-items: center; gap: .2rem; border: 1.5px solid var(--gray-c); border-bottom: none; padding: .4rem .6rem; background: var(--gray-f5); border-radius: var(--radius) var(--radius) 0 0; flex-wrap: wrap; }
.editor-toolbar + .field-editor { border-radius: 0 0 var(--radius) var(--radius); }
.editor-btn { padding: .25rem .5rem; font-size: .78rem; border-radius: 3px; color: var(--ink); transition: all .15s; }
.editor-btn:hover { background: var(--gray-e); }
.editor-btn.is-active { background: var(--ink); color: #fff; }
.editor-sep { width: 1px; height: 16px; background: var(--gray-c); margin: 0 .1rem; }

/* IMAGE UPLOAD */
.image-upload-area { border: 2px dashed var(--gray-c); border-radius: var(--radius); position: relative; cursor: pointer; transition: border-color .2s; overflow: hidden; }
.image-upload-area:hover, .image-upload-area.is-drag { border-color: var(--red); }
.image-upload-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 2; }
.image-upload-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; padding: 2rem; text-align: center; color: var(--gray-9); font-size: .82rem; }
.image-hint { font-size: .72rem; }
.image-preview { width: 100%; max-height: 260px; object-fit: cover; display: block; }

/* BTNS */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: .6rem 1.4rem; font-family: inherit; font-size: .875rem; font-weight: 700; border-radius: var(--radius); cursor: pointer; transition: all .18s; border: 2px solid transparent; }
.btn--primary { background: var(--red); color: #fff; border-color: var(--red); }
.btn--primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn--ghost { color: var(--ink); border-color: var(--gray-c); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--outline { border: 1.5px solid var(--gray-c); color: var(--ink); }
.btn--outline:hover { border-color: var(--ink); }
.btn--full { width: 100%; }
.btn--sm { padding: .35rem .85rem; font-size: .78rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* HEADER */
.press-header { background: var(--black); color: #fff; position: sticky; top: 0; z-index: 100; }
.press-header__inner { display: flex; align-items: center; gap: 1.5rem; padding: 0 1.5rem; height: 52px; max-width: 1100px; margin: 0 auto; }
.press-header__logo a { font-size: 1.1rem; font-weight: 900; display: flex; gap: .2rem; }
.press-header__logo .logo-biz { color: var(--red); }
.press-header__logo .logo-ch { color: #fff; font-weight: 400; }
.press-nav { display: flex; gap: .25rem; flex: 1; }
.press-nav__btn { color: #aaa; font-size: .82rem; font-weight: 600; padding: .4rem .85rem; border-radius: 4px; transition: all .15s; }
.press-nav__btn:hover { color: #fff; background: #222; }
.press-nav__btn.is-active { color: #fff; background: var(--red); }
.press-header__right { display: flex; align-items: center; gap: .75rem; margin-left: auto; }
.press-user { font-size: .8rem; color: #ccc; }
.press-header__right .btn--ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.press-header__right .btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.1); }

/* CONTAINER */
.container-press { max-width: 780px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.tab-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.tab-title { font-size: 1.1rem; font-weight: 800; }
.tab-stats { font-size: .78rem; color: var(--gray-9); display: flex; gap: .75rem; }
.tab-stats span { background: var(--gray-f5); padding: .2rem .6rem; border-radius: 12px; }

/* ARTICLE FORM */
.article-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.form-actions { display: flex; justify-content: flex-end; gap: .75rem; padding-top: .5rem; border-top: 1px solid var(--gray-e); }
.form-error { background: #fff0f0; border: 1px solid #ffcccc; color: var(--red); padding: .6rem .8rem; border-radius: var(--radius); font-size: .82rem; }

/* MY ARTICLES */
.my-articles { display: flex; flex-direction: column; gap: .75rem; }
.article-item { background: #fff; border: 1px solid var(--gray-e); border-radius: var(--radius); padding: 1rem 1.25rem; display: flex; gap: 1rem; align-items: flex-start; }
.article-item__thumb { width: 80px; height: 55px; border-radius: 4px; overflow: hidden; flex-shrink: 0; background: var(--gray-e); }
.article-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.article-item__body { flex: 1; min-width: 0; }
.article-item__title { font-size: .92rem; font-weight: 700; line-height: 1.4; margin-bottom: .35rem; }
.article-item__meta { display: flex; gap: .6rem; font-size: .72rem; color: var(--gray-9); flex-wrap: wrap; align-items: center; }
.article-item__actions { display: flex; gap: .4rem; flex-shrink: 0; }
.status-badge { display: inline-flex; align-items: center; padding: .15rem .5rem; border-radius: 10px; font-size: .68rem; font-weight: 700; letter-spacing: .03em; }
.status-badge--pending { background: #fff8e1; color: #f59e0b; }
.status-badge--approved { background: #e8f5e9; color: #2e7d32; }
.status-badge--rejected { background: #fce4e4; color: var(--red); }
.article-url { font-size: .7rem; background: var(--gray-f5); border-radius: 3px; padding: .15rem .4rem; color: #555; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.article-url:hover { color: var(--red); }

/* TOOLTIP */
.tooltip-bubble { position: fixed; background: #1a1a1a; color: #fff; font-size: .75rem; padding: .45rem .7rem; border-radius: 5px; max-width: 220px; line-height: 1.5; z-index: 9999; pointer-events: none; opacity: 0; transition: opacity .15s; }
.tooltip-bubble.is-visible { opacity: 1; }

/* TOAST */
.toast { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%) translateY(80px); background: #1a1a1a; color: #fff; padding: .6rem 1.5rem; font-size: .82rem; border-radius: 6px; transition: transform .3s, opacity .3s; opacity: 0; z-index: 9000; }
.toast--show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast--error { background: var(--red); }
.toast--success { background: #2e7d32; }

/* EMPTY STATE */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--gray-9); }
.empty-state p { margin-top: .5rem; font-size: .88rem; }
.load-more-wrap { text-align: center; padding: 1.25rem 0; }

/* Password form */
.pw-form { max-width: 420px; display: flex; flex-direction: column; gap: 1.25rem; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 500; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal-box { background: #fff; border-radius: 10px; width: 100%; max-width: 420px; padding: 1.75rem; display: flex; flex-direction: column; gap: 1.25rem; box-shadow: 0 8px 32px rgba(0,0,0,.18); }
.modal-header { display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: 1.05rem; font-weight: 800; }
.modal-close { font-size: 1.1rem; color: var(--gray-9); background: none; border: none; cursor: pointer; padding: .2rem .4rem; line-height: 1; }
.modal-close:hover { color: var(--ink); }
#pw-form { display: flex; flex-direction: column; gap: 1.1rem; }

@media (max-width: 600px) {
  .press-header__inner { padding: 0 .75rem; gap: .75rem; }
  .container-press { padding: 1rem .75rem 2rem; }
  .article-item { flex-wrap: wrap; }
  .article-item__actions { width: 100%; }
}
