

button.calendar-task {
    width: 100%;
    border-top: 0;
    border-right: 0;
    border-bottom: 0;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.card-list,
.project-list,
.review-list {
    display: grid;
    gap: 12px;
}

.content-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.content-card {
    display: flex;
    min-height: 290px;
    padding: 22px;
    border: 1px solid var(--line);
    background: var(--panel);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    flex-direction: column;
}

.content-card.is-muted {
    color: var(--muted);
    background: #f6f6f4;
}

.content-card-top,
.content-actions,
.content-counts {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.type-label,
.status-label,
.priority-label {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.09em;
}

.status-label {
    padding: 4px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
}

.status-label.status-in_progress,
.status-label.status-achieved {
    border-color: var(--ink);
    color: #fff;
    background: var(--ink);
}

.content-card h2 {
    margin: 20px 0 4px;
    font-family: Georgia, "Yu Mincho", serif;
    font-size: 24px;
    font-weight: 500;
    line-height: 1.35;
}

.content-card h2 a {
    text-decoration: none;
}

.content-meta,
.content-parent {
    margin: 3px 0;
    color: var(--muted);
    font-size: 12px;
}

.content-summary {
    margin: 16px 0;
}

.content-card .tag-row {
    margin-top: auto;
    padding-top: 15px;
}

.content-counts {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--soft-line);
    color: var(--muted);
    font-size: 11px;
}

.content-actions {
    justify-content: flex-end;
    margin-top: 16px;
}

.content-actions form {
    margin: 0;
}

.content-actions a,
.content-actions .link-button {
    color: var(--muted);
    font-size: 12px;
    text-decoration: underline;
}

.review-card {
    display: grid;
    grid-template-columns: 130px 1fr;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--panel);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.review-date {
    display: flex;
    justify-content: center;
    min-height: 190px;
    padding: 24px;
    color: #fff;
    background: var(--ink);
    flex-direction: column;
    text-align: center;
}

.review-date span,
.review-date small {
    color: #bdbdbd;
    font-size: 11px;
    letter-spacing: 0.1em;
}

.review-date strong {
    margin: 7px 0;
    font-family: Georgia, serif;
    font-size: 30px;
    font-weight: 500;
}

.review-body {
    padding: 24px;
}

.review-body h2 {
    margin: 0 0 14px;
    font-family: Georgia, "Yu Mincho", serif;
    font-weight: 500;
}

.review-body h2 a {
    text-decoration: none;
}

.review-body p {
    margin: 0 0 18px;
    white-space: normal;
}

.review-date-field {
    max-width: 440px;
}

.list-card {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    padding: 20px;
}

.list-card h2 {
    margin: 0;
    font-size: 18px;
}

.list-card p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.two-column {
    display: grid;
    grid-template-columns: minmax(300px, 0.8fr) minmax(400px, 1.2fr);
    gap: 24px;
    align-items: start;
}

.stack-form {
    display: grid;
    gap: 14px;
}

.project-item {
    padding: 14px 0;
    border-top: 1px solid var(--soft-line);
}

.project-item-heading {
    display: flex;
    justify-content: space-between;
    gap: 8px 16px;
    flex-wrap: wrap;
}

.project-item-heading span {
    color: var(--muted);
    font-size: 12px;
}

.project-item-actions {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    font-size: 12px;
}

.project-edit-panel { margin-top: 20px; }
.project-edit-panel > summary { cursor: pointer; font-weight: 700; }
.project-edit-panel .stack-form { max-width: 680px; margin: 20px 0; }
.project-edit-panel .stack-form .button { justify-self: start; }

.empty-state {
    padding: clamp(38px, 8vw, 100px) 24px;
    text-align: center;
}

.empty-state h1,
.empty-state h2 {
    margin: 6px 0 18px;
    font-family: Georgia, "Yu Mincho", serif;
    font-weight: 500;
}

.empty-state pre {
    overflow-x: auto;
    max-width: 720px;
    margin: 20px auto;
    padding: 16px;
    color: #fff;
    background: var(--ink);
    border-radius: 8px;
    text-align: left;
}

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

.flash {
    margin-bottom: 18px;
    padding: 13px 16px;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 7px;
}

.flash-success {
    border-left: 4px solid var(--success);
}

.flash-error {
    border-left: 4px solid var(--danger);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

[hidden] {
    display: none !important;
}

@media (max-width: 1180px) {
    .site-header {
        grid-template-columns: auto auto 1fr;
    }

    .nav-toggle {
        display: block;
        justify-self: end;
    }

    .main-nav {
        position: absolute;
        top: 76px;
        right: 20px;
        display: none;
        width: 220px;
        padding: 10px;
        border: 1px solid var(--line);
        background: #fff;
        border-radius: 8px;
        box-shadow: var(--shadow);
    }

    .main-nav.is-open {
        display: grid;
    }

    .header-search {
        grid-column: 1 / -1;
    }

    .quick-panel {
        grid-template-columns: 1fr;
    }

    .quick-form {
        grid-template-columns: 1fr 150px 120px auto;
    }

    .dashboard-add-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .filter-bar {
        grid-template-columns: 1fr 1fr;
    }

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

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

    .recent-diary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

    .card-visual-grid {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 720px) {
    .site-header {
        grid-template-columns: 1fr auto;
        gap: 10px;
        padding: 10px 15px;
    }

    .brand small {
        display: none;
    }

    .header-search {
        grid-column: 1 / -1;
    }

    .page-shell {
        width: min(100% - 24px, 1500px);
        padding-top: 22px;
    }

    .hero,
    .page-heading {
        align-items: start;
        flex-direction: column;
    }

    .dashboard-hero-actions {
        width: 100%;
        justify-content: stretch;
    }

    .dashboard-hero-actions .button {
        flex: 1;
    }

    .hero {
        min-height: auto;
        padding: 28px 22px;
    }

    .hero h1,
    .page-heading h1 {
        font-size: 36px;
    }

    .quick-form,
    .dashboard-grid,
    .form-grid,
    .two-column,
    .filter-bar,
    .content-card-grid,
    .wish-dashboard-grid,
    .check-list,
    .fixed-link-grid,
    .markdown-editor-grid,
    .note-view-layout,
    .global-search-form {
        grid-template-columns: 1fr;
    }

    .dashboard-add-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-editor .panel-header {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-editor .panel-header form,
    .dashboard-editor .panel-header .button {
        width: 100%;
    }

    .panel,
    .form-section,
    .quick-panel {
        padding: 18px;
    }

    .task-table,
    .task-table tbody,
    .task-table tr,
    .task-table td {
        display: block;
        width: 100%;
    }

    .task-table thead {
        display: none;
    }

    .task-table tr {
        padding: 14px;
        border-bottom: 1px solid var(--line);
    }

    .task-table td {
        display: grid;
        grid-template-columns: 88px 1fr;
        gap: 10px;
        padding: 5px 0;
        border: 0;
    }

    .task-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 11px;
    }

    .task-table td.row-actions {
        display: flex;
        margin-top: 8px;
        padding-left: 98px;
    }

    .sticky-actions {
        width: 100%;
    }

    .sticky-actions .button {
        flex: 1;
    }

    .list-card {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-span {
        grid-column: auto;
    }

    .review-card {
        grid-template-columns: 1fr;
    }

    .review-date {
        min-height: auto;
        align-items: baseline;
        gap: 8px;
        flex-direction: row;
    }

    .review-date strong {
        margin: 0;
        font-size: 22px;
    }

    .content-card {
        min-height: 0;
    }

    .heading-actions {
        width: 100%;
        justify-content: stretch;
    }

    .heading-actions .button {
        flex: 1;
    }

    .bookmark-card {
        grid-template-columns: 1fr;
        padding: 18px;
    }

    .recent-diary-grid,
    .attachment-grid,
    .contract-card-grid,
    .asset-summary-grid {
        grid-template-columns: 1fr;
    }

    .security-notice,
    .renewal-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .credit-card-item {
        grid-template-columns: 1fr;
    }

    .credit-card-face {
        min-height: 180px;
    }

    .diary-card {
        grid-template-columns: 1fr;
        padding: 18px;
    }

    .diary-card-side {
        align-items: flex-start;
        flex-direction: row;
    }

    .diary-card-side .content-actions {
        margin: 0 0 0 auto;
    }

    .attachment-library-row {
        grid-template-columns: 58px minmax(0, 1fr);
        gap: 12px;
    }

    .attachment-library-row > form {
        grid-column: 2;
    }

    .attachment-library-type {
        width: 50px;
        height: 50px;
    }

    .search-result {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .search-result time {
        text-align: left;
    }

    .note-editor-section {
        min-height: 0;
    }

    .rich-editor,
    .markdown-editor-grid textarea,
    .markdown-preview {
        min-height: 260px;
    }

    .calendar {
        grid-template-columns: repeat(7, minmax(92px, 1fr));
    }

    .calendar-weekday,
    .calendar-day {
        min-width: 92px;
    }

    .site-footer {
        gap: 8px;
        flex-direction: column;
    }
}

.phase-six-grid {
    margin-top: 24px;
}

.dashboard-review-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.dashboard-review-list a {
    display: flex;
    min-height: 118px;
    padding: 15px;
    border: 1px solid var(--line);
    background: #fafafa;
    border-radius: 7px;
    flex-direction: column;
    text-decoration: none;
}

.dashboard-review-list a:hover {
    border-color: var(--ink);
}

.dashboard-review-list span,
.dashboard-review-list small {
    color: var(--muted);
    font-size: 10px;
}

.dashboard-review-list strong {
    margin: 10px 0 auto;
}

.media-review-filter {
    grid-template-columns: minmax(260px, 1fr) 160px 190px auto;
}

.media-review-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.media-review-card {
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--panel);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.media-review-cover {
    display: grid;
    height: 220px;
    overflow: hidden;
    place-items: center;
    color: #bdbdbd;
    background: var(--ink);
    font-family: Georgia, serif;
    font-size: 28px;
    letter-spacing: 0.12em;
    text-decoration: none;
}

.media-review-cover.is-placeholder { min-height: 0; height: auto; padding: .65rem 1rem; font-size: .8rem; justify-content: flex-start; }
.media-review-cover img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.media-review-card-body {
    padding: 20px;
}

.media-review-card-body h2 {
    margin: 12px 0 5px;
    font-family: Georgia, "Yu Mincho", serif;
    font-size: 24px;
    font-weight: 500;
    overflow-wrap: anywhere;
}

.media-review-card-body h2 a {
    text-decoration: none;
}

.media-review-card-body > p:not(.content-meta) {
    color: var(--muted);
    font-size: 13px;
}

.review-rating {
    font-family: Georgia, serif;
    font-weight: 500;
}

.review-chip-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.review-chip-row span {
    padding: 4px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 10px;
}

.review-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}

.media-review-document {
    min-height: 0;
}

.media-review-empty { display: grid; gap: 12px; justify-items: start; }
.media-review-empty p { margin: 0; }
.media-review-history-edit { margin-top: 12px; }
.media-review-history-edit > summary { cursor: pointer; color: var(--muted); }
.media-review-history-edit .media-review-history-form { margin: 12px 0; }

.media-review-body {
    overflow-wrap: anywhere;
    font-size: 16px;
    line-height: 1.95;
}

.media-review-body h2,
.media-review-body h3 {
    margin-top: 1.8em;
    font-family: Georgia, "Yu Mincho", serif;
    font-weight: 500;
}

.spoiler-notice {
    margin-bottom: 22px;
    padding: 12px 14px;
    border: 1px solid var(--ink);
    font-weight: 700;
}

.review-meta-panel {
    position: sticky;
    top: 102px;
}

.review-meta-panel dl {
    margin: 16px 0 0;
}

.review-meta-panel dl div {
    padding: 11px 0;
    border-top: 1px solid var(--soft-line);
}

.review-meta-panel dt {
    color: var(--muted);
    font-size: 10px;
}

.review-meta-panel dd {
    margin: 3px 0 0;
}

.review-external-link {
    width: 100%;
    margin-top: 18px;
}

.media-review-history-panel { margin-top: 24px; }
.media-review-history-heading { align-items: flex-start; }
.media-review-history-heading h2 { margin-bottom: 6px; }
.media-review-history-heading p:last-child { margin: 0; color: var(--muted); }
.history-count {
    padding: 6px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    white-space: nowrap;
}
.media-review-history-form {
    display: grid;
    grid-template-columns: minmax(150px, .7fr) minmax(150px, .7fr) minmax(260px, 2fr) auto;
    gap: 12px;
    align-items: end;
    margin: 22px 0 28px;
    padding: 18px;
    background: var(--soft-bg, #f6f5f1);
    border-radius: 14px;
}
.media-review-history-form label { display: grid; gap: 6px; font-size: 12px; font-weight: 700; }
.media-review-history-form input,
.media-review-history-form textarea { width: 100%; }
.media-review-history-list { margin: 0; padding: 0; list-style: none; }
.media-review-history-list li {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr);
    gap: 14px;
    padding: 0 0 22px;
}
.history-marker {
    width: 12px;
    height: 12px;
    margin-top: 5px;
    border: 3px solid var(--ink);
    border-radius: 50%;
}
.history-content { padding-bottom: 20px; border-bottom: 1px solid var(--soft-line); }
.history-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.history-content p { margin: 9px 0 0; line-height: 1.7; }

@media (max-width: 1180px) {
    .media-review-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .media-review-filter {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 720px) {
    .dashboard-review-list,
    .media-review-grid,
    .review-detail-layout {
        grid-template-columns: 1fr;
    }

    .media-review-filter {
        grid-template-columns: 1fr;
    }

    .media-review-cover {
        height: 240px;
    }

    .review-meta-panel {
        position: static;
    }

    .media-review-history-form {
        grid-template-columns: 1fr;
    }
}

.dashboard-editor-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.dashboard-widget-picker {
    align-items: stretch;
}

.dashboard-widget-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px 10px;
    align-items: center;
    min-height: 72px;
    padding: 12px 13px;
    border: 1px dashed var(--muted);
    background: #fafafa;
    border-radius: 7px;
    cursor: pointer;
}

.dashboard-widget-option input {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    opacity: 0;
    pointer-events: none;
}

.dashboard-widget-option-icon {
    display: grid;
    width: 30px;
    height: 30px;
    grid-row: 1 / span 2;
    place-items: center;
    border: 1px solid var(--ink);
    border-radius: 50%;
    font-weight: 700;
}

.dashboard-widget-option strong {
    font-size: 12px;
}

.dashboard-widget-option small {
    color: var(--muted);
    font-size: 11px;
}

.dashboard-widget-option:hover,
.dashboard-widget-option.is-selected {
    border-color: var(--ink);
    background: #efefec;
}

.dashboard-widget-option.is-selected .dashboard-widget-option-icon {
    color: #fff;
    background: var(--ink);
}

.dashboard-widget-action {
    display: grid;
    width: 34px;
    height: 34px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--ink);
    color: var(--ink);
    background: #fff;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
}

.dashboard-widget-action:hover {
    color: #fff;
    background: var(--ink);
}

.is-dashboard-hidden-preview {
    opacity: 0.45;
}

.dashboard-widget-limit {
    display: flex;
    grid-column: 2 / span 2;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.dashboard-widget-limit-control {
    display: inline-flex;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
}

.dashboard-widget-limit-control button {
    width: 34px;
    border: 0;
    background: #f4f4f1;
    color: var(--ink);
    font-weight: 700;
    cursor: pointer;
}

.dashboard-widget-limit-control button:hover {
    background: var(--ink);
    color: #fff;
}

.dashboard-widget-limit input {
    position: static;
    width: 64px;
    min-height: 34px;
    padding: 5px 8px;
    border: 0;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    opacity: 1;
    pointer-events: auto;
    border-radius: 0;
    background: #fff;
    text-align: center;
}

.dashboard-widget-option-label {
    display: contents;
    cursor: pointer;
}

.shareholder-benefit-form-panel {
    margin-bottom: 18px;
}

.shareholder-benefit-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.shareholder-benefit-form label {
    display: grid;
    gap: 6px;
}

.shareholder-benefit-form span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.shareholder-benefit-form b {
    color: var(--danger);
    font-size: 10px;
}

.shareholder-benefit-form input,
.shareholder-benefit-form select,
.shareholder-benefit-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}

.shareholder-benefit-wide {
    grid-column: 1 / -1;
}

.shareholder-month-tabs,
.shareholder-status-tabs {
    margin-bottom: 12px;
}

.shareholder-benefit-list .section-title {
    align-items: flex-end;
}

.shareholder-benefit-list .section-title span {
    color: var(--muted);
    font-size: 13px;
}

.shareholder-benefit-table td {
    vertical-align: top;
}

.shareholder-benefit-alert {
    background: #fff8e8;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    margin: 0 4px 4px 0;
    padding: 3px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.status-warn {
    border-color: #d99b2b;
    background: #fff2d6;
    color: #8a5b00;
}

.status-danger {
    border-color: #d64b4b;
    background: #ffe6e6;
    color: #9d1f1f;
}

@media (max-width: 900px) {
    .shareholder-benefit-form {
        grid-template-columns: 1fr;
    }
}

.shareholder-benefit-search {
    margin-bottom: 16px;
}

.shareholder-benefit-compact strong {
    color: var(--danger);
}

@media (max-width: 600px) {
    .page-shell .calendar-layout { display: flex; flex-direction: column; }
    .calendar-agenda-panel { order: -1; width: 100%; min-width: 0; }
    .calendar-grid { width: 100%; min-width: 0; }
}
