@charset "UTF-8";
@font-face {
    font-display: swap;
    font-weight: 400;
    font-style: normal;
    font-family: 'M PLUS 1';
    src: url("../fonts/MPLUS1-Regular.woff2") format("woff")
}
@font-face {
    font-display: swap;
    font-weight: 700;
    font-style: normal;
    font-family: 'M PLUS 1';
    src: url("../fonts/MPLUS1-Bold.woff2") format("woff")
}
@font-face {
    font-display: swap;
    font-weight: 400;
    font-style: normal;
    font-family: 'BrunoAce';
    src: url("../fonts/BrunoAce-Regular.woff2") format("woff")
}
*, ::after, ::before {
    box-sizing: border-box
}
html {
    scrollbar-gutter: stable;
}
body {
    font-family: 'M PLUS 1', Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    color: #232323;
    background-color: #f3f9ff14;
    font-size: 1rem;
    min-height: 100vh;
}
h1, h2, h3,h4 {
    font-family: 'BrunoAce', 'M PLUS 1', sans-serif;
}
h1 {
    margin: 0;
    padding: 0.5em;
}
h2 {
}
p {
    margin: 5px 0px 5px clamp(0rem, -1.8000rem + 8.0000vw, 2rem);
}
p a {
    color: #145fba;
    font-weight: 700;
    font-size: 1.1em;
}
em {
    font-weight: 700;
    font-style: normal;
    color: #d33425;
}
strong {
    color: #145fba;
}
details {
    border: 1px solid #aaa;
    border-radius: 4px;
    padding: 0.5em 0.5em 0;
    margin: 0 20px;
    transition: .5s;
}
details p {
    padding: 0.3em;
}
summary {
    margin: -0.5em -0.5em 0;
    padding: 0.5em;
}
details[open] {
    padding: 0.5em;
}
details[open] summary {
    border-bottom: 1px solid #aaa;
    margin-bottom: 0.5em;
}
summary {
    list-style-type: none;
}
summary::-webkit-details-marker {
    display: none;
}
summary:before {
    content: "＋";
}
details[open] summary:before,
summary details[open] summary:before {
    content: "−";
}
.s {
    text-decoration-line: line-through;
}
.record {
    display: flex;
    margin-top: 15px;
    text-align: right;
    font-style: italic;
    flex-direction: column;
    gap: 10px;
}

.counter{
    margin-top: 15px;
    display:flex;
    justify-content: flex-end;
}
.counter img{height: 45px;}

#wrapper {width: calc(clamp(23.75rem, 2.0000rem + 96.6667vw, 60rem) - 60px);margin: 0 auto;display: flex;flex-direction: column;min-height: 100svh;}

footer {
    border-top: 1px solid #c4c4c4;
    padding: 10px;
    margin-top: auto;
}
#login-area, #chat-area {
    padding-bottom: 10px;
    border-bottom: 1px solid #7d88ba;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin: 1em 0;
    padding: 1.2em 1em 1em 1em;
    justify-content: space-around;
}
#login-area label, #chat-area label {
    font-weight: 500;
    display: inline-block;
    margin-bottom: 0.5em;
}
#login-area input, #chat-area input[type="text"] {
    border: 1px solid #bcd;
    border-radius: 6px;
    padding: 0.5em 0.8em;
    margin: 0.2em 0;
    width: 100%;
    max-width: 320px;
}

select {
    border: 1px solid #bcd;
    border-radius: 6px;
    padding: 0.25em 0.5em;
}

svg[role="img"]{
    width: 1.1em;
    height: 1.1em;
    fill: #2d3748;
    margin-right: 5px;
    margin-bottom: 1px;
    vertical-align: bottom;
}

.banner {
    display: flex;
    flex-wrap: wrap;
}
.banner p {
    margin: 2px;
}
.mssg {
    width: 80%;
}
.error {
    text-align: center;
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #3c72a1;
}
.two-column {
    display: flex;
}
.submit {
    padding: .5em 1.2em;
    color: #fff;
    border: #fff;
    background-color: #1671df;
    border-radius: .25rem;
    cursor: pointer;
}

#login-form .submit{
    text-align: right;
}

.quit {
    position: absolute;
    background-color: #bd1616;
    right: 0;
    top: 15px;
    padding: .4em .4em;
}
#chat-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    align-items: center;
    justify-content: center;
    width: 100%;
}
#chat-form input[type="text"] {
    flex: 1 1 200px;
    min-width: 120px;
}
#chat-form button.submit {
    background: #145fba;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.5em 1.2em;
    font-size: 1em;
    font-weight: 600;
    margin-left: 0.5em;
    transition: background 0.2s;
}
#chat-form button.submit:hover {
    background: #0d4e8a;
}
#chat-form button.quit {
    background: #bd1616;
    margin-left: 0.5em;
}
#chat-form button.quit:hover {
    background: #8a1010;
}
#image-preview {
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-left: 0.5em;
}
#messages {
    border-radius: 10px;
    margin: 1em 0;
    padding: 1em 0.5em;
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
}
#message-list {
    margin: 0;
    padding: 0;
}
#message-list dt {
    background: #e6f2fd;
    color: #145fba;
    font-weight: bold;
    padding: 7px 10px 2px 10px;
    border-radius: 6px 6px 0 0;
    font-size: 1.08em;
    letter-spacing: 0.02em;
}
#message-list dd {
    background: #fff;
    padding: 10px 10px 10px 18px;
    margin: 0 0 0.5em 0;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 1px 2px rgba(20,95,186,0.03);
    font-size: 1em;
    word-break: break-word;
}
#sessions {
    margin: 1em 0 0.5em 0;
    padding: 0.5em 1em;
    background: #f4f8fb;
    border-radius: 8px;
    font-size: 1em;
    color: #145fba;
    display: flex;
    align-items: center;
    gap: 0.5em;
}
#sessions b {
    font-weight: 600;
    color: #145fba;
}
#sessions span#session-members {
    color: #222;
    font-weight: 400;
}
#sessions li {
    list-style: none;
}
#sessions ul {
    padding: 0
}
.bbs_form {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.bbs_name {
    text-align: center;
    padding: 5px;
    width: 12em;
}
.bbs_form textarea {
    resize: none;
    line-height: 1.4;
    width: clamp(16rem, 7.6000rem + 37.3333vw, 30rem);
    border-radius: 5px;
}
.bbs_form div {
    margin: 10px;
}
.article {
    text-align: center;
    border-bottom: 1px solid #7d88ba;
    padding-bottom: 10px
}
.article_name {
    font-weight: bold;
    font-size: 18px;
    margin: 10px;
}
.article_text {
    margin: 10px;
}
.bbs_footer {
    text-align: center;
    padding: 10px;
}
.bbs_footer a {
    font-size: 20px;
}
address {
    text-align: center;
}
.menu a {
    font-size: 18px;
}
nav ul {
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0 0 10px 0;
    border-bottom: 1px solid #bdbfc2;
    font-family: 'BrunoAce';
}
nav li {
    list-style: none;
    margin: 0 clamp(0.7rem, 0.4075rem + 1.3000vw, 2rem);
}
a {
    text-decoration: none;
    color: #555;
}
nav a:hover {
    transition: 0.5s;
    background: #d7ebf9;
}
nav a.navi {
    color: #145fba;
}

ol a{
    color: #145fba;
    font-weight: 700;
}

ol li{
    margin: 5px;
    margin-bottom: 10px;
}

.article-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 10px;
    padding: 0;
    margin: 0;
}

.contents {
    margin: 10px 10px;
    position: relative;
}

.article-desc{
    margin:5px;
}
  
  .article-list li {
    margin-bottom:15px;
    list-style-type: none;  /* リストのデフォルトのマーカーを削除 */
  }

.imageSelect {
    width: 2.3em;
    padding: 0;
    height: 2.3em;
    background-color: #fff;
    border-radius: .25rem;
    fill: #3396e8;
    cursor: pointer;
    border: 1px solid rgb(206 218 237);
}

.msg-meta{
    text-align: right;
}

.edit-btn {
    background: #FFF;
    color: #145fba;
    border: 1px solid #bcd;
    border-radius: 5px;
    padding: 0.2em 0.7em;
    font-size: 0.95em;
    margin-left: 0.7em;
    cursor: pointer;
    transition: background 0.2s;
}
.edit-btn:hover {
    background: #e6f2fd;
}
.edit-form {
    margin-top: 0.5em;
}
.edit-form textarea {
    width: 95%;
    border-radius: 5px;
    border: 1px solid #bcd;
    padding: 0.4em;
    font-size: 1em;
    margin-bottom: 0.4em;
}
.edit-form .submit {
    background: #145fba;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 0.3em 1em;
    margin-right: 0.5em;
}
.edit-form .cancel-edit {
    background: #eee;
    color: #555;
    border: none;
    border-radius: 5px;
    padding: 0.3em 1em;
}
.msg-edited {
    color: #888;
    font-size: 0.95em;
    margin-left: 0.5em;
}

.category-tab{display: flex;flex-direction: column;align-items: center;gap: 10px;margin-top: 30px;padding-top: 10px;border-top: 1px solid #c4c4c4;}

.board-form {max-width: 500px;margin: 1.5em auto;text-align: right;}
.board-form input[type="text"], .board-form input[type="password"] {width: 90%;padding: 0.5em;margin-bottom: 0.7em;border-radius: 5px;border: 1px solid #bcd;}
.board-form button { padding: .3em 1em; color: #fff; border: #fff; background-color: #1671df; border-radius: .25rem; cursor: pointer; }
.board-msg { background: #f8fafc; border-radius: 8px; padding: 0.8em 1em; margin-bottom: 1em; border: 1px solid #e0e6ef; }
.board-msg .meta { color: #666; font-size: 90%; margin-bottom: 0.3em; }
.board-msg .actions {margin-top: 0.5em;text-align: right;}
.board-msg .actions form, .board-msg .actions a { display: inline-block; }
.board-msg .actions input[type="password"] { width: 90px; }
.board-msg .actions button { background: #fff; color: #145fba; border: 1px solid #bcd; border-radius: 5px; padding: 0.2em 0.7em; font-size: 0.95em; margin-left: 0.5em; cursor: pointer; }
.board-msg .actions button:hover { background: #e6f2fd; }
.board-msg .actions .edit-link { color: #145fba; margin-left: 0.5em; }
.board-msg .actions .edit-link:hover { text-decoration: underline; }
.board-msg strong { color: #145fba; }
.board-pagination { text-align: center; margin: 1.5em 0; }
.board-error { color: #c00; text-align: center; margin: 1em 0; }


.login_wrap {
    text-align: center;
}
.login_input p,.login_wrap div,.profile-edit .inputs p {
    margin: 10px;
}

.login_input input {
    padding: 5px;
    text-align: center;
    width: 50%;
}
.login_wrap p {
    font-size: 14px
}

@media screen and (max-width: 700px) {
    #login-area, #chat-area div>* {
        margin: 5px auto;
        display: block;
    }
    #login-area, #chat-area label {
        margin: 5px;
        text-align: center;
    }
    h2, h3 {
        margin: 13.5px 0;
    }
    #wrapper {
        max-width: 98vw;
        padding: 0 0 10px 0;
    }
    #login-area, #messages, #sessions {
        padding: 0.7em 0.3em;
        margin: 0.7em 0;
    }
    #image-preview {
        margin-left: 0;
        margin-top: 0.5em;
    }
    #message-list dt, #message-list dd {
        font-size: 0.98em;
        padding-left: 0.7em;
        padding-right: 0.7em;
    }
}

/* Zennスタイル Markdownサポート */
.code-block-with-filename {
    margin: 1.5em;
    border-radius: 8px;
    overflow: hidden;
    background: #2d3748;
}

.code-filename {
    background: #2d3748;
    color: #e2e8f0;
    padding: 0.5em 1em;
    font-size: 0.85em;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    border-radius: 6px 6px 0 0;
    margin-bottom: 0;
}

/* pre要素の追加 */
.markdown-body pre {
    padding: 1em;
    border-radius: 6px;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.5;
    margin: 1.5em !important;
    border: none;
    transition: opacity 0.1s ease;
    opacity: 1;
}

.code-block-with-filename pre {
    margin: 0 !important;
}

.code-filename + pre {
    border-radius: 0 0 6px 6px;
    margin-top: 0 !important;
}

/* code要素の追加 */
 code {
    background: #2d3748;
    color: #e2e8f0;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    /* DOM更新時のちらつきを抑制 */
    transition: all 0.1s ease;
}

pre code {
    background: none !important;
    color: inherit !important;
    padding: 0;
    border-radius: 0;
    border: none;
    font-size: inherit;
}

.code-block-with-filename pre {
    margin: 0;
    border-radius: 0;
}

.code-block-with-filename code {
    font-size: 0.9em;
    line-height: 1.5;
}

/* テーブル - レスポンシブ対応 */
.table-wrapper {
    overflow-x: auto;
    margin: 1.5em;
    border-radius: 6px;
    -webkit-overflow-scrolling: touch; /* iOS でのスムーズスクロール */
}

table {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.9em;
    min-width: 500px; /* テーブルの最小幅を設定 */
}

table th,
table td {
    border: 1px solid #e1e4e8;
    padding: 0.75em 1em;
    text-align: left;
    vertical-align: top;
    white-space: nowrap; /* セル内容の改行を防ぐ */
}

table th {
    background: #f6f8fa;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1;
}

table tr:nth-child(even) {
    background-color: #f9f9f9;
}

table tr:hover {
    background-color: #f0f0f0;
}

/* 引用ブロックのスタイル */
blockquote {
    border-left: 4px solid #ddd;
    margin: 1em 0;
    padding: 0.5em 1em;
    background-color: #f9f9f9;
    font-style: italic;
}

blockquote p {
    margin: 0.5em 0;
}

blockquote p:first-child {
    margin-top: 0;
}

blockquote p:last-child {
    margin-bottom: 0;
}

/* 画像のキャプションスタイル */
.image-caption {
    text-align: center;
    font-size: 0.9em;
    color: #666;
    margin-top: 0.5em;
    font-style: italic;
}

/* 数式スタイル */
.katex-display {
    margin: 1em 0;
    text-align: center;
}

.katex {
    font-size: 1em;
}

/* diff記法の色分け */
.language-diff .token.inserted {
    color: #4ec9b0 !important;
    background: rgba(78, 201, 176, 0.1) !important;
}

.language-diff .token.deleted {
    color: #f97583 !important;
    background: rgba(249, 117, 131, 0.1) !important;
}


/* 引用 */
blockquote {
    border-left: 4px solid #dfe2e5;
    padding-left: 1em;
    margin: 1em 0;
    color: #6a737d;
    font-style: italic;
}

/* リスト */
ul, ol {
    margin: 1em 0;
    padding-left: 2em;
}

li {
    margin: 0.5em 0;
}

/* 区切り線 */
hr {
    border: none;
    height: 1px;
    background: #e1e4e8;
    margin: 2em 0;
}

/* 画像レスポンシブ */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 脚注 */
.footnotes {
    margin-top: 2em;
    padding-top: 1em;
    border-top: 1px solid #e1e4e8;
    font-size: 0.9em;
}

.footnote-definition {
    margin: 0.5em 0;
    padding: 0.5em 0;
    border-bottom: 1px solid #f0f0f0;
}

.footnote-backref {
    text-decoration: none;
    color: #666;
    margin-left: 0.5em;
}

.footnote-backref:hover {
    color: #145fba;
}

sup a {
    text-decoration: none;
    color: #145fba;
}

sup a:hover {
    text-decoration: underline;
}

/* レスポンシブ */
@media (max-width: 768px) {
    body{
        font-size:0.85em;
    }

    nav ul {
       padding-top:5px; 
    }

    pre {
        padding: 1em !important;
        font-size: 0.85em !important;
    }
    
    .code-filename {
        padding: 0.6em 1em !important;
        font-size: 0.8em !important;
    }
    
    /* テーブルのレスポンシブ対応 */
    .table-wrapper {
        margin: 0.5em; /* 画面端まで拡張 */
        border-radius: 0;
        box-shadow: none;
        border-left: 1px solid #e1e4e8;
        border-right: 1px solid #e1e4e8;
    }
    
    table {
        font-size: 0.8em;
        min-width: 450px; /* モバイルでの最小幅 */
    }
    
    table th,
    table td {
        padding: 0.5em 0.75em;
        min-width: 80px; /* セルの最小幅 */
    }
    
    /* 重要なセルは幅を少し広く */
    table th:first-child,
    table td:first-child {
        min-width: 100px;
        font-weight: 600;
    }
}