:root {
    --bg-body: #F0E0D6;
    --bg-res: #F6F1EF;
    --text-main: #222;
    --text-name: #228B22;
    --text-id: #666;
    --link-color: #0000FF;
    --border-color: #D3C3B9;
    --header-bg: #DDCCBB;
    --accent-red: #CC0000;
    --accent-purple: #800080;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'M PLUS 1p', 'MS PGothic', sans-serif;
    line-height: 1.5;
    padding-bottom: 80px;
}

/* --- 共通ヘッダー --- */
.header {
    background-color: var(--header-bg);
    padding: 10px 15px;
    border-bottom: 2px solid var(--border-color);
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.board-link {
    font-size: 0.8rem;
    color: #0000FF;
    text-decoration: underline;
    cursor: pointer;
    margin-bottom: 4px;
    display: inline-block;
}

.main-title {
    font-size: 1.4rem;
    font-weight: bold;
    color: #444;
    margin: 0;
}

.thread-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--accent-red);
    margin: 0;
}

/* --- スレッド一覧画面 --- */
.board-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 15px;
}

.thread-list-item {
    background-color: var(--bg-res);
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
}
.thread-list-item:hover {
    background-color: #fff;
}
.thread-list-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.list-num { color: #0000FF; font-weight: bold; margin-right: 5px; }
.list-title { font-weight: bold; font-size: 1.1rem; color: #0000FF; text-decoration: underline; }
.list-meta { font-size: 0.85rem; color: #666; margin-top: 4px; }
.res-count { color: #a00; font-weight: bold; }

/* --- スレッド詳細画面 --- */
.thread-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 10px;
}

.res {
    margin-bottom: 15px;
    background-color: var(--bg-res);
    padding: 12px;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.res-header {
    font-size: 0.85rem;
    margin-bottom: 6px;
    border-bottom: 1px dashed #ddd;
    padding-bottom: 4px;
}

.res-num { font-weight: bold; }
.res-name { color: var(--text-name); font-weight: bold; }
.res-date { color: var(--text-id); font-size: 0.8rem; }
.res-id { color: var(--text-id); font-size: 0.8rem; }

.res-body {
    font-size: 1rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    padding-top: 5px;
    line-height: 1.6;
}

.anchor { color: var(--link-color); text-decoration: underline; cursor: pointer; }

/* 特殊演出用クラス */
.special-text { color: #d00; font-weight: bold; }
.ghost-text { color: #888; font-family: 'Ghost', serif; text-shadow: 2px 2px 4px #000; }
.fire-text { color: red; font-weight: bold; text-shadow: 1px 0px 2px orange; }
.gold-text { color: #B8860B; font-weight: bold; text-shadow: 1px 1px 0px #FFF; }
.aa { font-family: 'MS PGothic', 'IPAMonaPGothic', sans-serif; font-size: 16px; line-height: 18px; white-space: pre; overflow-x: auto; display: block; margin: 10px 0; color: #333; }
.accent-purple { color: purple; font-weight: bold; }

/* --- 投稿フォーム --- */
.post-form {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #EEE;
    padding: 10px;
    border-top: 1px solid #CCC;
    display: flex;
    gap: 10px;
    z-index: 200;
}

.input-text { flex: 1; padding: 8px; border: 1px solid #999; border-radius: 4px; }
.submit-btn {
    background-color: #DDCCBB;
    border: 1px solid #999;
    padding: 0 20px;
    cursor: pointer;
    font-weight: bold;
    color: #444;
    border-radius: 4px;
}

#toast {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 15px 30px;
    border-radius: 5px;
    display: none;
    z-index: 300;
}

/* 広告風エリア */
.ad-banner {
    text-align: center;
    margin: 10px 0;
    padding: 10px;
    background: #fff;
    border: 1px solid #ccc;
    font-size: 0.8rem;
    color: #888;
}
.ad-banner a {
    color: #888;
    text-decoration: underline;
}

/* --- スレッドフッター --- */
.thread-footer {
    margin-top: 20px;
    font-size: 0.85rem;
}
.thread-footer-size {
    color: #a00;
    font-weight: bold;
    padding: 0 5px;
}
.thread-footer-hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 5px 0;
}
.thread-footer-nav {
    padding: 3px 5px;
}
.thread-footer-nav a {
    color: var(--link-color);
    text-decoration: underline;
    margin-right: 8px;
}
.thread-footer-notice {
    color: #888;
    text-align: center;
    margin-top: 15px;
    font-size: 0.8rem;
}
