/* Beopp public pages — shared with homepage card/grid styling */
:root {
    --color-text: #1a1a1a;
    --color-muted: #5c5c5c;
    --color-border: #e2e2e2;
    --color-bg: #f6f7f9;
    --color-surface: #fff;
    --color-primary: #1a5fd4;
    --color-primary-hover: #144ba8;
    --color-success: #1a7f4a;
    --radius: 12px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --max-width: 1200px;
    --content-width: 760px;
}

*, *::before, *::after { box-sizing: border-box; }

body.public-page {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--color-text);
    background: var(--color-bg);
}

.page-main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px 20px 56px;
}

.page-main--narrow {
    max-width: var(--content-width);
}

.page-heading {
    margin: 0 0 16px;
    font-size: clamp(1.6rem, 4vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.section-heading {
    margin: 0 0 8px;
    font-size: clamp(1.25rem, 3vw, 1.6rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.section-lead {
    margin: 0 0 20px;
    color: var(--color-muted);
}

.page-section {
    margin: 36px 0;
}

.back-link {
    margin: 0 0 16px;
}

.back-link a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}

.back-link a:hover {
    text-decoration: underline;
}

.meta {
    color: var(--color-muted);
    margin: 8px 0 16px;
}

.meta a {
    color: var(--color-primary);
}

.contest-meta-list {
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}

.contest-meta-list li {
    margin: 6px 0;
}

.contest-meta-list strong {
    color: var(--color-text);
}

.contest-description {
    margin: 0 0 8px;
    white-space: pre-wrap;
}

.notice {
    margin: 0 0 20px;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.95rem;
}

.notice--success {
    background: #eefbf3;
    border: 1px solid #9acd9a;
    color: #1a5c32;
}

.notice--info {
    background: #f0f7ff;
    border: 1px solid #c5d9f5;
    color: #1a4d8c;
}

.notice--warning {
    background: #fff8e6;
    border: 1px solid #e6c200;
    color: #7a5c00;
    font-weight: 600;
}

.notice--ended {
    background: #fff0f0;
    border: 1px solid #e8b4b4;
    color: #8b2020;
    font-weight: 600;
}

.sponsor-feature {
    margin: 0 0 28px;
    padding: 20px 24px;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    border: 1px solid #d8e2ef;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.sponsor-feature__label {
    margin: 0 0 14px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-muted);
}

.sponsor-feature__link {
    display: inline-block;
    max-width: 100%;
    line-height: 0;
}

.sponsor-feature__img {
    max-width: min(100%, 520px);
    max-height: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

.sponsor-feature__name {
    margin: 14px 0 0;
    font-size: 1.05rem;
    font-weight: 600;
}

.sponsor-feature__name a {
    color: var(--color-primary);
    text-decoration: none;
}

.sponsor-feature__name a:hover {
    text-decoration: underline;
}

.voting-countdown-wrap,
.voting-countdown {
    margin: 16px 0 24px;
    padding: 14px 18px;
    background: #f4f8ff;
    border: 1px solid #c5d9f5;
    border-radius: var(--radius);
    font-size: 0.95rem;
}

.voting-countdown-wrap strong,
.voting-countdown strong {
    display: block;
    margin-bottom: 6px;
    color: #1a4d8c;
}

.voting-countdown-wrap span,
.voting-countdown-time {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease;
}

.btn--primary {
    background: var(--color-primary);
    color: #fff;
}

.btn--primary:hover {
    background: var(--color-primary-hover);
    color: #fff;
}

.btn--success {
    background: var(--color-success);
    color: #fff;
}

.btn--success:hover {
    background: #15663d;
    color: #fff;
}

.cta-panel {
    margin-top: auto;
    padding: 14px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid var(--color-border);
    text-align: center;
}

.cta-panel .cooldown {
    color: var(--color-muted);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.cta-panel form {
    margin: 0;
}

.cta-panel label {
    font-size: 0.9rem;
    color: var(--color-muted);
}

.cta-panel input[type="number"] {
    padding: 6px 8px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    width: 64px;
    margin-left: 8px;
}

.contest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.contest-card {
    display: flex;
    flex-direction: column;
    background: var(--color-surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.04);
    height: 100%;
}

.contest-card__media {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: linear-gradient(145deg, #dce4ef, #b8c5d9);
}

.contest-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 0.25s ease;
}

.contest-card__media:hover img {
    transform: scale(1.03);
}

.contest-card__body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
}

.contest-card__title {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.3;
}

.contest-card__title a {
    color: var(--color-text);
    text-decoration: none;
}

.contest-card__title a:hover {
    color: var(--color-primary);
}

.contest-card__bio {
    margin: 0;
    font-size: 0.92rem;
    color: var(--color-muted);
    flex: 1;
}

.contest-card__stat {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
}

.contest-card__stat--muted {
    font-weight: 400;
    color: var(--color-muted);
}

.contest-card__status {
    margin: 0;
    font-size: 0.88rem;
    color: var(--color-muted);
    font-style: italic;
}

.empty-state {
    margin: 0;
    padding: 28px 24px;
    background: var(--color-surface);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius);
    color: var(--color-muted);
    text-align: center;
}

.entry-gallery {
    margin: 0 0 20px;
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.04);
    overflow: hidden;
    padding: 12px;
}

.entry-gallery .main img {
    width: 100%;
    max-height: 560px;
    object-fit: contain;
    border-radius: 8px;
    background: #f8f8f8;
    display: block;
}

.entry-gallery .thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.entry-gallery .thumbs img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    background: #f0f0f0;
}

.entry-gallery .thumbs img.thumb-hidden {
    display: none !important;
}

.entry-gallery .thumbs img:hover {
    border-color: var(--color-primary);
}

.revision-notice {
    margin: 0 0 20px;
    padding: 14px 18px;
    border: 1px solid #e6b800;
    border-radius: var(--radius);
    background: #fffbe6;
}

.revision-notice .btn-revise {
    display: inline-flex;
    margin-top: 10px;
    padding: 10px 18px;
    background: var(--color-primary);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    min-height: 44px;
    align-items: center;
}

.pending {
    color: #a66;
    font-style: italic;
    margin: 16px 0 0;
}

.social-links-block .social-line {
    margin: 4px 0 0;
}

.social-links-block a {
    color: var(--color-primary);
}

.submit-panel {
    padding: 20px 24px;
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.submit-panel .section-heading {
    margin-bottom: 12px;
}
