@font-face { font-family: 'LINE Seed Sans TH'; font-weight: 400; font-display: swap; src: url('/static/LINESeedSansTH_W_Rg.woff2') format('woff2'); }
@font-face { font-family: 'LINE Seed Sans TH'; font-weight: 700; font-display: swap; src: url('/static/LINESeedSansTH_W_Bd.woff2') format('woff2'); }
@font-face { font-family: 'LINE Seed Sans TH'; font-weight: 800; font-display: swap; src: url('/static/LINESeedSansTH_W_XBd.woff2') format('woff2'); }

:root {
  --green: #06C755; --green-dark: #05A847; --blue: #4270ED; --orange: #FF6F36; --dark: #2A2A2A;
  --bg: #F3F5F4; --line: #DCE3DF; --muted: #5A5A5A; --tint: #EFF7F2; --chat: #C2D2FF;
  --radius: 18px; --fast: 160ms;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: #141414; font-family: 'LINE Seed Sans TH', sans-serif; font-size: 17px; line-height: 1.5; }
button, input, textarea { font: inherit; }
h1, h2, h3, h4, p { margin: 0; }

.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 12px 20px; background: var(--dark); color: #fff; }
.logo { height: 20px; width: auto; }
.status { margin-left: auto; font-size: 14px; color: #A6EBBE; }
.status.bad { color: #FFB199; }

.join { max-width: 560px; margin: 8vh auto; padding: 0 20px; text-align: center; }
.join h1 { font-size: 40px; font-weight: 800; }
.join p { margin-top: 8px; color: var(--muted); }
.team-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 30px 0 22px; }
.team-pick button { padding: 34px 0; border: 0; border-radius: var(--radius); color: #fff; font-size: 44px; font-weight: 800; cursor: pointer; transition: transform var(--fast); }
.team-pick button:hover { transform: translateY(-3px); }
.team-pick .team-a { background: var(--green); }
.team-pick .team-b { background: var(--blue); }
.team-pick .team-c { background: var(--orange); }
.fine { font-size: 14px; color: var(--muted); }

.bar { position: sticky; top: 44px; z-index: 15; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 20px; background: #fff; border-bottom: 1px solid var(--line); }
.chip { padding: 8px 16px; border: 0; border-radius: 99px; background: var(--dark); color: #fff; font-weight: 700; cursor: pointer; }
.cases { display: flex; gap: 8px; flex-wrap: wrap; }
.cases button { padding: 8px 18px; border: 2px solid var(--line); border-radius: 99px; background: #fff; font-weight: 700; cursor: pointer; }
.cases button.now { border-color: var(--green); background: var(--green); color: #fff; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 26px; max-width: 1240px; margin: 22px auto 60px; padding: 0 20px; align-items: start; }
.intro h2 { font-size: 30px; font-weight: 800; }
.intro p { color: var(--muted); }
.intro details { margin-top: 10px; }
.intro summary { cursor: pointer; color: var(--blue); font-weight: 700; }
.intro pre { white-space: pre-wrap; margin: 10px 0 0; padding: 14px 16px; border-radius: 12px; background: #FFF9C7; font: inherit; }

.card { margin-top: 16px; padding: 22px; background: #fff; border-radius: var(--radius); }
.card h3 { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 800; }
.card h3 i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: #fff; font-style: normal; font-size: 18px; }
.card h4 { margin-top: 18px; font-size: 18px; font-weight: 800; }
.card.ai { background: var(--dark); color: #fff; }
.card ol { margin: 10px 0 14px; padding-left: 22px; }
label { display: block; margin-top: 14px; font-weight: 700; font-size: 15px; }
label b { float: right; color: var(--green-dark); font-size: 14px; }
label b.over { color: #D9400B; }
input:not([type=file]), textarea { display: block; width: 100%; margin-top: 6px; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 11px; background: #fff; font-weight: 400; font-size: 16px; resize: vertical; }
input:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(6, 199, 85, .18); }
.qa-row { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.qa-row label:first-child { margin-top: 0; }

.row { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.btn { display: inline-block; margin: 0; padding: 11px 18px; border: 0; border-radius: 99px; background: var(--green); color: #fff; font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer; transition: background var(--fast), transform var(--fast); }
.btn:hover { background: var(--green-dark); }
.btn:active { transform: scale(.97); }
.btn.blue { background: var(--blue); }
.btn.ghost { background: #fff; color: var(--dark); border: 1.5px solid var(--line); }
.btn.wide { width: 100%; margin-top: 12px; padding: 14px; font-size: 17px; }
.btn.wide.done { background: var(--dark); }
.file input { display: none; }
.upload { margin-top: 18px; padding-top: 4px; border-top: 1px solid var(--line); }

.side { position: sticky; top: 112px; }
.side h2 { font-size: 22px; font-weight: 800; margin-bottom: 10px; }
.phone { display: flex; flex-direction: column; height: 620px; border: 10px solid var(--dark); border-radius: 36px; background: #fff; overflow: hidden; }
.ph-feed { flex: 1; padding: 14px; background: #EDEFF1; overflow-y: auto; }
.ph-tag { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.ph-ad { overflow: hidden; border-radius: 16px; background: #fff; }
.ph-pic { display: block; width: 100%; aspect-ratio: 1200 / 628; object-fit: cover; }
.ph-pic.empty { display: grid; place-items: center; background: linear-gradient(120deg, var(--green), var(--blue)); color: #fff; font-weight: 800; }
.ph-ad h4 { padding: 12px 14px 0; font-size: 20px; font-weight: 800; }
.ph-ad p { padding: 2px 14px 0; color: var(--muted); font-size: 15px; }
.ph-start { display: block; width: calc(100% - 28px); margin: 12px 14px 14px; padding: 12px; border: 0; border-radius: 10px; background: var(--green); color: #fff; font-weight: 800; cursor: pointer; }
.ph-chat { flex: 1; display: flex; flex-direction: column; min-height: 0; background: var(--chat); }
.ph-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--dark); color: #fff; }
.ph-back { border: 0; background: none; color: #fff; font-size: 28px; line-height: 1; padding: 0 8px; cursor: pointer; }
.ph-log { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 12px; overflow-y: auto; }
.ph-bub { align-self: flex-start; max-width: 86%; padding: 9px 14px; border-radius: 16px; background: #fff; font-size: 15px; white-space: pre-line; }
.ph-bub.me { align-self: flex-end; background: #A6EBBE; }
.ph-qs { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; background: #fff; }
.ph-q { padding: 6px 13px; border: 1.5px solid var(--blue); border-radius: 99px; background: #fff; color: var(--blue); font-size: 14px; font-weight: 700; cursor: pointer; }

body.show { background: var(--dark); color: #fff; min-height: 100vh; }
.show-head { display: flex; align-items: center; gap: 20px; padding: 20px 34px 0; }
.show-head h1 { font-size: 34px; font-weight: 800; }
.show-grid { display: flex; justify-content: center; gap: 32px; padding: 22px 34px; flex-wrap: wrap; }
.show-col { width: 380px; }
.show-team { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.show-chip { padding: 2px 16px; border-radius: 12px; font-size: 28px; font-weight: 800; color: #fff; }
.team-a .show-chip { background: var(--green); }
.team-b .show-chip { background: var(--blue); }
.team-c .show-chip { background: var(--orange); }
.show-tabs { display: flex; gap: 6px; }
.show-tabs button { padding: 5px 12px; border: 1.5px solid #666; border-radius: 99px; background: transparent; color: #ddd; font-size: 13px; cursor: pointer; }
.show-tabs button.now { border-color: #fff; background: #fff; color: #111; font-weight: 700; }
.show .phone { border-color: #000; color: #141414; }

.embed .show-grid { zoom: 1.32; padding-top: 14px; }

button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; }
  .phone { height: 560px; max-width: 390px; margin: 0 auto; }
}
@media (max-width: 560px) {
  .top strong { display: none; }
  .status { white-space: nowrap; }
  .bar { position: static; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.score-page { max-width: 560px; margin: 0 auto; padding: 16px 14px 60px; }
.score-page h1 { font-size: 30px; font-weight: 800; }
.totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.total { display: flex; flex-direction: column; align-items: center; padding: 10px 4px; border-radius: 14px; background: #fff; }
.total span { font-weight: 800; color: var(--green-dark); }
.total b { font-size: 36px; font-weight: 800; line-height: 1.1; }
.total small { font-size: 12px; color: var(--muted); text-align: center; }
.score-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.score-tabs button { padding: 12px 0; border: 2px solid var(--line); border-radius: 12px; background: #fff; font-weight: 800; cursor: pointer; }
.score-tabs button.now { border-color: var(--green); background: var(--green); color: #fff; }
.score-group { color: var(--green-dark); }
.score-group:first-child { margin-top: 0; }
.score-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 7px 0; border-bottom: 1px solid var(--line); font-weight: 400; font-size: 16px; }
input.score-input, .score-row input { flex: none; width: 84px !important; margin: 0 !important; text-align: center; font-size: 22px !important; font-weight: 800 !important; }
