﻿:root {
    --ys-green: #1f9d6b;
    --ys-green-deep: #12704b;
    --ys-green-ink: #0f3d2e;
    --ys-orange: #f08a24;
    --ys-orange-deep: #c9601a;
    --ys-text: #1c2b27;
    --ys-muted: #5d6f69;
    --ys-line: rgba(28, 43, 39, .12);
    --ys-glass: rgba(255, 255, 255, .6);
    --ys-glass-strong: rgba(255, 255, 255, .66);
    --ys-ease: cubic-bezier(.22, 1, .36, 1);
    --ys-tile: clamp(96px, 11.5vw, 184px);
}

.ys-body {
    margin: 0;
    font-family: 'Anuphan', system-ui, sans-serif;
    background: #f5f7f7;
    color: var(--ys-text);
    overflow-x: hidden;
}

.ys-main {
    position: relative;
    min-height: 100vh;
    padding: 104px 28px 24px;
    overflow: hidden;
    overflow: clip;
    isolation: isolate;
}

.ys-nowrap { white-space: nowrap; }

/* ── ฉากหลังขาวขุ่น ── */
.ys-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, #f9fbfb 0%, #f4f7f7 100%);
}

.ys-glow {
    position: absolute;
    border-radius: 50%;
    will-change: transform, opacity;
}

.ys-glow-a {
    width: 70vw;
    height: 70vw;
    max-width: 1100px;
    max-height: 1100px;
    right: -8vw;
    top: -25vw;
    background: radial-gradient(closest-side, rgba(30, 255, 140, .72), rgba(100, 255, 190, .34) 55%, rgba(255, 255, 255, 0));
    animation: ysGlow 14s ease-in-out infinite alternate;
}

.ys-glow-b {
    width: 50vw;
    height: 50vw;
    max-width: 800px;
    max-height: 800px;
    left: -12vw;
    bottom: -15vw;
    background: radial-gradient(closest-side, rgba(50, 255, 170, .46), rgba(255, 255, 255, 0));
    animation: ysGlow 18s ease-in-out infinite alternate-reverse;
}

@keyframes ysGlow {
    from { transform: translate3d(0, 0, 0) scale(1); opacity: .85; }
    to { transform: translate3d(-2vw, 2vh, 0) scale(1.08); opacity: 1; }
}

.ys-tiles {
    position: absolute;
    top: 0;
    right: 0;
    display: grid;
    grid-template-columns: repeat(6, var(--ys-tile));
    grid-auto-rows: var(--ys-tile);
    gap: 0;
    opacity: .45;
    filter: blur(44px);
    -webkit-mask-image: radial-gradient(120% 110% at 85% 10%, #000 30%, transparent 78%);
    mask-image: radial-gradient(120% 110% at 85% 10%, #000 30%, transparent 78%);
}

.ys-tiles span { background: linear-gradient(135deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, .1)); }
.ys-tiles span:nth-child(3n) { background: linear-gradient(135deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, .04)); }
.ys-tiles span:nth-child(4n + 1) { background: linear-gradient(135deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, .22)); }

.ys-lines { display: none; }

.ys-confetti {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 90;
}

.ys-glass {
    background: var(--ys-glass);
}

/* ── การปรากฏแบบนุ่มนวล ── */
.ys-reveal {
    opacity: 0;
    animation: ysReveal .9s var(--ys-ease) forwards;
}

.ys-reveal[data-delay="1"] { animation-delay: .08s; }
.ys-reveal[data-delay="2"] { animation-delay: .16s; }
.ys-reveal[data-delay="3"] { animation-delay: .26s; }

@keyframes ysReveal {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

/* ── เวที: เริ่มต้นกึ่งกลาง แล้วแยกสองคอลัมน์เมื่อค้นหา ── */
.ys-stage {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 128px);
    padding-bottom: 9vh;
}

.is-searched .ys-stage { padding-bottom: 0; }

.ys-shell {
    width: 100%;
    max-width: 1180px;
    margin: auto;
    display: grid;
    grid-template-columns: minmax(0, 560px);
    justify-content: center;
    align-items: center;
    gap: 40px;
}

.ys-result { display: none; }

.is-searched .ys-shell { grid-template-columns: minmax(0, 560px) minmax(0, 1fr); justify-content: stretch; }

.is-searched .ys-result {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-margin-top: 104px;
}

.ys-hero { min-width: 0; text-align: center; }
.ys-hero .ys-hint { justify-content: center; }

@media (min-width: 961px) {
    .is-searched .ys-hero { text-align: left; }
    .is-searched .ys-hero .ys-hint { justify-content: flex-start; }
}

.ys-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 14px;
    padding: 5px 13px;
    border-radius: 999px;
    background: var(--ys-glass);
    color: var(--ys-green-deep);
    font-size: 12.5px;
    font-weight: 600;
}

.ys-eyebrow svg { width: 15px; height: 15px; }

.ys-title {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.22;
}

.ys-title-sm {
    font-size: clamp(17px, 1.7vw, 23px);
    font-weight: 500;
    color: var(--ys-green-ink);
}

.ys-title-lg {
    font-size: clamp(30px, 3.5vw, 50px);
    font-weight: 700;
    letter-spacing: -.01em;
    padding: 2px 0 4px;
    background: linear-gradient(100deg, var(--ys-green-deep) 0%, var(--ys-green) 45%, #2cc7a0 70%, var(--ys-orange) 108%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.ys-title-en {
    font-size: clamp(12px, 1.05vw, 14.5px);
    font-weight: 600;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--ys-orange-deep);
}

.ys-sub {
    margin: 12px 0 0;
    font-size: clamp(14px, 1.15vw, 16px);
    line-height: 1.65;
    color: var(--ys-muted);
}

/* ── กล่องค้นหา ── */
.ys-search {
    margin: 22px 0 0;
    padding: 16px 16px 12px;
    border-radius: 22px;
}

.ys-search-label {
    display: block;
    margin-bottom: 9px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ys-green-ink);
}

.ys-search-box {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 5px 5px 44px;
    border-radius: 15px;
    background: #fff;
    border: 1px solid rgba(31, 157, 107, .16);
    box-shadow: 0 0 0 5px rgba(31, 157, 107, .09);
}

.ys-search-icon {
    position: absolute;
    left: 14px;
    width: 19px;
    height: 19px;
    color: var(--ys-green);
}

.ys-search-box input {
    flex: 1;
    min-width: 0;
    height: 44px;
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    font-size: 16px;
    color: var(--ys-text);
}

.ys-search-box input::placeholder { color: #98a5a0; }

.ys-btn {
    position: relative;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 44px;
    padding: 0 18px 0 20px;
    border: 0;
    border-radius: 11px;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #27ad77, var(--ys-green-deep));
    transition: transform .35s var(--ys-ease), box-shadow .35s var(--ys-ease), filter .35s;
}

.ys-btn svg { width: 17px; height: 17px; }
.ys-btn-arrow { transition: transform .35s var(--ys-ease); }
.ys-btn:hover { transform: translateY(-1px); }
.ys-btn:hover .ys-btn-arrow { transform: translateX(3px); }
.ys-btn:active { transform: translateY(0); }
.ys-btn:focus-visible { outline: 3px solid var(--ys-orange); outline-offset: 2px; }
.ys-btn[disabled] { cursor: progress; filter: saturate(.8); }

.ys-spinner { display: none; animation: ysSpin .9s linear infinite; }
.ys-btn.is-loading .ys-btn-arrow { display: none; }
.ys-btn.is-loading .ys-spinner { display: block; }

@keyframes ysSpin { to { transform: rotate(360deg); } }

.ys-hint {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 9px 2px 0;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--ys-muted);
}

.ys-hint svg { width: 14px; height: 14px; margin-top: 2px; flex-shrink: 0; color: var(--ys-orange-deep); }

/* ── แจ้งเตือนใต้กล่องค้นหา ── */
.ys-alert { text-align: left; }
.ys-alert:not(:empty) { margin-top: 12px; }

.ys-alert .ys-note {
    padding: 14px 16px;
    background: rgba(255, 238, 220, .85);
    transform-origin: 50% 0;
    animation: ysDrop .32s cubic-bezier(.3, 1.45, .5, 1) both;
}

@keyframes ysDrop {
    from { opacity: 0; transform: translateY(-26px) scale(.97); }
    to { opacity: 1; transform: none; }
}

/* ── ผลลัพธ์ ── */
.ys-count {
    margin: 0;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ys-green-ink);
}

.ys-note {
    display: flex;
    gap: 13px;
    align-items: flex-start;
    padding: 18px;
    border-radius: 20px;
    animation: ysPanel .8s .2s var(--ys-ease) both;
}

.ys-note-icon {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: rgba(240, 138, 36, .14);
    color: var(--ys-orange-deep);
}

.ys-note-icon svg { width: 21px; height: 21px; }
.ys-note h2 { margin: 0 0 2px; font-size: 16.5px; font-weight: 700; color: var(--ys-green-ink); }
.ys-note p { margin: 0; font-size: 14px; line-height: 1.65; color: var(--ys-muted); }

.ys-card {
    border-radius: 24px;
    overflow: hidden;
    background: var(--ys-glass-strong);
    animation: ysPanel .9s .2s var(--ys-ease) both;
}

@keyframes ysPanel {
    from { opacity: 0; transform: translateX(36px) scale(.98); }
    to { opacity: 1; transform: none; }
}

.ys-card-head {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
}

.ys-card.is-pass .ys-card-head {
    background: rgba(31, 157, 107, .1);
    color: var(--ys-green-deep);
}

.ys-card.is-fail .ys-card-head,
.ys-card.is-absent .ys-card-head {
    background: rgba(240, 138, 36, .08);
    color: var(--ys-orange-deep);
}

.ys-seal {
    position: relative;
    flex-shrink: 0;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .7);
    opacity: 0;
    animation: ysSeal .9s .5s var(--ys-ease) forwards;
}

.ys-seal::after {
    content: "";
    position: absolute;
    inset: -7px;
    border-radius: 50%;
    background: currentColor;
    animation: ysHalo 3.6s ease-in-out infinite;
}

.ys-seal svg { width: 29px; height: 29px; }

@keyframes ysSeal {
    from { opacity: 0; transform: scale(.82); }
    to { opacity: 1; transform: none; }
}

@keyframes ysHalo {
    0%, 100% { opacity: .14; transform: scale(1); }
    50% { opacity: 0; transform: scale(1.16); }
}

.ys-head-text { position: relative; min-width: 0; }

.ys-head-kicker {
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .26em;
    text-transform: uppercase;
    color: var(--ys-muted);
}

.ys-head-title {
    margin: 0;
    font-size: clamp(21px, 2.1vw, 27px);
    font-weight: 700;
    line-height: 1.3;
}

.ys-head-msg {
    margin: 2px 0 0;
    font-size: 13.5px;
    line-height: 1.55;
    color: #3a4a45;
}

.ys-card-body { padding: 16px 22px 18px; }

.ys-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.ys-who { min-width: 0; }

.ys-label {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .05em;
    color: var(--ys-muted);
}

.ys-label svg { width: 13px; height: 13px; color: var(--ys-orange-deep); }

.ys-who-name {
    margin: 1px 0 3px;
    font-size: clamp(18px, 1.7vw, 22px);
    font-weight: 700;
    line-height: 1.3;
    word-break: break-word;
}

.ys-who-school {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 14px;
    color: #3f504a;
}

.ys-who-school svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--ys-orange-deep); }

.ys-stamp {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px 8px 11px;
    border-radius: 13px;
    background: rgba(255, 255, 255, .7);
    opacity: 0;
    animation: ysStamp .8s .75s var(--ys-ease) forwards;
}

.is-pass .ys-stamp { color: var(--ys-green-deep); }
.is-fail .ys-stamp, .is-absent .ys-stamp { color: var(--ys-orange-deep); }

.ys-stamp svg { width: 22px; height: 22px; flex-shrink: 0; }

.ys-stamp-main {
    display: block;
    font-size: 15.5px;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
}

.ys-stamp-sub {
    display: block;
    font-size: 10.5px;
    font-weight: 500;
    opacity: .8;
    white-space: nowrap;
}

@keyframes ysStamp {
    from { opacity: 0; transform: scale(1.06); }
    to { opacity: 1; transform: none; }
}

.ys-perf {
    margin: 14px 0;
    border-top: 1px dashed var(--ys-line);
}

.ys-facts {
    display: grid;
    grid-template-columns: 1.25fr 1.35fr .7fr;
    margin: 0;
}

.ys-fact {
    padding: 0 14px;
    border-left: 1px solid var(--ys-line);
    opacity: 0;
    animation: ysReveal .7s var(--ys-ease) forwards;
}

.ys-fact:first-child { padding-left: 0; border-left: 0; }
.ys-fact:last-child { padding-right: 0; }

.ys-fact dd {
    margin: 2px 0 0;
    font-size: 17px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: .02em;
    white-space: nowrap;
}

.ys-foot {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 15px;
    font-size: 13.8px;
    line-height: 1.65;
    opacity: 0;
    animation: ysReveal .8s 1s var(--ys-ease) forwards;
}

.ys-foot > svg { width: 19px; height: 19px; margin-top: 2px; flex-shrink: 0; }
.is-pass .ys-foot { background: rgba(31, 157, 107, .1); color: #0f4d36; }
.is-fail .ys-foot, .is-absent .ys-foot { background: rgba(240, 138, 36, .1); color: #5e3410; }

.ys-foot strong { font-weight: 700; }

.ys-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 9px;
}

.ys-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .85);
    color: #5e3410;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: transform .35s var(--ys-ease), box-shadow .35s var(--ys-ease), background .35s;
}

.ys-link:hover { transform: translateY(-1px); background: #fff; }
.ys-link svg { width: 14px; height: 14px; }

/* ── ปุ่มเลื่อนลงดูประกาศ ── */
.ys-more[hidden], .ys-info[hidden] { display: none; }

.ys-more {
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    padding: 7px 14px 7px 16px;
    border-radius: 999px;
    background: var(--ys-glass);
    color: var(--ys-green-deep);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    animation: ysReveal .8s 1.2s var(--ys-ease) both;
}

.ys-more svg { width: 16px; height: 16px; animation: ysNudge 2.2s ease-in-out infinite; }

@keyframes ysNudge {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}

/* ── รายละเอียดประกาศ ── */
.ys-info {
    max-width: 1180px;
    margin: 28px auto 0;
    padding-bottom: 24px;
    scroll-margin-top: 104px;
    animation: ysReveal .9s .6s var(--ys-ease) both;
}

.ys-info-head { margin-bottom: 14px; }

.ys-info-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ys-orange-deep);
}

.ys-info-kicker svg { width: 16px; height: 16px; }

.ys-info-head h2 {
    margin: 0;
    font-size: clamp(18px, 1.8vw, 23px);
    font-weight: 700;
    line-height: 1.4;
    color: var(--ys-green-ink);
}

.ys-info-head > p:last-child { margin: 2px 0 0; font-size: 14.5px; color: var(--ys-muted); }

.ys-meta {
    display: grid;
    grid-template-columns: 1.5fr 1.5fr 1fr 1fr .8fr;
    margin: 0 0 14px;
    padding: 14px 6px;
    border-radius: 20px;
}

.ys-meta > div { padding: 0 14px; border-left: 1px solid var(--ys-line); }
.ys-meta > div:first-child { border-left: 0; }

.ys-meta dt {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ys-muted);
}

.ys-meta dt svg { width: 14px; height: 14px; color: var(--ys-green); }
.ys-meta dd { margin: 3px 0 0; font-size: 14px; font-weight: 600; line-height: 1.5; }

.ys-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.ys-step {
    display: flex;
    gap: 14px;
    padding: 18px;
    border-radius: 20px;
}

.ys-step:first-child { grid-row: span 2; }
.ys-step:last-child { grid-column: 1 / -1; }

.ys-step-icon {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 13px;
}

.ys-step-icon.is-green { background: rgba(31, 157, 107, .13); color: var(--ys-green-deep); }
.ys-step-icon.is-orange { background: rgba(240, 138, 36, .14); color: var(--ys-orange-deep); }
.ys-step-icon svg { width: 21px; height: 21px; }

.ys-step h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 6px;
    font-size: 16.5px;
    font-weight: 700;
    color: var(--ys-green-ink);
}

.ys-step-no {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--ys-green-ink);
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
}

.ys-step p, .ys-step li { font-size: 14px; line-height: 1.75; color: #3a4a45; }
.ys-step p { margin: 0 0 6px; }
.ys-step p:last-child { margin-bottom: 0; }
.ys-step ul { margin: 0 0 6px; padding-left: 18px; list-style: disc; }
.ys-step li { margin-bottom: 3px; }
.ys-step a:not(.ys-line-btn) { color: var(--ys-green-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.ys-date {
    padding: 1px 7px;
    border-radius: 7px;
    background: rgba(240, 138, 36, .15);
    color: #7a3d0c;
    font-weight: 700;
    white-space: nowrap;
}

.ys-line-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 8px;
    padding: 9px 18px;
    border-radius: 12px;
    background: #06c755;
    color: #fff;
    font-size: 14.5px;
    font-weight: 700;
    text-decoration: none;
    transition: transform .35s var(--ys-ease), box-shadow .35s var(--ys-ease);
}

.ys-line-btn:hover { transform: translateY(-1px); }
.ys-line-btn svg { width: 18px; height: 18px; }

.ys-contact {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 14px;
    padding: 13px 16px;
    border-radius: 16px;
    background: rgba(240, 138, 36, .1);
    font-size: 14px;
    line-height: 1.7;
    color: #5e3410;
}

.ys-contact svg { width: 18px; height: 18px; margin-top: 3px; flex-shrink: 0; }

@media (max-height: 720px) and (min-width: 961px) {
    .ys-main { padding-top: 96px; padding-bottom: 14px; }
    .ys-stage { min-height: calc(100vh - 110px); }
    .ys-card-head { padding: 13px 20px; }
    .ys-card-body { padding: 12px 20px 14px; }
    .ys-perf { margin: 10px 0; }
    .ys-foot { margin-top: 10px; padding: 9px 12px; }
    .ys-more { margin-top: 8px; }
}

@media (max-width: 960px) {
    .ys-main { padding: 100px 14px 28px; }
    .ys-shell, .is-searched .ys-shell { grid-template-columns: minmax(0, 560px); justify-content: center; gap: 18px; }
    .is-searched .ys-stage { min-height: 0; }
    .ys-card, .ys-note { animation-name: ysReveal; }
    .ys-meta { grid-template-columns: 1fr 1fr; gap: 12px 0; }
    .ys-meta > div:nth-child(odd) { border-left: 0; }
    .ys-steps { grid-template-columns: 1fr; }
    .ys-step:first-child { grid-row: auto; }
    .ys-tiles { --ys-tile: 22vw; grid-template-columns: repeat(4, var(--ys-tile)); }
}

@media (max-width: 560px) {
    .ys-search-box { flex-wrap: wrap; padding: 5px 5px 5px 40px; }
    .ys-search-icon { top: 18px; left: 12px; }
    .ys-btn { width: calc(100% + 35px); margin-left: -35px; justify-content: center; }
    .ys-card-head { gap: 12px; padding: 15px 16px; }
    .ys-seal { width: 50px; height: 50px; }
    .ys-seal svg { width: 25px; height: 25px; }
    .ys-card-body { padding: 14px 16px 16px; }
    .ys-strip { flex-direction: column; align-items: flex-start; gap: 10px; }
    .ys-facts { grid-template-columns: 1fr; gap: 9px; }
    .ys-fact { padding: 9px 0 0; border-left: 0; border-top: 1px solid var(--ys-line); }
    .ys-fact:first-child { padding-top: 0; border-top: 0; }
    .ys-meta { grid-template-columns: 1fr; }
    .ys-meta > div { border-left: 0; }
    .ys-step { flex-direction: column; gap: 10px; padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .ys-glow, .ys-seal::after, .ys-more svg { animation: none; }
    .ys-reveal, .ys-card, .ys-note, .ys-seal, .ys-fact, .ys-stamp, .ys-foot, .ys-more, .ys-info { animation-duration: .01s; animation-delay: 0s !important; }
}
