/* =========================================================
   AIT通常画面 共通スタイル
   ========================================================= */

:root {
    --ait-color-background: #f5f6f8;
    --ait-color-surface: #ffffff;
    --ait-color-sidebar: #1f2937;
    --ait-color-sidebar-text: #f9fafb;
    --ait-color-sidebar-muted: #cbd5e1;
    --ait-color-text: #1d1d1f;
    --ait-color-muted: #667085;
    --ait-color-primary: #2563eb;
    --ait-color-primary-hover: #1d4ed8;
    --ait-color-border: #e5e7eb;
    --ait-color-focus: #0a84ff;
    --ait-color-overlay: rgba(15, 23, 42, 0.48);
    --ait-header-height: 64px;
    --ait-sidebar-width: 272px;
    --ait-drawer-width: min(84vw, 320px);
    --ait-main-padding: 32px;
    --ait-radius-small: 8px;
    --ait-radius-medium: 14px;
    --ait-shadow-small: 0 4px 18px rgba(15, 23, 42, 0.08);
    --ait-shadow-drawer: 12px 0 32px rgba(15, 23, 42, 0.2);
    --ait-transition-duration: 180ms;
}

/* Transcript Result / Revision */
.ait-transcript-text {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--ait-radius-medium);
    background: var(--ait-color-background);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.ait-transcript-editor {
    min-height: 24rem;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.ait-transcript-editor[readonly] {
    background: var(--ait-color-background);
    cursor: default;
}

.ait-revision-table td,
.ait-revision-table th {
    overflow-wrap: anywhere;
}

/* 利用者向け長文表示 */
.ait-long-text {
    --ait-long-text-fade-color: 255, 255, 255;
    position: relative;
    min-width: 0;
    margin-bottom: 22px;
}

.ait-long-text__content {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.ait-long-text--collapsed .ait-long-text__content {
    max-height: var(--ait-long-text-collapsed-height);
    overflow-x: hidden;
    overflow-y: auto;
}

.ait-long-text--muted-surface,
.ait-project-detail-header .ait-long-text {
    --ait-long-text-fade-color: 245, 246, 248;
}

.ait-long-text--expandable.ait-long-text--collapsed::after {
    position: absolute;
    right: 0;
    bottom: calc(var(--ait-long-text-toggle-height, 29px) + 8px);
    left: 0;
    height: 20px;
    background: linear-gradient(
        to bottom,
        rgba(var(--ait-long-text-fade-color), 0),
        rgba(var(--ait-long-text-fade-color), 0.76)
    );
    content: "";
    pointer-events: none;
}

.ait-button.ait-long-text__toggle {
    width: fit-content;
    min-height: 0;
    margin: 8px auto 0;
    padding: 4px 8px;
    color: var(--ait-color-primary);
    background: transparent;
    border: 0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}

.ait-button.ait-long-text__toggle:hover {
    color: var(--ait-color-primary-hover);
    background: rgba(37, 99, 235, 0.08);
}

.ait-button.ait-long-text__toggle:focus-visible {
    background: rgba(37, 99, 235, 0.1);
}

.ait-long-text__toggle[hidden] {
    display: none;
}

.ait-card > .ait-long-text:last-child,
.ait-project-detail-header .ait-long-text {
    margin-bottom: 0;
}

.ait-table .ait-long-text,
.ait-invitation-details .ait-long-text {
    margin-bottom: 6px;
}

@media print {
    .ait-long-text {
        margin-bottom: 0;
    }

    .ait-long-text::after {
        display: none !important;
    }

    .ait-long-text__content {
        max-height: none !important;
        overflow: visible !important;
    }

    .ait-long-text__toggle {
        display: none !important;
    }
}

/* 基礎設定 */
html {
    color-scheme: light;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
}

.ait-body,
.ait-body *,
.ait-body *::before,
.ait-body *::after {
    box-sizing: border-box;
}

.ait-body {
    min-height: 100vh;
    margin: 0;
    color: var(--ait-color-text);
    background: var(--ait-color-background);
    font-size: 16px;
}

.ait-body button,
.ait-body input,
.ait-body select,
.ait-body textarea {
    font: inherit;
}

.ait-body img,
.ait-body svg {
    max-width: 100%;
}

.ait-skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 1200;
    padding: 10px 14px;
    color: #ffffff;
    background: var(--ait-color-primary);
    border-radius: var(--ait-radius-small);
    transform: translateY(-160%);
}

.ait-skip-link:focus {
    transform: translateY(0);
}

/* 共通上部ヘッダ */
.ait-topbar {
    position: sticky;
    top: 0;
    z-index: 900;
    height: var(--ait-header-height);
    min-height: var(--ait-header-height);
    color: var(--ait-color-text);
    background: var(--ait-color-surface);
    border-bottom: 1px solid var(--ait-color-border);
}

.ait-topbar-inner {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 24px;
    gap: 16px;
}

.ait-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    min-height: 44px;
    padding: 0;
    color: var(--ait-color-text);
    background: transparent;
    border: 0;
    border-radius: var(--ait-radius-small);
    cursor: pointer;
}

.ait-menu-toggle-icon,
.ait-menu-toggle-icon::before,
.ait-menu-toggle-icon::after {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
}

.ait-menu-toggle-icon {
    position: relative;
}

.ait-menu-toggle-icon::before,
.ait-menu-toggle-icon::after {
    position: absolute;
    left: 0;
    content: "";
}

.ait-menu-toggle-icon::before {
    top: -7px;
}

.ait-menu-toggle-icon::after {
    top: 7px;
}

/* ブランド */
.ait-brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    gap: 10px;
}

.ait-brand-link {
    min-height: 44px;
    color: inherit;
    text-decoration: none;
}

.ait-brand-logo {
    display: block;
    flex: 0 0 auto;
    width: 84px;
    max-width: none;
    height: auto;
    object-fit: contain;
}

.ait-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.2;
    white-space: nowrap;
}

.ait-brand-name {
    font-size: 18px;
    font-weight: 700;
}

.ait-brand-service-name {
    color: var(--ait-color-muted);
    font-size: 12px;
    font-weight: 600;
}

/* ユーザ操作 */
.ait-user-actions {
    display: flex;
    align-items: center;
    min-width: 0;
    margin-left: auto;
    gap: 12px;
}

.ait-user-name {
    max-width: 280px;
    overflow: hidden;
    color: var(--ait-color-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ait-logout-form {
    margin: 0;
}

.ait-logout-button {
    min-height: 44px;
    padding: 0 16px;
    color: var(--ait-color-text);
    background: var(--ait-color-surface);
    border: 1px solid var(--ait-color-border);
    border-radius: var(--ait-radius-small);
    cursor: pointer;
    white-space: nowrap;
}

.ait-logout-button:hover {
    background: #f8fafc;
}

/* レイアウト */
.ait-layout {
    display: grid;
    grid-template-columns: var(--ait-sidebar-width) minmax(0, 1fr);
    grid-template-areas:
        "sidebar main"
        "sidebar footer";
    min-height: calc(100vh - var(--ait-header-height));
}

/* サイドバー */
.ait-sidebar {
    grid-area: sidebar;
    min-width: 0;
    padding: 24px 16px;
    color: var(--ait-color-sidebar-text);
    background: var(--ait-color-sidebar);
}

.ait-nav-group + .ait-nav-group {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.ait-nav-heading {
    margin: 0 10px 10px;
    color: var(--ait-color-sidebar-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ait-current-project-name {
    margin: 0 10px 12px;
    overflow-wrap: anywhere;
    font-size: 15px;
    font-weight: 700;
}

.ait-nav-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ait-nav-item + .ait-nav-item {
    margin-top: 4px;
}

.ait-nav-link,
.ait-nav-placeholder {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 44px;
    padding: 9px 10px;
    gap: 10px;
    color: var(--ait-color-sidebar-text);
    border-radius: var(--ait-radius-small);
    overflow-wrap: anywhere;
    text-decoration: none;
}

.ait-nav-link:hover,
.ait-nav-link[aria-current="page"] {
    background: rgba(255, 255, 255, 0.12);
}

.ait-nav-placeholder {
    color: var(--ait-color-sidebar-muted);
}

.ait-nav-status {
    flex: 0 0 auto;
    padding: 2px 7px;
    color: var(--ait-color-sidebar-muted);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

/* メインコンテンツ */
.ait-main {
    grid-area: main;
    min-width: 0;
    width: 100%;
    padding: var(--ait-main-padding);
}

.ait-page-header {
    margin-bottom: 24px;
}

.ait-page-title {
    margin: 0;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.ait-page-description {
    max-width: 72ch;
    margin: 10px 0 0;
    color: var(--ait-color-muted);
}

/* カード */
.ait-card {
    padding: 24px;
    background: var(--ait-color-surface);
    border-radius: var(--ait-radius-medium);
    box-shadow: var(--ait-shadow-small);
}

.ait-card + .ait-card {
    margin-top: 20px;
}

.ait-card-header,
.ait-card-body,
.ait-card-footer {
    min-width: 0;
}

.ait-card-header {
    margin-bottom: 18px;
}

.ait-card-footer {
    margin-top: 18px;
}

/* フォーム */
.ait-form {
    display: grid;
    gap: 20px;
}

.ait-form-row {
    display: grid;
    gap: 8px;
}

.ait-form-label {
    font-weight: 600;
}

.ait-form-control {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    color: var(--ait-color-text);
    background: var(--ait-color-surface);
    border: 1px solid #cbd5e1;
    border-radius: var(--ait-radius-small);
}

.ait-form-textarea {
    min-height: 120px;
    resize: vertical;
}

.ait-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.ait-field-error {
    color: #b42318;
}

.ait-audio-upload-input {
    min-width: 0;
    max-width: 100%;
}

.ait-audio-upload-guidance {
    margin: 0 0 20px;
    padding-left: 1.5rem;
}

.ait-audio-upload-guidance li + li {
    margin-top: 6px;
}

/* ボタン */
.ait-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: var(--ait-radius-small);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.ait-button-primary {
    color: #ffffff;
    background: var(--ait-color-primary);
}

.ait-button-primary:hover {
    background: var(--ait-color-primary-hover);
}

.ait-button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.ait-button-secondary {
    color: var(--ait-color-text);
    background: var(--ait-color-surface);
    border-color: var(--ait-color-border);
}

.ait-button-danger {
    color: #ffffff;
    background: #b42318;
}

/* 一覧・テーブル */
.ait-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
}

.ait-responsive-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
}

.ait-table {
    width: 100%;
    border-collapse: collapse;
}

.ait-table th,
.ait-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--ait-color-border);
}

.ait-responsive-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ait-page-header-actions {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.ait-project-list {
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
}

.ait-project-card {
    display: flex;
    flex-direction: column;
    margin-top: 0;
}

.ait-project-card .ait-card-body {
    flex: 1;
}

.ait-project-card-title {
    margin: 0;
    font-size: 20px;
}

.ait-project-description {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.ait-project-description-empty {
    color: var(--ait-color-muted);
}

/* Project詳細 */
.ait-detail-back {
    margin-bottom: 20px;
}

.ait-project-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.ait-project-detail-eyebrow {
    margin: 0 0 8px;
    color: var(--ait-color-muted);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.ait-project-detail-description {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.ait-role-badge,
.ait-feature-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.ait-role-badge {
    margin: 0;
    color: #1d4ed8;
    background: #dbeafe;
}

.ait-project-detail-section + .ait-project-detail-section {
    margin-top: 32px;
}

.ait-section-heading {
    margin-bottom: 16px;
}

.ait-section-heading h2,
.ait-section-heading p,
.ait-function-card h3,
.ait-function-card p {
    margin: 0;
}

.ait-section-heading h2 {
    font-size: 22px;
}

.ait-section-heading p,
.ait-function-card p {
    margin-top: 8px;
    color: var(--ait-color-muted);
}

.ait-function-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.ait-management-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ait-function-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-top: 0;
}

.ait-function-card p {
    flex: 1;
    overflow-wrap: anywhere;
}

.ait-feature-status {
    color: var(--ait-color-muted);
    background: #eef2f7;
}

.ait-management-card {
    border-top: 3px solid #93c5fd;
}

.ait-empty-state {
    text-align: center;
}

.ait-notice {
    margin: 0 0 20px;
    padding: 14px 16px;
    border-radius: var(--ait-radius-small);
}

.ait-notice-success {
    color: #166534;
    background: #dcfce7;
}

.ait-notice-error {
    color: #991b1b;
    background: #fee2e2;
}

.ait-notice-warning {
    color: #7a2e0e;
    background: #fff7ed;
}

.ait-notice-warning p {
    margin: 0;
}

.ait-notice-warning p + p {
    margin-top: 8px;
}

.ait-member-operation-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* AIT通常一覧・ページャー */
.ait-list-form {
    display: grid;
    gap: 20px;
}

.ait-search-panel {
    display: grid;
    gap: 18px;
}

.ait-search-panel .ait-card-header {
    margin-bottom: 0;
}

.ait-search-panel .ait-card-header h2 {
    margin: 0;
    font-size: 20px;
}

.ait-search-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.ait-list-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 18px;
}

.ait-list-controls-bottom {
    flex-direction: row-reverse;
}

.ait-list-count {
    margin: 0;
    color: var(--ait-color-muted);
    font-variant-numeric: tabular-nums;
}

.ait-list-count-total {
    font-weight: 600;
}

.ait-list-pagination-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ait-page-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 8px 12px;
    color: var(--ait-color-text);
    background: var(--ait-color-surface);
    border: 1px solid var(--ait-color-border);
    border-radius: var(--ait-radius-small);
    font-weight: 600;
}

button.ait-page-button {
    cursor: pointer;
}

button.ait-page-button:hover {
    color: #ffffff;
    background: var(--ait-color-primary);
    border-color: var(--ait-color-primary);
}

.ait-page-button-current {
    color: #ffffff;
    background: var(--ait-color-primary);
    border-color: var(--ait-color-primary);
}

.ait-project-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    background: var(--ait-color-surface);
    border-radius: var(--ait-radius-medium);
    box-shadow: var(--ait-shadow-small);
}

.ait-project-table {
    table-layout: fixed;
}

.ait-project-table th:first-child {
    width: 28%;
}

.ait-project-table th:last-child {
    width: 190px;
}

.ait-project-table td,
.ait-project-table th {
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

/* Project内Audio一覧 */
.ait-audio-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    background: var(--ait-color-surface);
    border-radius: var(--ait-radius-medium);
    box-shadow: var(--ait-shadow-small);
}

.ait-audio-table {
    table-layout: fixed;
}

.ait-audio-table th:first-child {
    width: 28%;
}

.ait-audio-table th:last-child {
    width: 112px;
}

.ait-audio-table td,
.ait-audio-table th {
    overflow-wrap: anywhere;
}

/* 文字起こしJob進捗 */
.ait-job-progress {
    display: grid;
    min-width: 0;
    gap: 8px;
    margin-top: 20px;
    padding: 16px;
    background: var(--ait-color-background);
    border: 1px solid var(--ait-color-border);
    border-radius: var(--ait-radius-medium);
}

.ait-job-progress p {
    margin: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.ait-job-progress-status {
    font-weight: 700;
}

.ait-job-progress-position {
    font-variant-numeric: tabular-nums;
}

.ait-job-progress-updating {
    color: var(--ait-color-muted);
    font-size: 14px;
}

/* Project Member管理一覧 */
.ait-member-search-fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ait-member-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    background: var(--ait-color-surface);
    border-radius: var(--ait-radius-medium);
    box-shadow: var(--ait-shadow-small);
}

.ait-member-table {
    table-layout: fixed;
}

.ait-member-table th:first-child {
    width: 24%;
}

.ait-member-table th:last-child {
    width: 112px;
}

.ait-member-table td,
.ait-member-table th {
    overflow-wrap: anywhere;
}

.ait-member-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.ait-member-role {
    color: #1d4ed8;
    background: #dbeafe;
}

.ait-member-status-active {
    color: #166534;
    background: #dcfce7;
}

.ait-member-status-invited {
    color: #854d0e;
    background: #fef9c3;
}

.ait-member-status-expired,
.ait-member-status-inactive {
    color: #475569;
    background: #e2e8f0;
}

.ait-member-row-warning {
    background: #fff7ed;
}

.ait-member-operation-disabled {
    color: var(--ait-color-muted);
    font-weight: 600;
}

.ait-muted-text {
    color: var(--ait-color-muted);
}

/* Project作成 INPUT・CHECK */
.ait-project-create-card {
    max-width: 900px;
}

.ait-required-label {
    margin-left: 8px;
    color: #b42318;
    font-size: 13px;
    font-weight: 700;
}

.ait-confirmation-list {
    display: grid;
    margin: 0 0 24px;
    border-top: 1px solid var(--ait-color-border);
}

.ait-confirmation-row {
    display: grid;
    grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
    border-bottom: 1px solid var(--ait-color-border);
}

.ait-confirmation-row dt,
.ait-confirmation-row dd {
    margin: 0;
    padding: 14px 16px;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.ait-confirmation-row dt {
    font-weight: 700;
    background: #f8fafc;
}

/* Project Member招待フロー */
.ait-invitation-card {
    max-width: 900px;
}

.ait-invitation-administrator-notice {
    color: #7c2d12;
    background: #ffedd5;
}

.ait-invitation-list {
    display: grid;
    gap: 16px;
}

.ait-invitation-item {
    display: grid;
    gap: 18px;
    margin-top: 0;
}

.ait-invitation-item-warning {
    background: #fff7ed;
}

.ait-invitation-item-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.ait-invitation-item-header h2 {
    margin: 0;
    overflow-wrap: anywhere;
}

.ait-invitation-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    gap: 12px;
}

.ait-invitation-details div {
    min-width: 0;
    padding: 14px;
    background: #f8fafc;
    border-radius: var(--ait-radius-small);
}

.ait-invitation-details dt,
.ait-invitation-details dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.ait-invitation-details dt {
    margin-bottom: 6px;
    color: var(--ait-color-muted);
    font-size: 13px;
    font-weight: 700;
}

.ait-invitation-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.ait-invitation-response-actions .ait-button {
    min-width: 140px;
}

/* フッタ */
.ait-footer {
    grid-area: footer;
    align-self: end;
    padding: 20px var(--ait-main-padding);
    color: var(--ait-color-muted);
    text-align: center;
}

/* ドロワー・オーバーレイ */
.ait-drawer-overlay {
    display: none;
}

/* Utility */
.ait-u-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.ait-u-stack > * + * {
    margin-top: 16px;
}

.ait-u-cluster {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

/* 未ログイン公開画面 */
.ait-public-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 40px 20px;
    overflow-x: hidden;
}

.ait-public-shell {
    width: 100%;
    max-width: 480px;
    min-width: 0;
}

.ait-public-brand {
    margin-bottom: 24px;
}

.ait-public-brand-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: fit-content;
    max-width: 100%;
    min-height: 44px;
    margin: 0 auto;
    gap: 12px;
}

.ait-public-brand-logo {
    width: clamp(140px, 42vw, 220px);
    max-width: 100%;
}

.ait-public-brand-text {
    align-items: center;
    line-height: 1.2;
    text-align: center;
}

.ait-public-brand-name {
    font-size: 22px;
    font-weight: 700;
}

.ait-public-brand-service-name {
    color: var(--ait-color-muted);
    font-size: 13px;
    font-weight: 600;
}

.ait-public-login-card {
    width: 100%;
}

.ait-public-description {
    margin: 10px 0 0;
    color: var(--ait-color-muted);
}

.ait-public-error {
    margin: 0 0 20px;
    padding: 12px 14px;
    color: #8a1c13;
    background: #fef3f2;
    border-radius: var(--ait-radius-small);
}

.ait-public-cookie-login {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    gap: 10px;
    cursor: pointer;
}

.ait-public-cookie-login input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.ait-public-links {
    display: grid;
    margin-top: 24px;
    padding-top: 20px;
    gap: 14px;
    border-top: 1px solid var(--ait-color-border);
    text-align: center;
}

.ait-public-links a {
    color: var(--ait-color-primary);
    text-underline-offset: 3px;
}

.ait-public-policy-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 18px;
    font-size: 14px;
}

/* キーボードフォーカス */
.ait-body :focus-visible {
    outline: 3px solid var(--ait-color-focus);
    outline-offset: 3px;
}

/* タブレット相当 */
@media (min-width: 769px) and (max-width: 1199px) {
    :root {
        --ait-sidebar-width: 240px;
        --ait-main-padding: 24px;
    }

    .ait-topbar .ait-brand-logo {
        width: 72px;
    }
}

/* ドロワー配置 */
@media (max-width: 768px) {
    :root {
        --ait-header-height: 60px;
        --ait-main-padding: 16px;
    }

    .ait-topbar-inner {
        padding: 0 16px;
        gap: 10px;
    }

    .ait-js .ait-menu-toggle {
        display: inline-flex;
    }

    .ait-topbar .ait-brand-logo {
        width: 64px;
    }

    .ait-brand-name {
        font-size: 16px;
    }

    .ait-user-name {
        max-width: 32vw;
    }

    .ait-layout {
        display: block;
        min-height: calc(100vh - var(--ait-header-height));
    }

    .ait-js .ait-sidebar {
        position: fixed;
        z-index: 1100;
        top: 0;
        bottom: 0;
        left: 0;
        width: var(--ait-drawer-width);
        max-width: 100%;
        overflow-y: auto;
        box-shadow: var(--ait-shadow-drawer);
        transform: translateX(-105%);
        transition: transform var(--ait-transition-duration) ease;
    }

    .ait-js .ait-drawer-overlay {
        position: fixed;
        z-index: 1050;
        inset: 0;
        display: block;
        visibility: hidden;
        background: var(--ait-color-overlay);
        opacity: 0;
        transition:
            opacity var(--ait-transition-duration) ease,
            visibility 0s linear var(--ait-transition-duration);
    }

    .ait-js .ait-drawer-open {
        overflow: hidden;
    }

    .ait-js .ait-drawer-open .ait-sidebar {
        transform: translateX(0);
    }

    .ait-js .ait-drawer-open .ait-drawer-overlay {
        visibility: visible;
        opacity: 1;
        transition-delay: 0s;
    }

    .ait-no-js .ait-sidebar {
        position: static;
        width: 100%;
        box-shadow: none;
    }

    .ait-main {
        min-height: 50vh;
    }

    .ait-card {
        padding: 20px;
    }

    .ait-form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .ait-form-actions .ait-button {
        width: 100%;
    }

    .ait-page-header-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .ait-project-detail-header {
        flex-direction: column;
    }

    .ait-function-grid,
    .ait-management-grid {
        grid-template-columns: 1fr;
    }

    .ait-page-header-actions .ait-button {
        width: 100%;
    }

    .ait-search-fields {
        grid-template-columns: 1fr;
    }

    .ait-list-controls,
    .ait-list-controls-bottom {
        align-items: stretch;
        flex-direction: column;
    }

    .ait-list-pagination-buttons {
        width: 100%;
    }

    .ait-page-button {
        flex: 1 1 44px;
    }

    .ait-project-table-wrap {
        overflow-x: visible;
        background: transparent;
        box-shadow: none;
    }

    .ait-project-table,
    .ait-project-table thead,
    .ait-project-table tbody,
    .ait-project-table tr,
    .ait-project-table th,
    .ait-project-table td {
        display: block;
        width: 100%;
    }

    .ait-project-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    .ait-project-table tbody {
        display: grid;
        gap: 14px;
    }

    .ait-project-table tr {
        padding: 18px;
        background: var(--ait-color-surface);
        border-radius: var(--ait-radius-medium);
        box-shadow: var(--ait-shadow-small);
    }

    .ait-project-table th:first-child,
    .ait-project-table th:last-child {
        width: 100%;
    }

    .ait-project-table th,
    .ait-project-table td {
        display: grid;
        grid-template-columns: minmax(112px, 34%) minmax(0, 1fr);
        padding: 10px 0;
        border-bottom: 1px solid var(--ait-color-border);
    }

    .ait-project-table th::before,
    .ait-project-table td::before {
        padding-right: 12px;
        color: var(--ait-color-muted);
        content: attr(data-label);
        font-size: 13px;
        font-weight: 700;
    }

    .ait-project-table td:last-child {
        border-bottom: 0;
    }

    .ait-audio-table-wrap {
        overflow-x: visible;
        background: transparent;
        box-shadow: none;
    }

    .ait-audio-table,
    .ait-audio-table thead,
    .ait-audio-table tbody,
    .ait-audio-table tr,
    .ait-audio-table th,
    .ait-audio-table td {
        display: block;
        width: 100%;
    }

    .ait-audio-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    .ait-audio-table tbody {
        display: grid;
        gap: 14px;
    }

    .ait-audio-table tr {
        padding: 18px;
        background: var(--ait-color-surface);
        border-radius: var(--ait-radius-medium);
        box-shadow: var(--ait-shadow-small);
    }

    .ait-audio-table th:first-child,
    .ait-audio-table th:last-child {
        width: 100%;
    }

    .ait-audio-table th,
    .ait-audio-table td {
        display: grid;
        grid-template-columns: minmax(112px, 34%) minmax(0, 1fr);
        padding: 10px 0;
        border-bottom: 1px solid var(--ait-color-border);
    }

    .ait-audio-table th::before,
    .ait-audio-table td::before {
        padding-right: 12px;
        color: var(--ait-color-muted);
        content: attr(data-label);
        font-size: 13px;
        font-weight: 700;
    }

    .ait-audio-table td:last-child {
        border-bottom: 0;
    }

    .ait-member-table-wrap {
        overflow-x: visible;
        background: transparent;
        box-shadow: none;
    }

    .ait-member-table,
    .ait-member-table thead,
    .ait-member-table tbody,
    .ait-member-table tr,
    .ait-member-table th,
    .ait-member-table td {
        display: block;
        width: 100%;
    }

    .ait-member-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    .ait-member-table tbody {
        display: grid;
        gap: 14px;
    }

    .ait-member-table tr {
        padding: 18px;
        background: var(--ait-color-surface);
        border-radius: var(--ait-radius-medium);
        box-shadow: var(--ait-shadow-small);
    }

    .ait-member-table tr.ait-member-row-warning {
        background: #fff7ed;
    }

    .ait-member-table th:first-child,
    .ait-member-table th:last-child {
        width: 100%;
    }

    .ait-member-table th,
    .ait-member-table td {
        display: grid;
        grid-template-columns: minmax(128px, 38%) minmax(0, 1fr);
        padding: 10px 0;
        border-bottom: 1px solid var(--ait-color-border);
    }

    .ait-member-table th::before,
    .ait-member-table td::before {
        padding-right: 12px;
        color: var(--ait-color-muted);
        content: attr(data-label);
        font-size: 13px;
        font-weight: 700;
    }

    .ait-member-table td:last-child {
        border-bottom: 0;
    }

    .ait-responsive-table-wrap {
        overflow-x: visible;
        background: transparent;
        box-shadow: none;
    }

    .ait-revision-table,
    .ait-revision-table thead,
    .ait-revision-table tbody,
    .ait-revision-table tr,
    .ait-revision-table th,
    .ait-revision-table td {
        display: block;
        width: 100%;
    }

    .ait-revision-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    .ait-revision-table tbody {
        display: grid;
        gap: 14px;
    }

    .ait-revision-table tr {
        padding: 18px;
        background: var(--ait-color-surface);
        border-radius: var(--ait-radius-medium);
        box-shadow: var(--ait-shadow-small);
    }

    .ait-revision-table th,
    .ait-revision-table td {
        display: grid;
        grid-template-columns: minmax(112px, 34%) minmax(0, 1fr);
        padding: 10px 0;
        border-bottom: 1px solid var(--ait-color-border);
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .ait-revision-table th::before,
    .ait-revision-table td::before {
        padding-right: 12px;
        color: var(--ait-color-muted);
        content: attr(data-label);
        font-size: 13px;
        font-weight: 700;
    }

    .ait-revision-table td:last-child {
        border-bottom: 0;
    }

    .ait-revision-table .ait-button {
        min-width: 44px;
        min-height: 44px;
    }

    .ait-confirmation-row {
        grid-template-columns: 1fr;
    }

    .ait-confirmation-row dd {
        padding-top: 10px;
    }

    .ait-invitation-item-header {
        flex-direction: column;
    }

    .ait-invitation-details {
        grid-template-columns: 1fr;
    }

    .ait-invitation-actions,
    .ait-invitation-actions .ait-button {
        width: 100%;
    }
}

/* 狭いスマートフォン */
@media (max-width: 480px) {
    :root {
        --ait-main-padding: 12px;
    }

    .ait-topbar-inner {
        padding: 0 10px;
        gap: 8px;
    }

    .ait-brand {
        gap: 6px;
    }

    .ait-topbar .ait-brand-logo {
        width: 60px;
    }

    .ait-brand-name {
        display: none;
    }

    .ait-brand-service-name {
        color: var(--ait-color-text);
        font-size: 16px;
        font-weight: 700;
    }

    .ait-user-name {
        max-width: 12vw;
        font-size: 12px;
    }

    .ait-logout-button {
        padding: 0 8px;
        font-size: 14px;
    }

    .ait-card {
        padding: 16px;
        border-radius: 12px;
    }

    .ait-table th,
    .ait-table td {
        padding: 10px;
    }

    .ait-public-body {
        align-items: flex-start;
        padding: 24px 12px;
    }

    .ait-public-brand {
        margin-bottom: 18px;
    }

    .ait-public-brand-logo {
        width: clamp(140px, 52vw, 190px);
    }

    .ait-public-brand-name {
        display: block;
        font-size: 20px;
    }

    .ait-public-brand-service-name {
        color: var(--ait-color-muted);
        font-size: 13px;
    }
}

/* 動きを減らす設定 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
