:root {
    --bg: #f8f9fa;
    --surface: #fff;
    --text: #202122;
    --muted: #54595d;
    --border: #a2a9b1;
    --border-light: #c8ccd1;
    --link: #36c;
    --visited: #795cb2;
    --danger: #b32424;
    --ok: #14866d;
    --warn: #ac6600;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--bg);
}

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
    font-size: 15px;
    line-height: 1.65;
}

a {
    color: var(--link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a:visited {
    color: var(--visited);
}


/* =========================================================
   ホームアイコン
   ========================================================= */

.header {
    background: #fff;
    color: #fff;
    padding: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.header img {
    display: block;
}


/* =========================================================
   ヘッダー
   ========================================================= */

.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 11px 18px;
}

.header-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
}

.brand {
    font-family: Georgia, "Times New Roman", "Yu Mincho", serif;
    font-size: 25px;
    color: #202122 !important;
}

.account {
    font-size: 13px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logout-form {
    display: inline;
    margin: 0;
}

.link-button {
    border: 0;
    background: none;
    color: var(--link);
    padding: 0;
    cursor: pointer;
    font: inherit;
}


/* =========================================================
   ページレイアウト
   ========================================================= */

.layout {
    max-width: 1120px;
    margin: 20px auto;
    padding: 0 18px;
}

.page {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 24px 28px;
    margin-bottom: 18px;
}

/* 狭いページを中央配置 */
.narrow {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}


/* =========================================================
   見出し
   ========================================================= */

.page h1,
.page h2,
.page h3 {
    font-family: Georgia, "Times New Roman", "Yu Mincho", serif;
    font-weight: 400;
}

.page h1 {
    font-size: 28px;
    border-bottom: 1px solid var(--border);
    margin: 0 0 18px;
    padding-bottom: 6px;
}

.page h2 {
    font-size: 21px;
    border-bottom: 1px solid var(--border-light);
    margin: 22px 0 12px;
    padding-bottom: 4px;
}

.page h3 {
    font-size: 17px;
    margin: 20px 0 8px;
}

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


/* =========================================================
   通知
   ========================================================= */

.notice {
    border: 1px solid var(--border);
    border-left: 4px solid var(--link);
    background: #f8f9fa;
    padding: 10px 14px;
    margin: 12px 0;
}

.notice.error {
    border-left-color: var(--danger);
    background: #fff5f5;
}

.notice.ok {
    border-left-color: var(--ok);
    background: #f4fffa;
}

.notice.warn {
    border-left-color: var(--warn);
    background: #fffaf2;
}


/* =========================================================
   フォーム
   ========================================================= */

.field {
    margin: 0 0 15px;
}

.field label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.help {
    font-size: 13px;
    color: var(--muted);
}

input[type=text],
input[type=email],
input[type=password],
input[type=file],
textarea,
select {
    width: 100%;
    border: 1px solid var(--border);
    background: #fff;
    padding: 8px 9px;
    font: inherit;
    border-radius: 2px;
}

textarea {
    min-height: 140px;
    resize: vertical;
}

.compact {
    width: auto !important;
}


/* =========================================================
   ボタン
   ========================================================= */

.button,
button[type=submit] {
    display: inline-block;
    border: 1px solid #72777d;
    background: #f8f9fa;
    color: #202122;
    padding: 7px 13px;
    border-radius: 2px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
}

.button:hover,
button[type=submit]:hover {
    background: #eaecf0;
    text-decoration: none;
}

.primary {
    background: #36c !important;
    border-color: #36c !important;
    color: #fff !important;
}

.danger {
    background: #fff !important;
    border-color: #b32424 !important;
    color: #b32424 !important;
}

.secondary {
    color: #202122 !important;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}


/* =========================================================
   タブ
   ========================================================= */

.tabs {
    background: #fff;
    border: 1px solid var(--border);
    padding: 8px 12px;
    margin-bottom: 14px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}


/* =========================================================
   表
   ========================================================= */

.wikitable {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}

.wikitable th,
.wikitable td {
    border: 1px solid var(--border);
    padding: 7px 9px;
    text-align: left;
    vertical-align: top;
}

.wikitable th {
    background: #eaecf0;
}


/* =========================================================
   ステータス
   ========================================================= */

.status {
    display: inline-block;
    border: 1px solid var(--border);
    padding: 1px 7px;
    border-radius: 2px;
    font-size: 12px;
}

.status-pending {
    background: #fff4ce;
    border-color: #e2b93b;
}

.status-done {
    background: #e6f4ea;
    border-color: #7db88a;
}


/* =========================================================
   スレッド
   ========================================================= */

.thread {
    border-top: 1px solid var(--border-light);
    padding: 14px 0;
}

.thread:first-child {
    border-top: 0;
}

.thread.admin {
    background: #f8f9fa;
    padding: 14px;
}

.meta {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 4px;
}

.attachment {
    display: block;
    margin-top: 5px;
    font-size: 13px;
}


/* =========================================================
   検索・カラム
   ========================================================= */

.search-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px auto;
    gap: 8px;
    align-items: end;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}


/* =========================================================
   ボックス
   ========================================================= */

.summary-box {
    border: 1px solid var(--border);
    background: #f8f9fa;
    padding: 12px;
}

.danger-zone {
    border: 1px solid #b32424;
    padding: 12px;
    margin-top: 10px;
}


/* =========================================================
   チェックボックス等
   ========================================================= */

.checkline {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: 13px;
}

.checkline input {
    margin-top: 5px;
}


/* =========================================================
   汎用
   ========================================================= */

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

.small {
    font-size: 13px;
}

.right {
    text-align: right;
}

.nowrap {
    white-space: nowrap;
}

.empty {
    color: var(--muted);
    font-style: italic;
}

.warning-list {
    margin: 8px 0;
    padding-left: 22px;
}


/* =========================================================
   スマートフォン
   ========================================================= */

@media(max-width:760px) {

    .layout {
        padding: 0 8px;
        margin-top: 8px;
    }

    .page {
        padding: 18px 14px;
    }

    .page h1 {
        font-size: 24px;
    }

    .wikitable {
        display: block;
        overflow-x: auto;
    }

    .search-row,
    .two-col {
        grid-template-columns: 1fr;
    }

    .header-inner {
        align-items: flex-start;
    }

    .account {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .narrow {
        max-width: 100%;
    }
}