:root {
    color-scheme: light;
    --font-sans: Inter, -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
    --weight-heading: 600;
    --weight-emphasis: 500;
    --tracking-emphasis: 2px;
    --ink: #29222b;
    --muted: #635a65;
    --accent: #833451;
    --wash: #fbe9ef;
    --rule: #dacfd5;
    --edge: #85767c;
    --glass-fallback: #fcf9fb;
    --glass-surface: var(--glass-fallback);
    --glass-strong: #fff;
    --glass-border: #e0d4dc;
    --glass-shadow: inset 0 1px 0 #fff, 0 12px 40px -26px rgb(67 30 52 / 38%);
    --glass-filter: none;
    --header-surface: #faf6f9;
    --footer-surface: #322631;
    --shell-gutter: clamp(1rem, 4.3vw, 4rem);
    color: var(--ink);
    font: 100%/1.65 var(--font-sans);
    background: #f6f3f6;
    scroll-padding-top: 5.25rem;
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    :root {
        --glass-surface: rgb(255 255 255 / 58%);
        --glass-strong: rgb(255 255 255 / 84%);
        --glass-border: rgb(255 255 255 / 89%);
        --glass-filter: blur(18px) saturate(125%);
        --header-surface: rgb(255 253 254 / 76%);
        --footer-surface: rgb(46 31 46 / 89%);
    }
}
*, *::before, *::after { box-sizing: border-box; }
body {
    margin: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; overflow-wrap: anywhere;
    background-color: #f6f3f6;
    background-image:
        radial-gradient(ellipse at 100% 6%, rgb(226 204 230 / 68%), transparent 46%),
        radial-gradient(ellipse at 0% 87%, rgb(246 215 224 / 85%), transparent 46%),
        linear-gradient(114deg, #f7f5f6 8%, #f8f3f5 53%, #f0e6ee);
}
body:has(.login-workspace) {
    background-image:
        linear-gradient(121deg, transparent 9%, rgb(255 255 255 / 46%) 9.2%, transparent 29%),
        linear-gradient(148deg, transparent 55%, rgb(255 255 255 / 38%) 55.2%, transparent 72%),
        radial-gradient(ellipse at 99% 6%, #deccdf 0%, transparent 48%),
        radial-gradient(ellipse at 2% 86%, #f1cedc, transparent 48%),
        linear-gradient(122deg, #f8f5f5 5%, #f6eef2 50%, #efe5ef);
}
a { color: var(--accent); text-underline-offset: .23em; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, p { margin: 0 0 .75em; }
h1, h2, h3, legend, strong, b, th, .brand-name, .foot-brand {
    font-weight: var(--weight-heading); letter-spacing: var(--tracking-emphasis);
}
h1 { font-size: clamp(1.9rem, 3.4vw, 3.05rem); line-height: 1.3; }
h2 { font-size: 1.3rem; line-height: 1.5; }
button, input, textarea, select { font: inherit; }
button, .button, .survey-primary, .head-nav a, .head-nav summary, .workspace-label, .context, .form-sheet > label {
    font-weight: var(--weight-emphasis); letter-spacing: var(--tracking-emphasis);
}
input, textarea, select { font-weight: 400; letter-spacing: normal; }
input:not([type=checkbox],[type=radio],[type=hidden],[type=file]), textarea, select {
    max-width: 100%; padding: .65rem .8rem; color: var(--ink); background: #fff; border: 1px solid var(--edge); border-radius: 8px;
}
textarea { width: 100%; resize: vertical; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 1.1rem; height: 1.1rem; }
button, .button, .survey-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 44px; padding: .62rem 1.2rem;
    color: #fff; background-color: var(--accent);
    background-image: linear-gradient(to bottom, rgb(255 255 255 / 7%), transparent 75%);
    border: 1px solid #742c47; border-radius: 10px; box-shadow: inset 0 1px rgb(255 255 255 / 16%), 0 2px 4px rgb(75 32 51 / 12%);
    cursor: pointer; text-align: center; text-decoration: none;
}
button:enabled:hover, .button:hover, .survey-primary:hover { background-color: #742c47; }
button:enabled:active, .button:active, .survey-primary:active { background-color: #61213b; }
button:disabled { cursor: not-allowed; opacity: .55; box-shadow: none; }
.secondary, .text-button { color: var(--accent); background: var(--glass-strong); border-color: #cebac5; box-shadow: inset 0 1px #fff; }
:is(.secondary, .text-button):is(a, :enabled):is(:hover, :active) { color: var(--accent); background: var(--wash); }
.text-button { background: transparent; border-color: transparent; box-shadow: none; }
@media (prefers-reduced-motion: no-preference) {
    :where(button:enabled, .button, .survey-primary, .nav-action, .top-link, .account-menu summary), input::file-selector-button {
        transition: transform 140ms ease-out, background-color 140ms ease-out, border-color 140ms ease-out;
    }
    @media (hover: hover) and (pointer: fine) {
        :where(button:enabled, .button, .survey-primary, .nav-action, .top-link, .account-menu summary):hover,
        input:enabled::file-selector-button:hover { transform: translateY(-1px); }
    }
    :where(button:enabled, .button, .survey-primary, .nav-action, .top-link, .account-menu summary):active,
    input:enabled::file-selector-button:active { transform: translateY(1px); transition-duration: 70ms; }
}
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
fieldset { min-width: 0; margin: 1.3rem 0; padding: 1rem; border: 1px solid var(--rule); border-radius: 10px; }
legend { padding: 0 .35rem; }
label, select, summary { cursor: pointer; }
.skip { position: fixed; top: .35rem; left: 1rem; z-index: 30; transform: translateY(-160%); background: #fff; padding: .55rem 1rem; border-radius: 7px; }
.skip:focus { transform: none; }
.shell-inner { max-width: 1380px; margin-inline: auto; padding-inline: var(--shell-gutter); }
.site-head {
    position: sticky; inset-block-start: 0; z-index: 10; border-bottom: 1px solid rgb(113 78 100 / 16%);
}
.site-head::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: var(--header-surface);
    -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter); box-shadow: inset 0 -1px rgb(255 255 255 / 63%);
}
.head-inner, .site-id, .wordmark, .head-nav, .foot-inner, .foot-tools { display: flex; align-items: center; }
.head-inner, .foot-inner { justify-content: space-between; gap: 1rem; }
.head-inner { min-height: 74px; padding-block: .6rem; }
.site-id { min-width: 0; gap: 1.15rem; }
.wordmark { min-height: 44px; gap: .65rem; color: var(--ink); text-decoration: none; flex: none; }
.brand-glyph { flex: none; width: 36px; height: 36px; background: url('/images/kadaidoko-mark.png') no-repeat center / contain; }
.brand-name { font-size: 1.32rem; line-height: 1; }
.workspace-label { padding-inline-start: 1.1rem; border-inline-start: 1px solid #d4c6d0; color: var(--muted); font-size: .78rem; white-space: nowrap; }
.head-nav { gap: .55rem; }
.head-nav a, .head-nav button, .head-nav summary { font-size: .86rem; line-height: 1.35; }
.nav-link, .account-menu summary, .nav-action {
    display: inline-flex; align-items: center; justify-content: center; gap: .48rem; min-height: 44px; white-space: nowrap;
    padding: .5rem .75rem; border: 1px solid transparent; border-radius: 9px; color: var(--muted); background: transparent; box-shadow: none; text-decoration: none; cursor: pointer;
}
.head-nav .nav-link:hover, .head-nav .nav-link:active, .account-menu summary:hover, .account-menu[open] summary { color: var(--accent); background: #f7e9ef; }
.nav-link[aria-current] { color: #732b48; background: #f8e7ee; }
.nav-action { border-color: #d3c1cb; background: var(--glass-strong); color: #4d3041; padding-inline: .9rem; box-shadow: inset 0 1px #fff; }
.nav-action:hover { background: #fff; border-color: var(--edge); }
.help-icon { width: 1.05rem; height: 1.05rem; display: inline-grid; place-items: center; border: 1.5px solid currentColor; border-radius: 50%; font-size: .72rem; line-height: 1; letter-spacing: normal; }
.chevron { width: .4rem; height: .4rem; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-1px) rotate(45deg); }
[open] > summary .chevron { transform: translateY(1px) rotate(225deg); }
.right-arrow, .up-arrow { position: relative; display: inline-block; width: .85rem; height: 1.5px; background: currentColor; }
.right-arrow::after, .up-arrow::after { content: ""; position: absolute; right: 0; top: 50%; width: .4rem; height: .4rem; border: solid currentColor; border-width: 1.5px 1.5px 0 0; transform: translateY(-50%) rotate(45deg); }
.up-arrow { transform: rotate(-90deg); }
.account-menu { position: relative; }
.account-menu summary { list-style: none; }
.account-menu summary::-webkit-details-marker { display: none; }
.menu-panel {
    position: absolute; z-index: 2; right: 0; top: calc(100% + .35rem); display: grid; width: max-content; min-width: 12rem;
    background: var(--glass-strong); border: 1px solid var(--glass-border); box-shadow: 0 8px 26px rgb(48 28 43 / 18%); border-radius: 12px; padding: .4rem;
    -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter);
}
.menu-panel a { display: flex; align-items: center; min-height: 44px; padding: .55rem .75rem; color: var(--ink); text-decoration: none; border-radius: 7px; }
.menu-panel a:hover, .menu-panel a:focus-visible { background: var(--wash); color: var(--accent); }
.exit-form { border-inline-start: 1px solid var(--rule); padding-left: .55rem; }
.workspace, .login-workspace { width: min(calc(100% - var(--shell-gutter) * 2), 1180px); margin-inline: auto; flex: 1 0 auto; min-width: 0; }
.workspace { padding-block: clamp(2.25rem, 5vw, 5rem); }
.login-workspace { display: flex; flex-direction: column; justify-content: center; padding-block: clamp(1.5rem, 5.5vh, 4rem); }
.wide { width: 100%; flex: 1; }
#content:focus, #page-top:focus { outline: none; }
.context, .crumb, .muted, small { color: var(--muted); }
.context { font-size: .91rem; margin-bottom: .5rem; }
.crumb { margin-bottom: 1.5rem; font-size: .94rem; }
.subactions, .filter, .section-head, .heading, .row-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .8rem 1.2rem; }
.heading, .section-head, .document, .project-row { justify-content: space-between; }
.heading { align-items: end; border-bottom: 1px solid var(--rule); padding-bottom: 1.4rem; }
.heading h1,.section-head h2,.document p,.project-row h2,.project-row p { margin-bottom: 0; }
.section-head { border-bottom: 1px solid var(--rule); padding-bottom: .7rem; }
.section-head h2 { border-left: 3px solid var(--accent); padding-left: .65rem; }
.list, .form-sheet, .document-section {
    border: 1px solid var(--glass-border); border-radius: 18px; background: var(--glass-surface); box-shadow: var(--glass-shadow);
    -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter);
}
.list, .document-section { padding-inline: clamp(.9rem, 2.5vw, 2rem); }
.document, .project-row { display: flex; align-items: center; gap: 1.2rem; padding: 1.25rem .15rem; border-bottom: 1px solid var(--rule); }
.document:last-child, .project-row:last-child { border-bottom: 0; }
.document { text-decoration: none; }
a.document:hover { color: #5f1d3a; }
.document strong, .document small { display: block; }
.project-row h2 a { color: var(--ink); text-decoration-color: #cfb4c1; }
.project-row h2 a:hover { text-decoration-color: var(--accent); }
.row-meta { gap: .4rem; }
.state { display: inline-block; border: 1px solid #ddc9d3; color: #643349; background: #fbf1f5; border-radius: 6px; font-size: .8rem; padding: .16rem .55rem; white-space: nowrap; }
.document-section { margin-top: 1.7rem; padding-block: 1.15rem .3rem; }
.filter, .subactions { margin: 1.3rem 0; }
.form-sheet { max-width: 46rem; padding: clamp(1rem, 3vw, 2rem); }
.form-sheet > label, .form-sheet > select, .form-sheet > input { display: block; }
.form-sheet > label { margin: 1.2rem 0 .4rem; }
.form-sheet > input, .form-sheet > select { width: 100%; }
.option { display: flex; align-items: center; gap: .5rem; padding: .5em; }
.option:has(:checked) { background: var(--wash); }
.staff-option { gap: .75rem; min-height: 44px; padding: .65rem .75rem; border-bottom: 1px solid var(--rule); }
.staff-option:last-child { border-bottom: 0; }
.staff-option input { flex: none; }
.staff-option small { display: block; }
.empty { color: var(--muted); padding: 1.5rem .25rem; }
.notice, .errors { border-left: 4px solid var(--accent); padding: .75rem 1rem; background: var(--wash); margin: 1rem 0; }
.errors ul { margin: .5rem 0 0; }
.site-foot {
    margin-top: auto; background: var(--footer-surface); color: #fff3fb; border-top: 1px solid rgb(255 255 255 / 60%);
    -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter);
}
.foot-inner { min-height: 78px; padding-block: 1rem; }
.foot-brand { font-size: 1.2rem; line-height: 1; }
.foot-tools { gap: 1rem; }
.foot-docs { display: flex; align-items: center; gap: 1.1rem; padding-right: 1.1rem; border-right: 1px solid #776272; }
.foot-docs a, .foot-operator { display: inline-flex; align-items: center; min-height: 44px; color: #fff3fb; text-decoration: none; }
.foot-docs a { font-size: .83rem; }
.foot-operator { flex-direction: column; align-items: flex-start; justify-content: center; line-height: 1.45; white-space: nowrap; }
.foot-operator span { font-size: .69rem; color: #e7d5e2; }
.foot-operator strong { font-size: .93rem; }
.foot-docs a:is(:hover,[aria-current]), .foot-operator:hover strong { text-decoration: underline; }
.site-foot a:focus-visible { outline-color: #ffc6dc; }
.top-link { width: 44px; height: 44px; display: grid; place-items: center; color: #fff; border: 1px solid #9d8999; border-radius: 50%; text-decoration: none; }
.top-link:hover { background: #5c485a; }
.policy-sheet { width: min(100%, 49rem); margin: 0 auto; padding: clamp(1.2rem, 5vw, 3.6rem); line-height: 1.85; }
.policy-sheet header { padding-bottom: 1.4rem; border-bottom: 1px solid var(--rule); }
.policy-sheet h1 { margin: 0; }
.policy-sheet h2 { margin: 1.75rem 0 .5rem; }
.policy-sheet ul { padding-inline-start: 1.35rem; margin: .65rem 0; }
.policy-sheet li + li { margin-top: .45rem; }
.policy-contact { border-top: 1px solid var(--rule); margin-top: 2rem; }
@media (max-width: 720px) {
    .head-inner { min-height: 66px; }
    .workspace-label { display: none; }
    .head-nav { gap: .2rem; }
    .project-row { align-items: flex-start; flex-direction: column; gap: .55rem; }
    .document { flex-wrap: wrap; gap: .5rem; }
    .foot-inner:has(.foot-docs) { flex-wrap: wrap; }
    .foot-inner:has(.foot-docs) .foot-tools { flex-wrap: wrap; }
}
@media (max-width: 530px) {
    :root { scroll-padding-top: 1rem; }
    .site-head { position: relative; }
    .head-inner { flex-wrap: wrap; gap: .15rem .75rem; padding-block: .45rem; }
    .head-inner:has(.exit-form) .head-nav { width: 100%; }
    .head-inner:has(.exit-form) .exit-form { margin-left: auto; }
    .head-nav .nav-link, .account-menu summary { padding-inline: .4rem; }
    .menu-panel { left: 0; right: auto; }
    .brand-glyph { width: 31px; height: 31px; }
    .brand-name { font-size: 1.12rem; }
    .wordmark { gap: .42rem; }
    .nav-action { padding-inline: .6rem; }
    .foot-inner { min-height: 72px; gap: .5rem; }
    .foot-tools { gap: .65rem; }
    .foot-inner:has(.foot-docs) { flex-wrap: wrap; }
    .foot-inner:has(.foot-docs) .foot-tools { flex: 1 1 100%; flex-wrap: wrap; justify-content: space-between; }
    .foot-docs { width: 100%; border: 0; border-bottom: 1px solid #776272; padding: 0; }
    .subactions { align-items: flex-start; }
}
@media (max-width: 380px) {
    .head-inner:has(.exit-form) .head-nav { flex-wrap: wrap; }
    .head-nav .nav-link, .account-menu summary { padding-inline: .15rem; }
}
@media (prefers-reduced-transparency: reduce), (forced-colors: active) {
    :root {
        --glass-surface: var(--glass-fallback); --glass-strong: #fff; --glass-filter: none; --glass-border: #cfbfca;
        --glass-shadow: none; --header-surface: #fcf9fb; --footer-surface: #322631;
    }
    body, body:has(.login-workspace) { background-image: none; }
}
[hidden] { display: none !important; }
