/* 손님 식권 화면 (qna.css 위에) */
[hidden] { display: none !important; }
.tk-main { max-width: 520px; }
.tk-logout { margin: 0; }
.tk-logout button { background: none; border: 0; color: #fff; opacity: .85; font-size: 14px; cursor: pointer; padding: 0; }
.q-btn.big { width: 100%; padding: 14px 18px; font-size: 17px; border-radius: 12px; }
.q-form select { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 16px; font-weight: 400; }
.muted { color: var(--ink-3); }

.tk-tabs { display: flex; gap: 4px; margin: 18px 0 0; background: rgba(255, 255, 255, .55); border-radius: 12px; padding: 4px; }
.tk-tabs a, .tk-tabs button { flex: 1; text-align: center; text-decoration: none; color: var(--ink-2); padding: 9px 6px; border-radius: 9px; font-size: 15px; font-weight: 700; border: 0; background: none; cursor: pointer; white-space: nowrap; }
.tk-tabs [aria-current], .tk-tabs [aria-selected="true"] { background: #fff; color: var(--primary); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.tk-form { margin-top: 10px; }

/* 잔액 카드 */
.tk-card { background: var(--primary); color: #fff; border-radius: 18px; padding: 18px 20px 20px; box-shadow: 0 8px 24px rgba(var(--primary-rgb), .3); position: relative; overflow: hidden; }
.tk-card::after { content: ''; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.tk-who { margin: 0; font-size: 15px; opacity: .9; }
.tk-tag { font-style: normal; font-size: 12px; background: var(--accent); color: #3a2a00; border-radius: 5px; padding: 1px 7px; margin-left: 4px; font-weight: 700; }
.tk-bal { margin: 4px 0 0; font-size: 34px; font-weight: 800; letter-spacing: -.5px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.tk-sub { margin: 4px 0 0; font-size: 14px; opacity: .9; }

.tk-pane { margin-top: 14px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; text-align: center; }
.tk-help { margin: 10px 0 0; font-size: 14px; color: var(--ink-2); }

/* QR */
.tk-qr-wrap { position: relative; width: min(100%, 280px); margin: 0 auto; padding: 10px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .18); overflow: hidden; }
.tk-qr { display: flex; justify-content: center; min-height: 240px; align-items: center; transition: opacity .3s; }
.tk-qr img, .tk-qr canvas { display: block; width: 100% !important; max-width: 260px; height: auto !important; image-rendering: pixelated; }
.tk-qr.stale { opacity: .15; }
/* 움직이는 띠 — 캡처한 정지 화면이 아니라는 표시 */
.tk-live { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(var(--primary-rgb), .12); overflow: hidden; }
.tk-live span { position: absolute; top: 0; bottom: 0; width: 30%; background: linear-gradient(90deg, transparent, var(--accent), var(--primary), transparent); animation: tk-slide 1.6s linear infinite; }
@keyframes tk-slide { from { left: -30%; } to { left: 100%; } }
.tk-timer { margin: 12px 0 0; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--primary); }
.tk-digits { margin: 8px 0 0; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 10px; color: var(--ink-3); letter-spacing: 0; word-break: break-all; }

/* 승인 요청 */
.tk-wait { display: flex; align-items: center; gap: 14px; text-align: left; background: rgba(var(--primary-rgb), .07); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.tk-wait p { margin: 0; font-size: 15px; }
.spin { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(var(--primary-rgb), .2); border-top-color: var(--primary); animation: tk-spin 0.9s linear infinite; }
@keyframes tk-spin { to { transform: rotate(360deg); } }

/* 코드 입력 */
.tk-code { display: grid; gap: 12px; }
.tk-code label { font-weight: 700; color: var(--ink-2); }
.tk-code input { justify-self: center; width: 200px; text-align: center; font-size: 40px; font-weight: 800; letter-spacing: 12px; padding: 8px 0 8px 12px; border: 2px solid var(--line); border-radius: 12px; font-variant-numeric: tabular-nums; }
.tk-code input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .15); }

/* 사용 완료 */
.tk-done { position: fixed; inset: 0; z-index: 50; background: rgba(var(--primary-rgb), .96); display: grid; place-items: center; padding: 20px; color: #fff; animation: tk-pop .25s ease-out; }
.tk-done-in { text-align: center; }
.tk-check { width: 120px; height: 120px; margin: 0 auto; border-radius: 50%; background: #fff; color: var(--primary); font-size: 72px; font-weight: 900; display: grid; place-items: center; animation: tk-beat 1.2s ease-in-out infinite; }
.tk-done-t { font-size: 34px; font-weight: 800; margin: 18px 0 4px; }
.tk-done-d { font-size: 18px; margin: 0; }
.tk-done-time { font-size: 15px; opacity: .85; margin: 6px 0 22px; font-variant-numeric: tabular-nums; }
.tk-done .q-btn { min-width: 140px; }
@keyframes tk-pop { from { opacity: 0; transform: scale(.96); } }
@keyframes tk-beat { 50% { transform: scale(1.06); } }

/* 충전·내역 */
.tk-sec { margin-top: 22px; }
.tk-sec h2 { font-size: 17px; margin: 0 0 8px; }
.tk-prods { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tk-prods button { width: 100%; display: grid; gap: 2px; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.tk-prods button:disabled { cursor: default; }
.tk-prods button.on { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary) inset; }
.tk-prods strong { font-size: 15px; }
.tk-prods span { font-size: 13px; color: var(--ink-2); }
.tk-prods em { font-style: normal; font-weight: 800; color: var(--primary); }
.tk-bank { margin-top: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 8px; }
.tk-bank p { margin: 0; }
.tk-bank label { display: grid; gap: 4px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.tk-bank input { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 16px; }
.tk-acc b { font-size: 17px; letter-spacing: .3px; }
.tk-orders { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.tk-orders li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 14px; }
.tk-orders li span { flex: 1; }
.tk-orders li.pending b { color: #7A5600; }
.tk-orders li.done b { color: #23845E; }
.tk-orders li.rejected b { color: var(--danger); }
.tk-orders small { flex-basis: 100%; color: var(--ink-3); }

.tk-hist { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tk-hist li { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "w c" "t t"; gap: 0 10px; padding: 10px 14px; font-size: 15px; }
.tk-hist li + li { border-top: 1px solid #EEF1EF; }
.tk-hist li.muted { display: block; text-align: center; }
.tk-hist .w { grid-area: w; }
.tk-hist .w small { color: var(--ink-3); font-size: 12px; margin-left: 2px; }
.tk-hist .c { grid-area: c; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.tk-hist .charge .c { color: #23845E; }
.tk-hist time { grid-area: t; font-size: 12.5px; color: var(--ink-3); }
.tk-hist .canceled { opacity: .5; }
.tk-hist .canceled .c { text-decoration: line-through; }
.tk-notice { margin: 20px 0 0; padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, .6); font-size: 14px; color: var(--ink-2); }
.tk-setup-t { margin: 0; font-size: 15px; color: var(--ink-2); }
.tk-setup-t b { color: var(--primary); font-size: 16px; }
.tk-form .q-link { justify-self: center; }
.tk-pw summary { cursor: pointer; font-weight: 700; color: var(--ink-2); font-size: 15px; padding: 6px 0; }
.tk-pw[open] summary { margin-bottom: 4px; }
.tk-pw .tk-form { margin-top: 4px; }
.tk-pw-ok { margin: 0 0 12px !important; }
.tk-qr-note { margin: 10px 0 0; padding: 8px 10px; border-radius: 8px; background: #FFF5DD; color: #6A4D00; font-size: 14px; font-weight: 600; }
.tk-guide { margin-top: 14px; background: #fff; border: 2px solid var(--accent); border-radius: 14px; padding: 12px 16px; }
.tk-guide summary { cursor: pointer; font-weight: 800; color: var(--primary); font-size: 16px; }
.tk-guide ol { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; font-size: 15px; color: var(--ink-2); }
.tk-guide ol b { color: var(--ink); }
.tk-guide-prods { list-style: none; margin: 10px 0 0; padding: 10px 0 0; border-top: 1px dashed var(--line); display: grid; gap: 4px; font-size: 15px; }
.tk-guide-prods li { display: flex; justify-content: space-between; gap: 10px; }
.tk-guide-prods b { color: var(--primary); }
.tk-org-note { margin: 10px 2px 2px; font-size: 13.5px; line-height: 1.6; color: var(--ink-2); word-break: keep-all; }
.tk-org-note b:first-child::before { content: 'ⓘ '; color: var(--primary); }
.tk-org-note span { display: block; padding-left: 2px; }
.tk-org-note b:first-child { display: block; margin-bottom: 2px; }
/* 식권 식당 고르기 */
.tp-h { font-size: 14px; color: var(--ink-3); margin: 22px 0 8px; font-weight: 700; }
.tp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tp-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--c); border-radius: 12px; text-decoration: none; color: var(--ink); }
.tp-item:hover { box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.tp-name { font-weight: 800; font-size: 17px; }
.tp-bal { font-weight: 800; color: var(--c); font-size: 16px; white-space: nowrap; }
.tp-go { color: var(--ink-3); font-size: 14px; white-space: nowrap; }
.my-card { text-align: center; }
.my-card .tk-who { text-align: left; }
.my-qr { margin-top: 10px; background: #fff; }
.my-timer { color: #fff; }
.my-card .tk-qr-note { margin-top: 8px; }
.my-help { margin: 12px 2px 0; }
.my-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tp-name small { font-weight: 500; color: var(--ink-3); font-size: 12.5px; margin-left: 4px; }
.tk-all { margin: 0 0 10px; font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.tk-all a { font-weight: 700; text-decoration: none; }
.tk-all span { color: var(--ink-3); font-size: 12.5px; }
.tk-wd summary { cursor: pointer; color: var(--ink-3); font-size: 14px; font-weight: 600; }
.tk-wd-box { margin-top: 10px; background: #FFF4F2; border: 1px solid #F3C9C3; border-radius: 12px; padding: 12px 14px; font-size: 14px; color: #5a2a24; }
.tk-wd-box p { margin: 0 0 6px; }
.tk-wd-box ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.tk-wd-btn { background: #B3372C; border-color: #B3372C; color: #fff; }

/* 내 식권 — 식당 추가 */
.my-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.my-head h2 { margin: 0; }
.my-add { border: 1px solid var(--primary); background: none; color: var(--primary); font: inherit; font-weight: 700; font-size: 14px; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.my-add[hidden] { display: none; }
.my-empty { list-style: none; color: var(--ink-3); font-size: 14px; padding: 12px 4px; }
.my-pop { position: fixed; inset: 0; z-index: 60; background: rgba(20, 28, 26, .5); display: grid; place-items: end center; padding: 12px; animation: tk-pop .2s ease-out; }
@media (min-width: 560px) { .my-pop { place-items: center; } }
.my-pop-box { width: min(480px, 100%); max-height: min(78vh, 640px); background: #fff; color: var(--ink); border-radius: 18px; padding: 16px; display: grid; grid-template-rows: auto auto auto minmax(0, 1fr); gap: 10px; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.my-pop-head { display: flex; align-items: center; justify-content: space-between; }
.my-pop-head h3 { margin: 0; font-size: 18px; }
.my-pop-x { border: 0; background: #F1F4F2; width: 34px; height: 34px; border-radius: 50%; font-size: 15px; cursor: pointer; }
.my-pop-box .tk-help { margin: 0; }
.my-pop-box input[type="search"] { font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line, #DCE3DF); border-radius: 10px; width: 100%; box-sizing: border-box; }
.my-add-list { list-style: none; margin: 0; padding: 0; overflow: auto; display: grid; gap: 6px; align-content: start; }
.my-add-list button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; font: inherit; padding: 12px 14px; border: 1px solid var(--line, #DCE3DF); border-left: 4px solid var(--c); border-radius: 10px; background: #fff; cursor: pointer; color: var(--ink); }
.my-add-list button:disabled { opacity: .6; }
.my-add-go { color: var(--primary); font-weight: 700; font-size: 14px; white-space: nowrap; }

/* 유효기간 */
.tk-exp { margin: 4px 0 0; font-size: 13.5px; color: var(--ink-3, #6B7573); }
.tk-exp.soon { color: #9A6300; font-weight: 700; }
.tk-exp.over { color: #B3261E; font-weight: 700; }
.tp-exp { color: #9A6300; font-weight: 700; }
.tp-exp.over { color: #B3261E; }

/* 홈 화면에 추가 */
.pwa-box { margin: 18px 0 0; }
.pwa-in { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #DCE5E1; border-radius: 14px; padding: 12px 12px 12px 14px; box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.pwa-in img { border-radius: 10px; flex: none; }
.pwa-in > div { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pwa-in b { font-size: 15px; }
.pwa-in span { font-size: 13px; color: #6B7573; }
.pwa-ios { margin: 4px 0 0; font-size: 13px; line-height: 1.5; }
.pwa-btn { flex: none; font: inherit; font-weight: 700; padding: 9px 16px; border-radius: 10px; border: 0; background: var(--primary, #2E6B5A); color: #fff; cursor: pointer; }
.pwa-x { flex: none; border: 0; background: none; font-size: 22px; line-height: 1; color: #9AA4A1; cursor: pointer; padding: 4px; }

/* 로그인했지만 이 식당 식권은 아직 안 씀 */
.tk-join { text-align: center; display: grid; gap: 12px; }
.tk-join p { margin: 0; }
.tk-join-links { font-size: 14px; }
.tk-join-out .linklike { background: none; border: 0; color: inherit; text-decoration: underline; opacity: .75; font: inherit; font-size: 13.5px; cursor: pointer; }
.tk-card.tk-join { background: #fff; color: #1E2624; border: 1px solid rgba(0, 0, 0, .08); box-shadow: 0 6px 20px rgba(0, 0, 0, .06); }
.tk-card.tk-join::before, .tk-card.tk-join::after { display: none; }
.tk-join p:first-child { color: #4B5654; font-size: 15px; line-height: 1.6; }
.tk-join .q-btn.primary { width: 100%; }
.tk-join-links a { color: var(--p, #2D6A55); font-weight: 700; }
.tk-join-out .linklike { color: #4B5654; }

/* 휴대폰 역인증(옥토모) — 버튼은 SDK 가 그림(::part(button) 으로만 꾸밀 수 있음), 팝업은 옥토모 화면 */
.tk-verify { display: grid; gap: 6px; }
.tk-verify-l { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.tk-verify-l small { font-weight: 600; color: var(--primary); margin-left: 4px; }
.tk-verify-box { border: 1.5px dashed rgba(var(--primary-rgb), .35); border-radius: 12px; padding: 10px; background: rgba(var(--primary-rgb), .04); }
.tk-verify.done .tk-verify-box { border-style: solid; border-color: rgba(var(--primary-rgb), .45); background: rgba(var(--primary-rgb), .07); }
.tk-verify-btn octomo-mount { display: block; width: 100%; }
.tk-verify-btn octomo-mount::part(button) {
  width: 100%; margin: 0; padding: 13px 16px; border: 0; border-radius: 10px;
  background: var(--primary); color: #fff; font: inherit; font-size: 16px; font-weight: 800; letter-spacing: -.01em;
  box-shadow: 0 4px 14px rgba(var(--primary-rgb), .28); cursor: pointer;
}
.tk-verify-btn octomo-mount::part(button):hover { filter: brightness(1.06); }
.tk-verify-ok { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; color: var(--ink); }
.tk-verify-ok[hidden] { display: none; }
.tk-verify-ic { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 15px; font-weight: 800; }
.tk-verify-ok b { font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.tk-verify-ok > span:not(.tk-verify-ic) { font-size: 13px; font-weight: 700; color: var(--primary); }
.tk-verify-redo { margin-left: auto; border: 0; background: none; padding: 4px 2px; font: inherit; font-size: 13px; color: var(--ink-3, #6b7280); text-decoration: underline; cursor: pointer; }
.tk-verify-err { margin: 8px 0 0; font-size: 13.5px; font-weight: 600; color: #c0392b; }
.tk-verify-err[hidden] { display: none; }
.tk-verify-hint { margin: 0; }
.tk-form button[type="submit"]:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.tk-verify.done .tk-verify-hint { display: none; }
