* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
    font-family: Roboto, Arial, Helvetica, sans-serif;
    color: #1468a8;
    background: #e7f6ff url("/cskh/bg-cskh-k36.jpg") center / cover no-repeat fixed;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
.cskh-page { max-width: 1180px; margin: 0 auto; padding: 22px 18px 64px; }
.cskh-brand {
    width: min(1080px, 100%);
    min-height: 116px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    background: url("/cskh/bg-header.png") center / 100% 100% no-repeat;
}
.cskh-brand img { display: block; height: 70px; width: auto; max-width: 280px; object-fit: contain; }
.cskh-heading {
    margin: 26px 0 22px;
    text-align: center;
    color: #14a4e2;
    font-size: 38px;
    font-weight: 800;
    letter-spacing: .6px;
}
.cskh-board {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}
.cskh-topics, .cskh-shortcuts { width: calc(50% - 14px); }
.cskh-topics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.cskh-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 168px;
    padding: 10px 6px 12px;
    border: 3px solid #2ed6f7;
    border-radius: 12px;
    background: rgba(255, 255, 255, .42);
    box-shadow: 0 6px 8px rgba(0, 0, 0, .16);
    color: #149fdb;
    cursor: pointer;
    transition: transform .2s ease, border-color .2s ease;
}
.cskh-tile:hover { transform: scale(1.04); }
.cskh-tile.is-on { border-color: #0b6ea8; }
.cskh-tile span {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.15;
}
.cskh-tile img { width: 78%; height: auto; }
.cskh-shortcuts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px 10px;
    padding: 22px 14px 18px;
    border: 3px solid #2ed6f7;
    border-radius: 18px;
    background: rgba(255, 255, 255, .3);
    box-shadow: 0 6px 8px rgba(0, 0, 0, .16);
}
.cskh-shortcuts a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}
.cskh-shortcuts img { width: 78px; height: 78px; object-fit: contain; transition: transform .2s ease; }
.cskh-shortcuts a:hover img { transform: scale(1.08); }
.cskh-shortcuts span {
    min-width: 78px;
    padding: 4px 8px;
    border-radius: 8px;
    background: linear-gradient(90deg, #7fd8f8, #1aa6df);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}
.cskh-access { margin-top: 36px; text-align: center; }
.cskh-access h2 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 0 0 18px;
    color: #14a6e4;
    font-size: 26px;
    font-weight: 800;
}
.cskh-access h2:before, .cskh-access h2:after {
    content: "";
    width: 120px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #14a6e4);
}
.cskh-access h2:after { background: linear-gradient(90deg, #14a6e4, transparent); }
.cskh-access-row { display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; }
.cskh-access-row a {
    min-width: 220px;
    padding: 12px 18px;
    border: 3px solid #fff;
    border-radius: 28px;
    background: linear-gradient(120deg, #36b6ff, #12d4f6);
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .3px;
}
.cskh-access-row a:hover { filter: brightness(1.05); }
.cskh-chat {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 99;
    width: 352px;
    max-width: calc(100vw - 24px);
    height: min(600px, calc(100vh - 32px));
    display: none;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 16px 42px rgba(16, 42, 72, .22);
}
.cskh-chat.is-open { display: flex; }
.cskh-chat header {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    padding: 8px 8px 8px 12px;
    background: linear-gradient(180deg, #1aa7e8, #0b78c4);
    color: #fff;
    cursor: move;
    touch-action: none;
    user-select: none;
}
.cskh-chat-mark {
    height: 28px;
    width: auto;
    max-width: 118px;
    flex: 0 0 auto;
    display: block;
    object-fit: contain;
    object-position: left center;
    background: transparent;
}
.cskh-chat header div { min-width: 0; }
.cskh-chat header strong { display: block; font-size: 15px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cskh-chat header p { margin: 1px 0 0; font-size: 12px; opacity: .92; white-space: nowrap; }
.cskh-chat header button {
    width: 32px;
    height: 32px;
    margin-left: auto;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    touch-action: auto;
}
.cskh-chat header button:hover { background: rgba(255, 255, 255, .16); }
.cskh-gate { flex: 1; overflow: auto; padding: 18px 16px 8px; background: #fff; }
.cskh-gate[hidden], .cskh-chat .log[hidden], .cskh-chat form[hidden] { display: none; }
.cskh-gate label { display: block; margin-bottom: 8px; color: #24364a; font-size: 15px; font-weight: 700; }
.cskh-gate label span { color: #e23b3b; margin-right: 4px; }
.cskh-gate input { width: 100%; border: 1px solid #f0b4b4; border-radius: 8px; padding: 12px; font-size: 14px; }
.cskh-name-error { display: none; margin: 8px 0 0; color: #e23b3b; font-size: 14px; }
.cskh-name-error.is-show { display: block; }
.cskh-remember { margin: 16px 0; color: #e23b4a; font-size: 15px; font-weight: 700; text-align: center; }
.cskh-gate button { display: block; width: 100%; border: 0; border-radius: 8px; padding: 12px; background: #1a73e8; color: #fff; font-size: 16px; font-weight: 700; cursor: pointer; }
.cskh-chat .log { flex: 1; overflow: auto; padding: 12px; background: #f7fbfd; }
.cskh-chat .bubble { max-width: 86%; margin: 0 0 10px; padding: 10px 12px; border-radius: 12px; background: #1296d8; color: #fff; font-size: 14px; line-height: 1.4; white-space: pre-wrap; }
.cskh-chat .bubble.mine { margin-left: auto; background: #e9eef3; color: #24364a; }
.cskh-chat .bubble small { display: block; opacity: .75; font-size: 11px; margin-bottom: 3px; }
#cskh-form {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 8px 10px 10px;
    border-top: 1px solid #e6eef4;
    background: #fff;
}
#cskh-form[hidden] { display: none; }
#cskh-emoji, #cskh-image, #cskh-file {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #5c6b7a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
#cskh-emoji:hover, #cskh-image:hover, #cskh-file:hover { background: #f2f7fb; color: #0b78c4; }
#cskh-emoji svg, #cskh-image svg, #cskh-file svg, #cskh-form button[type="submit"] svg { display: block; width: 20px; height: 20px; }
#cskh-text {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    height: 38px;
    margin: 0;
    border: 1px solid #d7e4ee;
    border-radius: 19px;
    padding: 0 14px;
    background: #f6f9fc;
    color: #24364a;
    font-size: 14px;
    outline: none;
}
#cskh-text:focus { border-color: #1296d8; background: #fff; }
#cskh-form button[type="submit"] {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #1296d8;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
#cskh-form button[type="submit"]:hover { background: #0d84c4; }
#cskh-image-input, #cskh-file-input { display: none; }
.cskh-emoji-box { position: absolute; left: 8px; bottom: calc(100% + 6px); z-index: 2; width: 220px; display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; border-radius: 10px; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.16); }
.cskh-emoji-box[hidden] { display: none; }
.cskh-emoji-box button { width: 32px; height: 32px; border: 0; background: transparent; font-size: 18px; cursor: pointer; }
.cskh-chat .bubble img { display: block; max-width: 100%; border-radius: 8px; margin-top: 4px; }
.cskh-chat .bubble a { color: inherit; font-weight: 700; text-decoration: underline; }
.cskh-chat .official { padding: 6px 12px 10px; color: #7d8b99; font-size: 12px; }
@media (max-width: 980px) {
    .cskh-heading { font-size: 26px; }
    .cskh-board { flex-direction: column; }
    .cskh-topics, .cskh-shortcuts { width: 100%; }
    .cskh-shortcuts img { width: 64px; height: 64px; }
    .cskh-access h2 { font-size: 18px; }
    .cskh-access h2:before, .cskh-access h2:after { width: 36px; }
    .cskh-access-row a { min-width: 0; width: 100%; }
}
