@import url('https://fonts.googleapis.com/css2?family=Zen+Old+Mincho:wght@400;600&family=Zen+Kaku+Gothic+New:wght@400;500;700&display=swap');

:root {
    --ink: #1E2A44;
    --ink-soft: #33456B;
    --paper: #F6F2E9;
    --paper-raised: #FFFDF8;
    --persimmon: #A8452C;
    --persimmon-soft: #C15C3F;
    --gold: #B8963E;
    --jade: #4B6B5F;
    --text: #2B2B28;
    --text-muted: #6B6459;
    --line: #DCD5C4;

    --font-display: 'Zen Old Mincho', serif;
    --font-body: 'Zen Kaku Gothic New', 'Hiragino Sans', sans-serif;

    --radius: 3px;
    --container: 880px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

a { color: var(--persimmon); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--ink);
    line-height: 1.25;
    margin: 0 0 0.5em;
}
h1 { font-size: 2.4rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.15rem; }

p { max-width: 68ch; }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Header / nav ---------- */
.site-header {
    border-bottom: 1px solid var(--line);
    background: var(--paper-raised);
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 18px;
    padding-bottom: 18px;
}
.brand {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--ink);
    letter-spacing: 0.5px;
}
.brand:hover { text-decoration: none; }
.nav-links { display: flex; gap: 28px; align-items: center; font-size: 0.95rem; }
.nav-links a { color: var(--ink-soft); }
.nav-links a.active { color: var(--persimmon); }
.tag {
    display: inline-block;
    font-size: 0.72rem;
    padding: 2px 8px;
    border: 1px solid var(--gold);
    color: var(--gold);
    border-radius: var(--radius);
    margin-left: 8px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 11px 22px;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.95rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink-soft); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-persimmon { background: var(--persimmon); color: #fff; }
.btn-persimmon:hover { background: var(--persimmon-soft); }
.btn-danger { background: transparent; color: #9C3B2E; border-color: #9C3B2E; }
.btn-danger:hover { background: #9C3B2E; color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }

/* ---------- Hero / countdown ---------- */
.hero {
    padding: 72px 0 64px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}
.hero .rule {
    width: 48px;
    height: 2px;
    background: var(--gold);
    margin-bottom: 24px;
}
.hero h1 { font-size: 2.8rem; max-width: 14ch; }
.hero .subtitle { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 40px; }

.countdown {
    display: flex;
    gap: 28px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}
.countdown .unit { text-align: left; }
.countdown .num {
    font-family: var(--font-display);
    font-size: 3.2rem;
    color: var(--ink);
    line-height: 1;
    display: inline-block;
    min-width: 1.6ch;
    opacity: 0;
    transform: translateY(6px);
    animation: rollIn 0.6s ease forwards;
}
.countdown .unit:nth-child(1) .num { animation-delay: 0.05s; }
.countdown .unit:nth-child(2) .num { animation-delay: 0.15s; }
.countdown .unit:nth-child(3) .num { animation-delay: 0.25s; }
.countdown .unit:nth-child(4) .num { animation-delay: 0.35s; }
@keyframes rollIn {
    to { opacity: 1; transform: translateY(0); }
}
.countdown .label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.day-badge {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    font-family: var(--font-display);
    color: var(--persimmon);
    font-size: 1.1rem;
    margin-bottom: 12px;
}
.day-badge .n { font-size: 1.6rem; }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 28px; }

/* ---------- Video / photo grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px; }

.card {
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}
.card .thumb {
    position: relative;
    aspect-ratio: 16/9;
    background: var(--ink);
    display: block;
}
.card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .body { padding: 16px 18px; }
.card .meta { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 6px; }
.card h3 { margin-bottom: 4px; }
.card .body p { font-size: 0.92rem; color: var(--text-muted); margin: 0; }

.video-embed {
    position: relative;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
}
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.photo-grid .item { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--paper-raised); }
.photo-grid .item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.photo-grid .item .cap { padding: 10px 12px; font-size: 0.85rem; color: var(--text-muted); }

/* ---------- Forms ---------- */
.form { max-width: 420px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 6px; }
.field input,
.field textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper-raised);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text);
}
.field input:focus,
.field textarea:focus {
    outline: 2px solid var(--gold);
    outline-offset: 1px;
    border-color: var(--gold);
}
.field textarea { resize: vertical; min-height: 90px; }
.help { font-size: 0.8rem; color: var(--text-muted); margin-top: 6px; }

.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    margin-bottom: 20px;
    border: 1px solid;
}
.alert-success { background: #EEF3EE; border-color: var(--jade); color: #33544A; }
.alert-error { background: #F7EAE6; border-color: var(--persimmon); color: #7A2F1E; }
.alert-info { background: #F0EFEA; border-color: var(--line); color: var(--ink-soft); }

/* ---------- Comments ---------- */
.comments { margin-top: 32px; border-top: 1px solid var(--line); padding-top: 28px; }
.comment { padding: 14px 0; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: none; }
.comment .who { font-size: 0.85rem; color: var(--ink-soft); font-weight: 500; }
.comment .when { font-size: 0.78rem; color: var(--text-muted); margin-left: 6px; }
.comment .body { margin-top: 4px; font-size: 0.95rem; }
.comment-form { margin-top: 20px; display: flex; gap: 10px; align-items: flex-start; }
.comment-form textarea { flex: 1; }

/* ---------- Badges / roles ---------- */
.role-badge {
    display: inline-block;
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: var(--radius);
    font-weight: 500;
}
.role-admin { background: #EFE3D0; color: var(--gold); border: 1px solid var(--gold); }
.role-traveler { background: #E5EEEA; color: var(--jade); border: 1px solid var(--jade); }
.role-viewer { background: #EFEDE6; color: var(--text-muted); border: 1px solid var(--line); }
.status-pending { color: var(--persimmon); }
.status-approved { color: var(--jade); }
.status-rejected { color: var(--text-muted); }

/* ---------- Tables (admin) ---------- */
table.admin-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.admin-table th, table.admin-table td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
}
table.admin-table th { color: var(--text-muted); font-weight: 500; font-size: 0.8rem; }
.actions-inline { display: flex; gap: 8px; }

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid var(--line);
    padding: 32px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

@media (max-width: 640px) {
    .hero h1 { font-size: 2.1rem; }
    .countdown .num { font-size: 2.3rem; }
    .site-header .container { flex-direction: column; gap: 12px; }
    .nav-links { flex-wrap: wrap; justify-content: center; gap: 16px; }
}
