:root {
    color: #222;
    font-family: Pretendard, "Noto Sans KR", system-ui, sans-serif;
    background: #f7f7f7;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.shell {
    width: min(100% - 32px, 760px);
    margin-inline: auto;
}

.site-header {
    background: #fff;
    border-bottom: 1px solid #eee;
}

.nav {
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand {
    color: #f36b21;
    font-size: 1.35rem;
    font-weight: 800;
}

.nav-spacer { flex: 1; }
#notice-link, #board-link, #login-link { font-weight: 650; white-space: nowrap; }
.nav-text {
    background: none;
    border: 0;
    padding: 0;
    color: inherit;
    cursor: pointer;
    font-weight: 650;
    white-space: nowrap;
}
.balance {
    color: #f36b21;
    font-weight: 700;
    font-size: .92rem;
    white-space: nowrap;
}

main.shell { padding-block: 32px 56px; min-height: calc(100vh - 128px); }
.site-footer {
    padding: 28px 20px 32px;
    text-align: center;
    color: #9a9a9a;
    font-size: .8rem;
    line-height: 1.55;
    background: #282a29;
}

.site-footer p { margin: 0 0 6px; }
.site-footer p:last-child { margin-bottom: 0; }
.footer-links { margin: 10px 0 !important; }
.footer-links a {
    color: #eee;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.privacy-body { margin-top: 18px; }
.privacy-body p { margin: 0; color: #444; line-height: 1.65; }
.privacy-body a { color: #f36b21; font-weight: 700; }

.panel, .event-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 18px rgb(0 0 0 / 4%);
}

.panel + .panel, .event-card + .event-card { margin-top: 18px; }
.narrow { max-width: 560px; margin-inline: auto; }
h1, h2 { margin-top: 0; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.15rem; }
.muted { color: #707070; }
.stack { display: grid; gap: 14px; }
.row { display: flex; gap: 10px; align-items: end; }
.row > label { flex: 1; }

label { display: grid; gap: 7px; font-weight: 650; }
input, textarea {
    width: 100%;
    min-height: 46px;
    border: 1px solid #d7d7d7;
    border-radius: 10px;
    padding: 10px 12px;
    background: #fff;
}

textarea { min-height: 160px; resize: vertical; }

input:focus, textarea:focus { outline: 2px solid rgb(243 107 33 / 28%); border-color: #f36b21; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.check input { width: auto; min-height: auto; }

.agree-box {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid #eee;
    border-radius: 12px;
    background: #fafafa;
}

.agree-all {
    padding-bottom: 8px;
    border-bottom: 1px solid #ececec;
    font-weight: 800;
}

.agree-row { width: 100%; }
button.agree-view {
    min-height: auto;
    padding: 0;
    background: none;
    color: inherit;
    font-weight: 500;
    text-align: left;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.agree-dialog {
    width: min(92vw, 520px);
    max-height: 80vh;
    border: 0;
    border-radius: 16px;
    padding: 22px;
}
.agree-dialog::backdrop { background: rgb(0 0 0 / 45%); }
.agree-dialog h2 { margin: 0; font-size: 1.15rem; }
.agree-dialog-body {
    max-height: 52vh;
    overflow: auto;
    display: grid;
    gap: 12px;
    margin: 14px 0 18px;
    color: #444;
    font-size: .92rem;
    line-height: 1.65;
}
.agree-dialog-body p { margin: 0; }
.agree-dialog-body a { color: #f36b21; font-weight: 700; }
.agree-dialog button { width: 100%; }

button, .button {
    min-height: 44px;
    border: 0;
    border-radius: 10px;
    padding: 11px 18px;
    background: #f36b21;
    color: #fff;
    font-weight: 750;
    cursor: pointer;
    text-align: center;
}

button.secondary, .button.secondary { background: #fff3ec; color: #c94e0b; }
button.danger { background: #b42318; }
button:disabled { opacity: .55; cursor: wait; }

.socials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.socials .button { background: #f1f1f1; color: #222; }
.links { display: flex; flex-wrap: wrap; gap: 14px; color: #555; font-size: .92rem; }

.banner {
    margin-bottom: 18px;
    border-radius: 12px;
    padding: 14px 16px;
    background: #eaf8ef;
    color: #126b36;
}

.banner.error { background: #fff0ee; color: #a4281c; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.event-card h2 { margin-bottom: 8px; }
.event-meta { color: #777; font-size: .9rem; }
.mission, .product, .ledger-item, .profile-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #eee;
}

.mission:last-child, .product:last-child, .ledger-item:last-child, .profile-row:last-child { border-bottom: 0; }
.points { color: #f36b21; font-weight: 800; }
.product-row { display: flex; gap: 8px; margin-bottom: 8px; }
.product-row input { flex: 1; min-width: 0; }

@media (max-width: 540px) {
    .row, .socials { grid-template-columns: 1fr; display: grid; }
    .nav { gap: 14px; }
    .panel { padding: 20px; }
}

body:has(.login-screen) {
    background:
        radial-gradient(ellipse 80% 46% at 8% -8%, #ffd7b8 0%, transparent 58%),
        radial-gradient(ellipse 55% 40% at 100% 108%, #ffe0c4 0%, transparent 52%),
        #fff6ef;
}

body:has(.login-screen) main.shell {
    width: min(100% - 32px, 440px);
    min-height: calc(100vh - 128px);
    display: grid;
    align-content: center;
    padding-block: 28px 48px;
}

.login-card {
    padding: 36px 32px 28px;
    border: 0;
    box-shadow: 0 22px 50px rgb(243 107 33 / 14%);
}

.login-card h1 { margin: 0 0 22px; font-size: 1.9rem; }
.login-tagline {
    margin: 0 0 10px;
    color: #f36b21;
    font-family: "Song Myung", "Noto Serif KR", "Batang", serif;
    font-size: 1.18rem;
    font-weight: 400;
    font-style: normal;
    letter-spacing: -.02em;
    line-height: 1.5;
    transform: none;
}

.login-card .stack { gap: 16px; }
.login-card button[type="submit"] {
    min-height: 50px;
    font-size: 1.05rem;
    margin-top: 4px;
}

.login-help {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
}
.login-help .button:first-child { grid-column: 1 / -1; }

.login-back {
    margin: 16px 0 0;
    text-align: center;
}

.login-back a {
    color: #777;
    font-weight: 650;
}

.found-id {
    margin: 0;
    padding: 14px 16px;
    border-radius: 12px;
    background: #fff6ef;
    color: #222;
    font-weight: 700;
    word-break: break-all;
}

.found-id strong {
    display: inline;
    margin-left: 8px;
    color: #f36b21;
    font-size: 1.15rem;
    font-weight: 800;
}

.login-split {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    align-items: center;
    margin: 22px 0 14px;
    color: #9a9a9a;
    font-size: .82rem;
    font-weight: 700;
}

.login-split::before,
.login-split::after {
    content: "";
    height: 1px;
    background: #ececec;
}

.social-login { display: grid; gap: 10px; }
.panel > .login-split { margin-top: 8px; }
.panel > .social-login { margin-bottom: 22px; }

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-weight: 750;
}

.social-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.social-btn--kakao { background: #fee500; color: #191919; }
.social-btn--kakao:hover { filter: brightness(.97); }
.social-btn--naver { background: #03c75a; color: #fff; }
.social-btn--naver:hover { filter: brightness(.96); }
.social-btn--google {
    background: #fff;
    color: #1f1f1f;
    border-color: #dadce0;
}

.social-btn--google:hover { background: #f8f9fa; }

.board-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}
.board-table th,
.board-table td {
    padding: 13px 10px;
    border-bottom: 1px solid #eee;
    text-align: left;
    font-size: .95rem;
}
.board-table thead th {
    border-bottom: 2px solid #222;
    font-size: .82rem;
    color: #555;
}
.board-num, .board-date {
    width: 1%;
    white-space: nowrap;
    color: #777;
    font-weight: 500;
    text-align: center;
}
.board-title {
    color: #222;
    font-weight: 700;
    text-decoration: none;
}
.board-title:hover { color: #f36b21; text-decoration: underline; }
.board-empty {
    text-align: center;
    color: #777;
    padding: 36px 10px !important;
}
.board-table tbody tr:hover { background: #fffaf6; }
.notice-list { display: grid; gap: 10px; }
.notice-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #eee;
    font-weight: 650;
}
.notice-item:last-child { border-bottom: 0; }
.notice-item span { color: #777; font-size: .9rem; font-weight: 500; white-space: nowrap; }
.notice-item button { min-height: 36px; padding: 8px 12px; }
.notice-item div { display: grid; gap: 4px; flex: 1; min-width: 0; }
.notice-thumb {
    width: 88px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    background: #fff6ef;
    flex-shrink: 0;
}
.notice-hero {
    display: block;
    width: 100%;
    border-radius: 14px;
    margin: 8px 0 18px;
    background: #fff6ef;
}
.notice-body {
    white-space: pre-wrap;
    line-height: 1.7;
    color: #333;
}
.notice-body--html { white-space: normal; word-break: keep-all; }
.notice-body--html h3 {
    margin: 1.6rem 0 .5rem;
    font-size: 1.05rem;
    color: #f36b21;
}
.notice-body--html p,
.notice-body--html li { margin: 0 0 10px; line-height: 1.75; }
.notice-body--html ol,
.notice-body--html ul { margin: 0 0 12px; padding-left: 1.4em; }
.notice-body--html ul.sub { list-style: none; padding-left: .5rem; }

@media (max-width: 540px) {
    .login-card { padding: 28px 20px 22px; }
}
