.header {
    position: relative;
    z-index: 40;
    border-bottom: 1px solid var(--color-line);
    background: var(--color-bg);
}

.header-inner {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    column-gap: var(--space-1);
    min-height: var(--control-height);
    padding-block: var(--space-1);
    container-type: inline-size;
}

.logo {
    display: inline-flex;
    flex: 0 1 auto;
    align-items: center;
    gap: var(--space-1);
    min-width: 0;
    min-height: var(--control-height);
    color: var(--color-text);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}

.logo:hover {
    text-decoration: none;
}

.logo img {
    width: 32px;
    height: 32px;
    flex: none;
}

.logo-name {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.gnb {
    display: flex;
    flex: none;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
}

.gnb a {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-width: var(--control-height);
    min-height: var(--control-height);
    padding-inline: var(--space-1);
}

.gnb svg {
    width: var(--icon-size);
    height: var(--icon-size);
    flex: none;
}

.gnb-icon {
    position: relative;
    display: inline-flex;
}

.gnb-badge {
    position: absolute;
    top: -0.4rem;
    right: -0.45rem;
    min-width: 1rem;
    height: 1rem;
    padding-inline: 0.2rem;
    border-radius: 999px;
    background: var(--color-logo, #FF6B6B);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1rem;
    text-align: center;
}

.gnb a:not(.is-text) .gnb-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (hover: hover) and (pointer: fine) {
    .gnb a.is-icon:hover,
    .gnb a.is-icon:focus-visible {
        text-decoration: none;
    }

    .gnb a.is-icon:hover .gnb-label,
    .gnb a.is-icon:focus-visible .gnb-label {
        top: calc(100% - 2px);
        right: 0;
        left: auto;
        z-index: 2;
        width: auto;
        height: auto;
        margin: 0;
        padding: 0.2rem 0.5rem;
        overflow: visible;
        clip: auto;
        border-radius: 4px;
        background: #2c3640;
        color: #fff;
        font-size: 0.8125rem;
        font-weight: 400;
        line-height: 1.4;
        text-decoration: none;
        pointer-events: none;
    }
}

.gnb a.is-text {
    margin-left: 0.25rem;
    padding-inline: 0.75rem;
    border: 0;
    color: #fff;
    text-decoration: none;
}

.gnb a.is-text::before {
    content: "";
    position: absolute;
    inset: 4px 0;
    border-radius: 4px;
    background: var(--color-logo, #FF6B6B);
}

.gnb a.is-text > * {
    position: relative;
    z-index: 1;
}

.gnb a.is-text:hover {
    text-decoration: none;
}

.gnb a.is-text:hover::before {
    background: #e85b5b;
}

@container (max-width: 19.5rem) {
    .logo {
        font-size: 0.9375rem;
    }

    .gnb a.is-text {
        padding-inline: 0.5rem;
    }
}

.gnb-account {
    position: relative;
}

.gnb-account-menu {
    display: none;
}

.gnb-profile img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.gnb-profile svg {
    width: 1.75rem;
    height: 1.75rem;
}

.gnb a[aria-current="page"] {
    font-weight: 700;
    text-decoration: underline;
}

.gnb a.is-text[aria-current="page"] {
    text-decoration: none;
}

.footer {
    margin-top: auto;
    background: #2c3640;
    color: #c5ccd3;
    font-size: 0.8125rem;
    line-height: 1.6;
    padding-block: var(--space-3) var(--space-4);
}

.footer a {
    color: inherit;
}

.footer a:focus-visible {
    outline-color: #ffffff;
}

.footer-inner {
    display: grid;
    gap: var(--space-2);
    min-width: 0;
}

.footer-brand,
.biz-lines,
.biz-line {
    min-width: 0;
    max-width: 100%;
}

.biz-lines {
    display: grid;
    gap: 0.35em;
}

.footer h2 {
    margin-bottom: 0.35em;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: var(--control-height);
    white-space: nowrap;
}

.footer-links a:not(:last-child)::after,
.biz-item:not(:last-child)::after {
    content: "|";
    margin-left: 0.45em;
    margin-right: 0.45em;
    color: rgba(197, 204, 211, 0.55);
    font-weight: 400;
}

.biz-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 0;
    row-gap: 0.35em;
    margin: 0;
}

.biz-item {
    white-space: nowrap;
}

.biz-item.is-long {
    flex: 1 1 100%;
    white-space: normal;
}

.biz-keep {
    white-space: nowrap;
}

.biz-check {
    display: inline-flex;
    align-items: center;
    padding: 0.12em 0.55em;
    border-radius: 4px;
    background: #6b7280;
    color: #ffffff;
    font-size: inherit;
    font-weight: 400;
    line-height: 1.4;
    white-space: nowrap;
}

.biz-check:hover {
    background: #5c6370;
    text-decoration: none;
}

.footer-jp {
    padding-top: var(--space-2);
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.footer-copy {
    margin: 0;
}

.simple {
    padding-block: var(--space-3) var(--space-4);
}

.simple h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.simple h2 {
    margin-top: var(--space-3);
    font-size: 1.125rem;
    font-weight: 700;
}

.simple p {
    margin-top: var(--space-2);
    color: var(--color-muted);
}

.simple ul {
    margin-top: var(--space-1);
    padding-left: 1.25rem;
    color: var(--color-text);
    list-style: disc;
}

.simple li + li {
    margin-top: 0.5rem;
}

html.is-account-drawer-open,
html.is-account-drawer-open body {
    overflow: hidden;
}

.account-drawer[hidden] {
    display: none !important;
}

.account-drawer {
    position: fixed;
    inset: 0;
    z-index: 300;
    visibility: hidden;
}

.account-drawer.is-shown {
    visibility: visible;
}

.account-drawer-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    background: rgba(54, 53, 53, 0.35);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.28s ease;
}

.account-drawer.is-open .account-drawer-backdrop {
    opacity: 1;
}

.account-drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    width: min(20rem, calc(100% - 3rem));
    padding: var(--space-2);
    background: var(--color-bg);
    box-shadow: -8px 0 24px rgba(54, 53, 53, 0.12);
    transform: translate3d(100%, 0, 0);
    transition: transform 0.28s ease;
    overflow: auto;
}

.account-drawer.is-open .account-drawer-panel {
    transform: translate3d(0, 0, 0);
}

.account-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
    margin: calc(var(--space-2) * -1) calc(var(--space-2) * -1) var(--space-2);
    padding-inline: var(--space-2);
    background: var(--color-surface);
    color: var(--color-text);
    font-weight: 700;
}

#account-drawer-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    margin: 0;
}

.account-drawer-avatar {
    display: inline-flex;
    flex: none;
}

.account-drawer-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.account-drawer-avatar svg {
    width: 1.75rem;
    height: 1.75rem;
}

.account-drawer-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--control-height);
    height: var(--control-height);
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.account-drawer-close svg {
    width: var(--icon-size);
    height: var(--icon-size);
}

.account-menu + .account-menu,
.account-logout {
    margin-top: var(--space-2);
    padding-top: var(--space-2);
    border-top: 1px solid var(--color-line);
}

.account-menu a,
.account-logout button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    min-height: var(--control-height);
    padding-inline: var(--space-1);
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: 1.5;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.account-menu svg,
.account-logout svg {
    width: var(--icon-size);
    height: var(--icon-size);
    flex: none;
}

.account-menu a[aria-current="page"] {
    font-weight: 700;
}

.account-menu a:hover,
.account-logout button:hover {
    text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
    .account-drawer-panel,
    .account-drawer-backdrop {
        transition: none;
    }
}

@keyframes account-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

body[data-page-gate="public"] #main,
body[data-page-ready="true"] #main {
    animation: account-fade-in 0.3s ease-out;
}

@media (prefers-reduced-motion: reduce) {
    body[data-page-gate="public"] #main,
    body[data-page-ready="true"] #main {
        animation: none;
    }
}

.bottom-nav {
    position: fixed;
    z-index: 35;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid rgb(231 229 229 / 0.9);
    background: rgb(255 255 255 / 0.72);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}

.bottom-nav a {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    min-height: 3.5rem;
    padding: 0.35rem 0.25rem;
    color: var(--color-muted);
    font-size: 0.75rem;
    line-height: 1.2;
    text-decoration: none;
}

.bottom-nav a[aria-current="page"] {
    color: var(--color-logo, #ff6b6b);
    font-weight: 700;
}

.bottom-nav-icon {
    position: relative;
    display: inline-flex;
}

.bottom-nav svg {
    width: var(--icon-size);
    height: var(--icon-size);
}

.bottom-nav-label {
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.bottom-nav-badge {
    position: absolute;
    top: -0.35rem;
    right: -0.55rem;
    min-width: 1rem;
    height: 1rem;
    padding-inline: 0.2rem;
    border-radius: 999px;
    background: var(--color-logo, #ff6b6b);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1rem;
    text-align: center;
}

body {
    padding-bottom: calc(3.5rem + env(safe-area-inset-bottom));
}

@media (prefers-reduced-transparency: reduce) {
    .bottom-nav {
        background: #fff;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
}

@media (min-width: 768px) {
    .bottom-nav {
        display: none;
    }

    body {
        padding-bottom: 0;
    }

    .gnb a:not(.gnb-profile):not(.is-icon) svg {
        display: none;
    }

    .gnb a:not(.is-text):not(.is-icon) .gnb-label {
        position: static;
        width: auto;
        height: auto;
        margin: 0;
        overflow: visible;
        clip: auto;
    }

    .account-drawer {
        display: none;
    }

    .gnb-account-menu {
        display: block;
        position: absolute;
        top: 100%;
        right: 0;
        z-index: 2;
        min-width: 9.25rem;
        padding-top: 6px;
        visibility: hidden;
    }

    .gnb-account:hover .gnb-account-menu,
    .gnb-account:focus-within .gnb-account-menu {
        visibility: visible;
    }

    .gnb-account-panel {
        position: relative;
        z-index: 2;
        border: 1px solid var(--color-line);
        border-radius: 8px;
        background: #fff;
        box-shadow: 0 4px 14px rgba(54, 53, 53, 0.08);
        overflow: hidden;
    }

    .gnb-account-menu a,
    .gnb-account-menu button {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        min-width: 9.25rem;
        min-height: 2.5rem;
        margin: 0;
        padding: 0.35rem 1rem;
        border: 0;
        border-radius: 0;
        background: #fff;
        color: var(--color-text);
        font: inherit;
        font-weight: 400;
        line-height: 1.4;
        text-align: left;
        text-decoration: none;
        white-space: nowrap;
        cursor: pointer;
    }

    .gnb-account-menu a {
        border-bottom: 1px solid var(--color-line);
    }

    .gnb-account-menu a:hover,
    .gnb-account-menu button:hover,
    .gnb-account-menu a:focus-visible,
    .gnb-account-menu button:focus-visible {
        background: var(--color-surface);
        text-decoration: none;
    }
}

@media (min-width: 1024px) {
    .biz-lines {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        column-gap: 0;
        row-gap: 0.35em;
    }

    .biz-lines .biz-line {
        display: contents;
    }

    .biz-lines .biz-line:not(:last-child) > .biz-item:last-child::after {
        content: "|";
        margin-left: 0.45em;
        margin-right: 0.45em;
        color: rgba(197, 204, 211, 0.55);
        font-weight: 400;
    }

    .biz-item.is-long {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .simple {
        padding-block: var(--space-4);
    }

    .simple h1 {
        font-size: 2rem;
    }
}
