/* STORY-RO NEWS ADMIN */
.nw-admin-layout, .nw-admin-layout * {
    box-sizing: border-box;
}
.nw-admin-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    width: 100%;
}
.nw-admin-sidebar {
    position: sticky;
    top: 20px;
    overflow: hidden;
    border: 1px solid rgba(211, 162, 62, .34);
    border-top: 4px solid #e7aa16;
    border-radius: 15px;
    background: linear-gradient( 145deg, #fffdf7, #fff1c9 );
    box-shadow: 0 10px 24px rgba(115, 74, 8, .08);
}
.nw-admin-sidebar-head {
    padding: 17px;
    border-bottom: 1px solid rgba(211, 162, 62, .24);
}
.nw-admin-sidebar-head span, .nw-admin-sidebar-head strong, .nw-admin-sidebar-head small {
    display: block;
}
.nw-admin-sidebar-head span {
    color: #9b6509;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.2px;
}
.nw-admin-sidebar-head strong {
    margin-top: 3px;
    color: #4c340e;
    font-size: 17px;
    font-weight: 700;
}
.nw-admin-sidebar-head small {
    margin-top: 3px;
    color: #9a8565;
    font-size: 10px;
}
.nw-admin-sidebar-nav {
    display: grid;
    gap: 8px;
    padding: 12px;
}
.nw-admin-sidebar-nav a {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
    min-height: 58px;
    padding: 9px 10px;
    border: 1px solid rgba(175, 130, 49, .15);
    border-radius: 11px;
    background: rgba(255, 255, 255, .68);
    color: #5d4729;
    text-decoration: none !important;
    transition: .18s ease;
}
.nw-admin-sidebar-nav a:hover, .nw-admin-sidebar-nav a.active {
    border-color: rgba(231, 170, 22, .52);
    background: linear-gradient( 135deg, #fffdf4, #ffebb0 );
    transform: translateY(-1px);
}
.nw-admin-sidebar-nav a > i {
    color: #a86f09;
    font-size: 16px;
    text-align: center;
}
.nw-admin-sidebar-nav a span, .nw-admin-sidebar-nav a strong, .nw-admin-sidebar-nav a small {
    display: block;
}
.nw-admin-sidebar-nav a strong {
    color: #4c3b24;
    font-size: 12px;
    font-weight: 700;
}
.nw-admin-sidebar-nav a small {
    margin-top: 2px;
    color: #9b896f;
    font-size: 9px;
}
.nw-admin-sidebar-tip {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 9px;
    margin: 0 12px 12px;
    padding: 11px;
    border-radius: 10px;
    background: rgba(231,170,22,.10);
    color: #72511b;
}
.nw-admin-sidebar-tip > i {
    margin-top: 2px;
    color: #b47a11;
}
.nw-admin-sidebar-tip strong {
    font-size: 10px;
}
.nw-admin-sidebar-tip p {
    margin: 3px 0 0;
    color: #8b7453;
    font-size: 9px;
    line-height: 1.5;
}
.nw-admin-main {
    min-width: 0;
}
.nw-form {
    display: grid;
    gap: 15px;
    width: 100%;
}
.nw-panel {
    padding: 18px;
    border: 1px solid rgba(211, 162, 62, .28);
    border-radius: 14px;
    background: #fffdf8;
    box-shadow: 0 8px 22px rgba(100, 66, 10, .05);
}
.nw-panel-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 11px;
    border-bottom: 1px solid rgba(211,162,62,.24);
}
.nw-panel-title span {
    display: block;
    color: #9c680e;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1.1px;
}
.nw-panel-title h3 {
    margin: 2px 0 0;
    color: #483217;
    font-size: 17px;
    font-weight: 700;
}
.nw-panel-title > i {
    color: rgba(177,118,15,.26);
    font-size: 25px;
}
.nw-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 13px;
}
.nw-grid label {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: #5a4326;
    font-size: 11px;
    font-weight: 600;
}
.nw-grid label.full {
    grid-column: 1 / -1;
}
.nw-grid input, .nw-grid select, .nw-grid textarea, .nw-thumbnail-fields input {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid #decfb6;
    border-radius: 9px;
    outline: 0;
    background: #fff;
    color: #44331f;
    font-family: "Kanit", sans-serif;
    font-size: 11px;
}
.nw-grid textarea {
    min-height: 85px;
    resize: vertical;
}
.nw-grid input:focus, .nw-grid select:focus, .nw-grid textarea:focus, .nw-thumbnail-fields input:focus {
    border-color: #dfa40d;
    box-shadow: 0 0 0 3px rgba(223,164,13,.10);
}
.nw-featured-check {
    display: flex !important;
    grid-template-columns: none !important;
    flex-direction: row;
    align-items: center;
    align-self: end;
    gap: 9px !important;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid #e4d6be;
    border-radius: 9px;
    background: #fffaf0;
}
.nw-featured-check input {
    width: 17px;
    min-height: auto;
    height: 17px;
    padding: 0;
}
.nw-featured-check span, .nw-featured-check strong, .nw-featured-check small {
    display: block;
}
.nw-featured-check strong {
    font-size: 11px;
}
.nw-featured-check small {
    color: #9a876a;
    font-size: 9px;
}
.nw-thumbnail-box {
    display: grid;
    grid-template-columns: minmax(0,1fr) 240px;
    gap: 16px;
    align-items: start;
}
.nw-thumbnail-fields {
    display: grid;
    gap: 10px;
}
.nw-thumbnail-fields label {
    display: grid;
    gap: 6px;
    color: #5a4326;
    font-size: 11px;
    font-weight: 600;
}
.nw-thumbnail-upload {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 8px;
    align-items: center;
}
.nw-thumbnail-upload input[type=file] {
    width: 100%;
    min-width: 0;
    font-size: 10px;
}
.nw-help {
    color: #9c896d;
    font-size: 9px;
}
.nw-thumbnail-preview-wrap {
    overflow: hidden;
    min-height: 135px;
    border: 1px dashed rgba(181,127,28,.34);
    border-radius: 11px;
    background: #fff9e9;
}
.nw-thumbnail-preview {
    display: block;
    width: 100%;
    height: 150px;
    object-fit: cover;
}
.nw-thumbnail-placeholder {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 7px;
    min-height: 150px;
    color: #b2935d;
    font-size: 10px;
}
.nw-thumbnail-placeholder i {
    font-size: 28px;
    opacity: .55;
}
.nw-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid #dfd0b7;
    border-radius: 8px;
    background: #fff;
    color: #67491d;
    font-family: "Kanit", sans-serif;
    font-size: 10px;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
}
.nw-btn:hover {
    background: #fff8e5;
    color: #503815;
}
.nw-btn.primary {
    border-color: #e5a800;
    background: linear-gradient( 135deg, #efb814, #dc9900 );
    color: #fff;
}
.nw-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    padding: 9px;
    border: 1px solid #dfd2bd;
    border-radius: 9px 9px 0 0;
    background: #fff8e8;
}
.nw-toolbar button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 31px;
    padding: 0 10px;
    border: 1px solid #ded0b8;
    border-radius: 7px;
    background: #fff;
    color: #62471f;
    font-family: "Kanit", sans-serif;
    font-size: 10px;
    cursor: pointer;
}
.nw-toolbar button:hover {
    border-color: #dfa50e;
    background: #fff3ce;
}
.nw-toolbar-tip {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    margin-left: auto;
    color: #9b8260;
    font-size: 9px;
}
.nw-editor {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    min-height: 560px;
    overflow: hidden;
    border: 1px solid #dfd2bd;
    border-top: 0;
    border-radius: 0 0 10px 10px;
    background: #fff;
}
.nw-editor-pane, .nw-preview-pane {
    min-width: 0;
}
.nw-editor-pane {
    border-right: 1px solid #dfd2bd;
}
.nw-editor-label {
    padding: 7px 11px;
    border-bottom: 1px solid #ebe2d3;
    background: #fffdf7;
    color: #a07732;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1px;
}
#newsMarkdown {
    display: block;
    width: 100%;
    min-height: 510px;
    padding: 15px;
    border: 0;
    outline: 0;
    resize: vertical;
    background: #fff;
    color: #3c3328;
    font-family: Consolas, Monaco, monospace;
    font-size: 12px;
    line-height: 1.7;
}
#newsMarkdown.dragging {
    background: #fff6d6;
    box-shadow: inset 0 0 0 3px rgba(231,170,22,.25);
}
.nw-preview {
    min-height: 510px;
    padding: 18px;
    overflow: auto;
    color: #413426;
    font-size: 12px;
    line-height: 1.75;
}
.nw-preview h1, .nw-preview h2, .nw-preview h3, .nw-preview h4 {
    color: #553a11;
    font-family: "Kanit", sans-serif;
    font-weight: 700;
    line-height: 1.4;
}
.nw-preview img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 15px 0;            /* [FIX] รูปในเนื้อหาชิดซ้าย (เดิม auto = กึ่งกลาง) */
    border-radius: 9px;
}
/* รูปปกข่าว (รูปแรกที่อยู่นอกเนื้อหา) ยังอยู่กึ่งกลางเหมือนเดิม */
.story-news-view-content > img {
    margin-left: auto;
    margin-right: auto;
}
.nw-preview blockquote {
    margin: 12px 0;
    padding: 10px 12px;
    border-left: 4px solid #dfa812;
    background: #fff8e4;
}
.nw-preview a {
    color: #a66900;
    text-decoration: underline;
}
.nw-table-wrap {
    overflow: auto;
    margin: 13px 0;
}
.nw-md-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}
.nw-md-table th, .nw-md-table td {
    padding: 8px 9px;
    border: 1px solid #ddd0bc;
    text-align: left;
    vertical-align: top;
}
.nw-md-table th {
    background: #fff1c8;
    color: #61420d;
    font-weight: 700;
}
.nw-upload-status {
    min-height: 24px;
    padding: 4px 10px;
    color: #9a8464;
    font-size: 9px;
}
.nw-upload-status.is-loading {
    color: #967000;
}
.nw-upload-status.is-success {
    color: #25804d;
}
.nw-upload-status.is-error, .nw-preview-error {
    color: #b23d31;
}
.nw-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 1px;
}
@media (max-width: 1050px) {
    .nw-admin-layout {
        grid-template-columns: 1fr;
    }
    .nw-admin-sidebar {
        position: static;
    }
    .nw-admin-sidebar-nav {
        grid-template-columns: repeat(3,minmax(0,1fr));
    }
}
@media (max-width: 760px) {
    .nw-grid, .nw-thumbnail-box, .nw-editor {
        grid-template-columns: 1fr;
    }
    .nw-grid label.full {
        grid-column: auto;
    }
    .nw-editor-pane {
        border-right: 0;
        border-bottom: 1px solid #dfd2bd;
    }
    .nw-thumbnail-upload {
        grid-template-columns: 1fr;
    }
    .nw-admin-sidebar-nav {
        grid-template-columns: 1fr;
    }
    .nw-toolbar-tip {
        width: 100%;
        margin-left: 0;
    }
}
/* =========================================================
   STORY-RO ABSOLUTE FINAL — PUBLIC/EDITOR CONTAINMENT
   This block must stay LAST.
   ========================================================= */
/* PUBLIC NEWS VIEW */
.story-news-view-page {
    width: 100%;
    min-height: 700px;
    padding: 60px 18px;
    background: #160909;
    overflow-x: hidden;
    box-sizing: border-box;
}
.story-news-view-shell {
    width: 100%;
    max-width: 1100px;
    min-width: 0;
    margin: 0 auto;
    box-sizing: border-box;
}
.story-news-view-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    padding: 34px;
    border-radius: 16px;
    background: #fffaf0;
    box-sizing: border-box;
}
.story-news-view-header, .story-news-view-content {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.story-news-view-thumbnail {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    margin: 18px 0;
    box-sizing: border-box;
}
.story-news-view-thumbnail img, .story-news-view-content img, .story-news-view-card img {
    display: block !important;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 16px auto !important;
    object-fit: contain !important;
    box-sizing: border-box !important;
}
/* Content cannot push outside article */
.story-news-view-content, .story-news-view-content * {
    max-width: 100%;
    box-sizing: border-box;
}
.story-news-view-content p, .story-news-view-content div, .story-news-view-content a, .story-news-view-content code, .story-news-view-content pre, .story-news-view-content blockquote {
    overflow-wrap: anywhere;
    word-break: break-word;
}
/* TABLE: same look in live preview AND published article */
.nw-table-wrap, .story-news-view-content .nw-table-wrap {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    margin: 16px 0 !important;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}
.nw-md-table, .story-news-view-content .nw-md-table {
    width: 100% !important;
    min-width: 640px !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    table-layout: auto !important;
    background: #fff !important;
}
.nw-md-table th, .nw-md-table td, .story-news-view-content .nw-md-table th, .story-news-view-content .nw-md-table td {
    border: 1px solid #d8c6a7 !important;
    padding: 8px 10px !important;
    background: #fff !important;
    vertical-align: top !important;
}
.nw-md-table th, .story-news-view-content .nw-md-table th {
    background: #fff0c7 !important;
    color: #563a0f !important;
    font-weight: 700 !important;
}
.nw-md-table tbody tr:nth-child(even) td, .story-news-view-content .nw-md-table tbody tr:nth-child(even) td {
    background: #fffaf0 !important;
}
/* ADMIN EDITOR: Markdown first, Live Preview below, never overflow */
.nw-admin-main, .nw-form, .nw-panel, .nw-editor, .nw-editor-pane, .nw-preview-pane, .nw-preview {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}
.nw-editor {
    display: block !important;
    width: 100% !important;
    overflow: hidden !important;
}
.nw-editor-pane, .nw-preview-pane {
    display: block !important;
    width: 100% !important;
    overflow: hidden !important;
    border-right: 0 !important;
}
.nw-editor-pane {
    border-bottom: 1px solid #dfd2bd !important;
}
#newsMarkdown {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 430px !important;
    box-sizing: border-box !important;
    resize: vertical !important;
    white-space: pre-wrap !important;
    overflow-x: auto !important;
    overflow-wrap: anywhere !important;
}
.nw-preview {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 260px !important;
    padding: 22px !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
}
.nw-preview > * {
    max-width: 100%;
    box-sizing: border-box;
}
.nw-preview img {
    display: block !important;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 16px auto !important;
    object-fit: contain !important;
}
/* Only tables may scroll horizontally inside preview */
.nw-preview .nw-table-wrap {
    overflow-x: auto !important;
}
/* Page itself must never gain horizontal overflow from editor content */
.story-member-page, .story-member-shell, .story-member-content, .story-member-tab {
    min-width: 0 !important;
    max-width: 100% !important;
}
@media (max-width: 760px) {
    .story-news-view-page {
        padding: 28px 10px;
    }
    .story-news-view-card {
        padding: 18px;
    }
}
/* =========================================================
   STORY-RO NEWS VIEW — HEADER > THUMBNAIL > CONTENT
   Keep this block LAST.
   ========================================================= */
.story-news-view-page {
    width: 100%;
    min-height: 700px;
    padding: 58px 18px 64px;
    overflow-x: hidden;
    background: #160909;
    box-sizing: border-box;
}
.story-news-view-shell {
    display: grid;
    gap: 22px;
    width: 100%;
    max-width: 1100px;
    min-width: 0;
    margin: 0 auto;
    box-sizing: border-box;
}
.story-news-hero-block, .story-news-section-block {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(218, 169, 61, .30);
    border-radius: 18px;
    background: #fffaf0;
    box-sizing: border-box;
}
.story-news-hero-block {
    min-height: 190px;
    padding: 38px 40px;
    background: linear-gradient( 105deg, #fffaf0 0%, #fff8e7 58%, #ffe9a9 100% );
}
.story-news-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 780px;
}
.story-news-hero-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 13px;
    border-radius: 999px;
    background: rgba(210, 151, 24, .13);
    color: #8a5708;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.1px;
}
.story-news-hero-block h1 {
    margin: 15px 0 5px !important;
    color: #5a3508 !important;
    font-size: clamp(30px, 4vw, 48px) !important;
    line-height: 1.15 !important;
    font-weight: 700 !important;
    overflow-wrap: anywhere;
}
.story-news-hero-description {
    margin: 9px 0 0 !important;
    color: #967044 !important;
    font-size: 17px !important;
    line-height: 1.65 !important;
    overflow-wrap: anywhere;
}
.story-news-hero-decoration {
    position: absolute;
    border: 1px solid rgba(208, 150, 26, .22);
    border-radius: 50%;
    pointer-events: none;
}
.story-news-hero-decoration-a {
    width: 250px;
    height: 250px;
    top: -132px;
    right: -70px;
}
.story-news-hero-decoration-b {
    width: 150px;
    height: 150px;
    right: 75px;
    bottom: -100px;
}
.story-news-section-block {
    padding: 28px;
}
.story-news-block-heading {
    margin-bottom: 18px;
    padding-bottom: 13px;
    border-bottom: 1px solid rgba(211, 162, 62, .24);
}
.story-news-block-heading span {
    display: block;
    color: #9c680e;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.2px;
}
.story-news-block-heading h2 {
    margin: 3px 0 0 !important;
    color: #4b3212 !important;
    font-size: 24px !important;
    line-height: 1.3 !important;
}
.story-news-thumbnail-frame {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #f7f0e2;
    box-sizing: border-box;
}
.story-news-thumbnail-frame img {
    display: block !important;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 760px !important;
    margin: 0 auto !important;
    object-fit: contain !important;
    box-sizing: border-box !important;
}
.story-news-content-block, .story-news-view-content {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.story-news-view-content {
    padding: 0 !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
    background: transparent !important;
}
.story-news-view-content > * {
    max-width: 100%;
    box-sizing: border-box;
}
.story-news-view-content img {
    display: block !important;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 18px auto !important;
    object-fit: contain !important;
    box-sizing: border-box !important;
}
.story-news-view-content p, .story-news-view-content div, .story-news-view-content a, .story-news-view-content code, .story-news-view-content pre, .story-news-view-content blockquote {
    overflow-wrap: anywhere;
    word-break: break-word;
}
/* Published tables use the exact same visual language as Live Preview */
.story-news-view-content .nw-table-wrap {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    margin: 18px 0 !important;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}
.story-news-view-content .nw-md-table {
    width: 100% !important;
    min-width: 640px !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    table-layout: auto !important;
    background: #fff !important;
}
.story-news-view-content .nw-md-table th, .story-news-view-content .nw-md-table td {
    border: 1px solid #d8c6a7 !important;
    padding: 8px 10px !important;
    background: #fff !important;
    vertical-align: top !important;
}
.story-news-view-content .nw-md-table th {
    background: #fff0c7 !important;
    color: #563a0f !important;
    font-weight: 700 !important;
}
.story-news-view-content .nw-md-table tbody tr:nth-child(even) td {
    background: #fffaf0 !important;
}
@media (max-width: 760px) {
    .story-news-view-page {
        padding: 28px 10px 38px;
    }
    .story-news-view-shell {
        gap: 14px;
    }
    .story-news-hero-block {
        min-height: 160px;
        padding: 26px 22px;
        border-radius: 14px;
    }
    .story-news-section-block {
        padding: 18px;
        border-radius: 14px;
    }
    .story-news-hero-description {
        font-size: 14px !important;
    }
}
/* =========================================================
   STORY-RO FINAL NEWS VIEW TYPOGRAPHY
   Keep this block LAST.
   ========================================================= */
.story-news-hero-badge, .story-news-block-heading span {
    font-family: "Kanit", sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: 1.15px !important;
}
.story-news-hero-block h1 {
    font-family: "Kanit", sans-serif !important;
    font-weight: 400 !important;
    letter-spacing: 0 !important;
}
.story-news-hero-description {
    font-family: "Kanit", sans-serif !important;
    font-weight: 300 !important;
}
.story-news-block-heading h2 {
    font-family: "Kanit", sans-serif !important;
    font-weight: 400 !important;
    letter-spacing: 0 !important;
}
.story-news-view-content, .story-news-view-content p, .story-news-view-content li, .story-news-view-content td, .story-news-view-content th {
    font-family: "Kanit", sans-serif !important;
}
/* =========================================================
   STORY-RO NEWS VIEW TYPOGRAPHY — FINAL
   ========================================================= */
.story-news-hero-badge, .story-news-block-heading span {
    font-family: "Kanit", sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: 1.15px !important;
}
.story-news-hero-block h1, .story-news-block-heading h2 {
    font-family: "Kanit", sans-serif !important;
    font-weight: 400 !important;
    letter-spacing: 0 !important;
}
.story-news-hero-description, .story-news-view-content, .story-news-view-content p, .story-news-view-content li, .story-news-view-content td, .story-news-view-content th {
    font-family: "Kanit", sans-serif !important;
}

/* News/quest editor toolbar extension. Never applied to Refine. */
.nw-toolbar-extended{background:#f3faff;border:1px solid #cfe6f6;border-radius:11px 11px 0 0;gap:7px;padding:12px}
.nw-toolbar-extended button,.nw-toolbar-extended select{border:1px solid #b9daf1;border-radius:6px;background:#fff;color:#24618c;font:inherit;font-size:12px;min-height:32px;padding:5px 10px;cursor:pointer}
.nw-toolbar-extended button:hover{background:#e5f4ff;border-color:#83b7df}
.nw-toolbar-extended .nw-toolbar-break{flex-basis:100%;height:0}
.nw-toolbar-extended .nw-icon-row{display:flex;gap:5px;flex-wrap:wrap}
.nw-toolbar-extended .nw-icon-row button{font-size:17px;padding:4px 7px}
.nw-toolbar-extended .nw-color-tool,.nw-toolbar-extended .nw-select-tool{display:inline-flex;align-items:center;gap:5px;font-size:12px;color:#37678b}
.nw-toolbar-extended input[type=color]{width:25px;height:25px;padding:1px;border:1px solid #b9daf1;border-radius:4px}
.nw-toolbar-extended .nw-toolbar-tip{flex-basis:100%;margin-left:0;font-size:11px;color:#688da6}

/* STORY-RO cream/gold toolbar: news & quest only; does not affect Refine. */
.nw-toolbar-extended{
  background:#fff8e9 !important;
  border:1px solid #ead5ae !important;
  box-shadow:0 2px 10px rgba(133,88,26,.035);
}
.nw-toolbar-extended button,
.nw-toolbar-extended select{
  background:#fffdf8 !important;
  border-color:#e4cba2 !important;
  color:#754b16 !important;
}
.nw-toolbar-extended button:hover,
.nw-toolbar-extended select:hover{
  background:#ffefc8 !important;
  border-color:#d7a44a !important;
  color:#60390b !important;
}
.nw-toolbar-extended button:focus-visible,
.nw-toolbar-extended select:focus-visible,
.nw-toolbar-extended input[type=color]:focus-visible{
  outline:2px solid #dca63c !important;
  outline-offset:2px;
}
.nw-toolbar-extended .nw-color-tool,
.nw-toolbar-extended .nw-select-tool,
.nw-toolbar-extended .nw-toolbar-tip{
  color:#966d38 !important;
}
.nw-toolbar-extended input[type=color]{
  border-color:#e4cba2 !important;
  background:#fffdf8 !important;
}

/* [FIX] รูปที่แทรกในเนื้อหาข่าว / Quest ให้ชิดซ้าย (กฎด้านบนหลายจุดใช้ margin:auto !important ทำให้อยู่กึ่งกลาง)
   รูปปกข่าว (รูปที่อยู่นอกเนื้อหา) ยังอยู่กึ่งกลางเหมือนเดิม */
.story-news-view-content p img,
.story-news-view-content li img,
.story-news-view-content blockquote img,
.nw-preview p img,
.nw-preview li img,
.nw-preview blockquote img {
    margin-left: 0 !important;
    margin-right: auto !important;
}

/* [NEW] จัดตำแหน่งด้วยปุ่ม ☰ ชิดซ้าย / ☷ กึ่งกลาง (:::left ... ::: / :::center ... :::) ใช้ได้ทั้งข้อความและรูป */
.nw-align-left { text-align: left; }
.nw-align-center { text-align: center; }
.nw-align-right { text-align: right; }
.story-news-view-content .nw-align-left img, .nw-preview .nw-align-left img, .qs-content .nw-align-left img {
    margin-left: 0 !important; margin-right: auto !important;
}
.story-news-view-content .nw-align-center img, .nw-preview .nw-align-center img, .qs-content .nw-align-center img {
    margin-left: auto !important; margin-right: auto !important;
}
.story-news-view-content .nw-align-right img, .nw-preview .nw-align-right img, .qs-content .nw-align-right img {
    margin-left: auto !important; margin-right: 0 !important;
}

/* [NEW] รูปในบรรทัดเดียวกับข้อความ (ไอคอนไอเทม + ชื่อ) และขนาดรูป ![ชื่อ|32](url) */
.story-news-view-content img.nw-inline-img, .nw-preview img.nw-inline-img, .qs-content img.nw-inline-img {
    display: inline-block !important;
    vertical-align: middle !important;
    margin: 0 8px 0 0 !important;
    border-radius: 0 !important;
}
.story-news-view-content img.nw-inline-img:not([style]), .nw-preview img.nw-inline-img:not([style]), .qs-content img.nw-inline-img:not([style]) {
    max-height: 64px !important;
}
.story-news-view-content p.nw-has-icon, .nw-preview p.nw-has-icon, .qs-content p.nw-has-icon {
    margin: 6px 0 !important;
    line-height: 1.6;
}

.story-news-view-content td img.nw-inline-img, .nw-preview td img.nw-inline-img, .qs-content td img.nw-inline-img { margin: 0 6px 0 0 !important; }
