*
{
    -webkit-tap-highlight-color : transparent;
    box-sizing : border-box;
    margin : 0;
    padding : 0;
}

::selection
{
    background : #d4a85a;
    color : #2c5f4a;
}

::-moz-selection
{
    background : #d4a85a;
    color : #2c5f4a;
}

:root
{
    --bg : #f5f1eb;
    --surface : #ffffff;
    --tint : #ede8e0;
    --text : #0f1928;
    --muted : #4a3f30;
    --border : #d5cbbc;
    --accent : #c9a84c;
    --accent-hover : #b8973d;
    --accent-text : #8a6a3e;
    --on-accent : #0f1928;
    --header-bg : #0f1928;
    --on-header : #f5f1eb;
    --danger : #b4161f;
    --success : #1a7f4b;
    --warning : #9a6700;
    --radius : 6px;
}

@media (prefers-color-scheme : dark)
{
    :root
    {
        --bg : #0f1928;
        --surface : #4a3f30;
        --tint : #3a3022;
        --text : #f5f1eb;
        --muted : #d5cbbc;
        --border : #6b5e4e;
        --accent : #c9a84c;
        --accent-hover : #b8973d;
        --accent-text : #c9a84c;
        --on-accent : #0f1928;
        --header-bg : #0f1928;
        --on-header : #f5f1eb;
        --danger : #ff7b72;
        --success : #3fb97a;
        --warning : #e3b341;
    }
}

[hidden]
{
    display : none !important;
}

html
{
    scroll-behavior : smooth;
    scroll-padding-top : 88px;
}

body
{
    background : var(--bg);
    color : var(--text);
    font-family : system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height : 1.5;
}

body.no-scroll
{
    overflow : hidden;
}

button
{
    font : inherit;
    color : inherit;
    cursor : pointer;
    background : none;
    border : 0;
}

.footer-links .heart
{
    font-size : 0.9rem;
}

.brand
{
    color : var(--on-header);
    font-size : 1.15rem;
    font-weight : 700;
    letter-spacing : -0.01em;
    text-decoration : none;
    white-space : nowrap;
    overflow : hidden;
    text-overflow : ellipsis;
    max-width : 60vw;
}

.site-header
{
    background : var(--header-bg);
    border-bottom : 1px solid rgba(255, 255, 255, 0.08);
    position : sticky;
    top : 0;
    z-index : 50;
}

.header-inner
{
    max-width : 1200px;
    margin : 0 auto;
    padding : 0 20px;
    height : 72px;
    display : flex;
    align-items : center;
    justify-content : space-between;
}

.nav
{
    display : flex;
    align-items : center;
    gap : 6px;
}

.nav a, .dropdown-toggle
{
    display : inline-flex;
    align-items : center;
    gap : 6px;
    padding : 6px 14px;
    border-radius : 4px;
    color : rgba(245, 241, 235, 0.82);
    text-decoration : none;
    font-size : 0.88rem;
    font-weight : 500;
    letter-spacing : 0.01em;
    transition : background 0.18s ease, color 0.18s ease;
}

.nav a:hover, .dropdown-toggle:hover
{
    color : #f5f1eb;
    background : rgba(255, 255, 255, 0.08);
}

.dropdown
{
    position : relative;
}

.dropdown-toggle .chevron
{
    width : 8px;
    height : 8px;
    border-right : 2px solid currentColor;
    border-bottom : 2px solid currentColor;
    transform : rotate(45deg) translateY(-2px);
    transition : transform 0.25s ease;
}

.dropdown.open .chevron
{
    transform : rotate(225deg) translateY(-2px);
}

.dropdown-menu
{
    position : absolute;
    top : calc(100% + 6px);
    right : 0;
    min-width : 200px;
    background : var(--surface);
    border : 1px solid var(--border);
    border-radius : var(--radius);
    box-shadow : 0 16px 40px rgba(15, 25, 40, 0.15);
    padding : 6px;
    opacity : 0;
    visibility : hidden;
    transform : translateY(-8px);
    transition : opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.dropdown.open .dropdown-menu
{
    opacity : 1;
    visibility : visible;
    transform : translateY(0);
}

.dropdown-menu button, .dropdown-menu a
{
    display : flex;
    align-items : center;
    gap : 10px;
    width : 100%;
    text-align : left;
    padding : 9px 12px;
    border-radius : 8px;
    font-size : 0.9rem;
    color : var(--text);
    transition : background 0.15s ease, color 0.15s ease;
}

.dropdown-menu button:hover, .dropdown-menu button.active, .dropdown-menu a:hover
{
    background : var(--bg);
    color : var(--text);
}

.hamburger
{
    display : none;
    width : 42px;
    height : 42px;
    position : relative;
    background : rgba(255, 255, 255, 0.08);
    border : 1px solid rgba(255, 255, 255, 0.14);
    border-radius : 4px;
    z-index : 60;
}

.hamburger span
{
    position : absolute;
    left : 9px;
    width : 22px;
    height : 2px;
    background : #f5f1eb;
    border-radius : 2px;
    transition : transform 0.3s ease, opacity 0.2s ease, top 0.3s ease;
}

.hamburger span:nth-child(1)
{
    top : 13px;
}

.hamburger span:nth-child(2)
{
    top : 19px;
}

.hamburger span:nth-child(3)
{
    top : 25px;
}

.hamburger.open span:nth-child(1)
{
    top : 19px;
    transform : rotate(45deg);
}

.hamburger.open span:nth-child(2)
{
    opacity : 0;
}

.hamburger.open span:nth-child(3)
{
    top : 19px;
    transform : rotate(-45deg);
}

.page
{
    max-width : 1200px;
    margin : 0 auto;
    padding : 28px 20px 60px;
}

.page-title
{
    font-size : 1.8rem;
    letter-spacing : -0.02em;
    margin-bottom : 4px;
}

.page-sub
{
    color : var(--muted);
    margin-bottom : 24px;
}

.card
{
    background : var(--surface);
    border : 1px solid var(--border);
    border-radius : 6px;
}

.btn
{
    padding : 8px 16px;
    border : 1px solid var(--border);
    border-radius : 4px;
    background : var(--surface);
    font-size : 0.875rem;
    font-weight : 700;
    letter-spacing : 0.04em;
    transition : background 0.2s ease, transform 0.15s ease;
}

.btn:hover
{
    background : var(--bg);
}

.btn:active
{
    transform : scale(0.97);
}

.btn.primary
{
    background : var(--accent);
    border-color : var(--accent);
    color : var(--on-accent);
}

.btn.primary:hover
{
    background : var(--accent-hover);
    border-color : var(--accent-hover);
}

.date-badge
{
    width : 52px;
    flex-shrink : 0;
    text-align : center;
    border : 1px solid var(--border);
    border-radius : 6px;
    padding : 6px 0;
    background : var(--surface);
}

.date-badge b
{
    display : block;
    font-size : 1.2rem;
    line-height : 1.1;
}

.date-badge small
{
    font-size : 0.7rem;
    text-transform : uppercase;
    letter-spacing : 0.06em;
    color : var(--muted);
}

.empty
{
    padding : 28px 16px;
    text-align : center;
    color : var(--muted);
    font-size : 0.9rem;
}

.guide
{
    padding : 28px;
    max-width : 860px;
}

.guide section, .guide-contents
{
    margin-bottom : 28px;
}

.guide h2
{
    font-size : 1.25rem;
    margin-bottom : 10px;
}

.guide h3
{
    font-size : 1.05rem;
    margin : 16px 0 6px;
}

.guide p, .guide li
{
    line-height : 1.65;
}

.guide p
{
    margin-bottom : 10px;
}

.guide ul, .guide ol
{
    margin : 0 0 10px 22px;
}

.guide li
{
    margin-bottom : 6px;
}

.guide a
{
    color : var(--accent-text);
    font-weight : 600;
    text-decoration : none;
    background-image : linear-gradient(currentColor, currentColor);
    background-size : 100% 1px;
    background-position : 0 100%;
    background-repeat : no-repeat;
    padding-bottom : 1px;
    transition : background-size 0.3s ease, color 0.2s ease;
}

.guide a:hover, .guide a:focus-visible
{
    background-size : 100% 3px;
}

.guide a:focus-visible
{
    outline : 2px solid var(--accent-text);
    outline-offset : 3px;
    border-radius : 3px;
}

.guide-contents
{
    background : var(--bg);
    border : 1px solid var(--border);
    border-radius : var(--radius);
    padding : 20px 22px;
}

.guide-contents ol
{
    list-style : none;
    counter-reset : guide;
    margin : 0;
    columns : 2;
    column-gap : 24px;
}

.guide-contents li
{
    counter-increment : guide;
    break-inside : avoid;
    margin-bottom : 4px;
}

.guide-contents a
{
    display : flex;
    align-items : center;
    gap : 12px;
    padding : 9px 12px;
    border-radius : 8px;
    color : var(--text);
    font-weight : 500;
    background-image : none;
    transition : background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.guide-contents a::before
{
    content : counter(guide);
    flex : 0 0 26px;
    width : 26px;
    height : 26px;
    display : grid;
    place-items : center;
    border-radius : 50%;
    background : var(--accent);
    color : var(--on-accent);
    font-size : 0.8rem;
    font-weight : 700;
    transition : transform 0.2s ease;
}

.guide-contents a:hover, .guide-contents a:focus-visible
{
    background : var(--surface);
    color : var(--accent-text);
    transform : translateX(4px);
}

.guide-contents a:hover::before, .guide-contents a:focus-visible::before
{
    transform : scale(1.1);
}

body .footer-links
{
    background : var(--header-bg);
    border-top : 1px solid rgba(255, 255, 255, 0.1);
}

body .footer-links a
{
    color : rgba(245, 241, 235, 0.65);
    background-image : linear-gradient(#c9a84c, #c9a84c);
    font-size : 0.875rem;
    transition : background-size 0.4s ease-in-out, color 0.15s ease;
}

body .footer-links a:hover, body .footer-links a:focus
{
    color : #f5f1eb;
}

@media (max-width : 760px)
{
    .hamburger
    {
        display : block;
    }

    .nav
    {
        position : fixed;
        top : 72px;
        left : 0;
        right : 0;
        bottom : 0;
        background : var(--header-bg);
        flex-direction : column;
        align-items : stretch;
        gap : 4px;
        padding : 16px;
        overflow-y : auto;
        transform : translateX(100%);
        visibility : hidden;
        transition : transform 0.35s ease, visibility 0.35s;
    }

    .nav.open
    {
        transform : translateX(0);
        visibility : visible;
    }

    .nav a, .dropdown-toggle
    {
        width : 100%;
        justify-content : space-between;
        padding : 14px;
        font-size : 1.05rem;
    }

    .dropdown-menu
    {
        position : static;
        min-width : 0;
        border : 0;
        box-shadow : none;
        background : rgba(255, 255, 255, 0.04);
        padding : 0 0 0 10px;
        opacity : 1;
        visibility : visible;
        transform : none;
        max-height : 0;
        overflow : hidden;
        transition : max-height 0.35s ease;
    }

    .dropdown.open .dropdown-menu
    {
        max-height : 600px;
    }

    .dropdown-menu a
    {
        color : rgba(245, 241, 235, 0.65);
    }

    .dropdown-menu a:hover
    {
        background : rgba(255, 255, 255, 0.05);
        color : #f5f1eb;
    }
}

@media (prefers-color-scheme : dark)
{
    .guide a { color : var(--accent-text); }
    .guide-contents a { color : var(--text); }
    .guide-contents a:hover, .guide-contents a:focus-visible { color : var(--accent-text); }
}

@media (max-width : 640px)
{
    .guide { padding : 20px 16px; }
    .guide-contents ol { columns : 1; }
}

.logo
{
    display : inline-flex;
    flex-direction : column;
    font-family : 'Inter','Helvetica Neue',Arial,sans-serif;
    font-size : 1.5rem;
    font-weight : 800;
    line-height : 1.05;
    color : #F5F1EB;
    letter-spacing : -0.01em;
    flex-shrink : 0;
    text-decoration : none;
}

.logo span
{
    color : #C9A84C;
    font-weight : 800;
}

.logo .logo-top
{
    color : #F5F1EB;
}

.logo .logo-sub
{
    font-size : 0.8rem;
    font-weight : 700;
    letter-spacing : 0.02em;
    margin-top : 2px;
}

.logo:hover
{
    text-decoration : none;
}

.auth-card .logo
{
    margin-bottom : 20px;
}

.auth-card .logo span
{
    color : var(--accent-text);
}

.auth-card .logo .logo-top
{
    color : var(--text);
}

body
{
    padding-bottom : 72px;
}

.demo-banner
{
    position : fixed;
    left : 0;
    right : 0;
    bottom : 0;
    z-index : 100;
    background : #0f1928;
    color : #F5F1EB;
    text-align : center;
    padding : 10px 16px;
    font-size : 0.9rem;
    border-top : 2px solid #C9A84C;
}

.demo-banner strong
{
    color : #C9A84C;
    text-transform : uppercase;
    letter-spacing : 0.06em;
    margin-right : 6px;
}

.demo-banner a
{
    color : #C9A84C;
    font-weight : 600;
    text-decoration : underline;
    margin-left : 6px;
}

input:disabled,
select:disabled,
textarea:disabled,
button:disabled
{
    cursor : not-allowed;
}

.resource-card:has(input:disabled)
{
    cursor : not-allowed;
}
