/* practice-sim.css — 생활 연습 시뮬레이터 공통 */
.ps-wrap{ max-width: 540px; margin: 0 auto; }
.ps-setup{ display: grid; gap: 8px; margin-bottom: 10px; }
.ps-seg{ display: flex; border: 1px solid var(--panel-border); border-radius: 12px; overflow: hidden; }
.ps-seg button{ flex: 1; min-height: 52px; font-size: 17px; font-weight: 700; border: 0; border-radius: 0; background: var(--bg); color: var(--text-dim); cursor: pointer; white-space: nowrap; padding: 0 6px; }
.ps-seg button[aria-pressed="true"]{ background: #2563eb; color: #fff; }
.ps-missions{ display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ps-mbtn{ display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 8px 10px; text-align: left; font-size: 15.5px; font-weight: 700; line-height: 1.3; border-radius: 12px; border: 1px solid var(--panel-border); background: var(--bg); color: var(--text); cursor: pointer; }
.ps-mbtn b{ flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-border); font-size: 15px; }
.ps-mbtn[aria-pressed="true"]{ border: 2px solid #2563eb; background: rgba(37,99,235,.1); }
.ps-mbtn[aria-pressed="true"] b{ background: #2563eb; color: #fff; }
.ps-voice{ min-height: 48px; font-size: 16px; font-weight: 700; border-radius: 12px; }
.ps-coach{ min-height: 64px; display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin-bottom: 10px; border-radius: 14px; background: #fff7d6; color: #3b2f05; font-size: 19px; font-weight: 800; line-height: 1.4; border: 2px solid #f59e0b; }
.ps-coach.ps-mission{ background: #e0f2fe; border-color: #0284c7; color: #0c3a5a; }
.ps-coach.ps-ok{ background: #dcfce7; border-color: #16a34a; color: #14532d; }
.ps-coach.ps-warn{ background: #ffedd5; border-color: #ea580c; color: #7c2d12; }
.ps-coach-ico{ font-size: 28px; flex: 0 0 auto; }
.ps-device{ background: #1f2937; border-radius: 26px; padding: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.ps-dev-atm{ background: linear-gradient(#64748b, #334155); border-radius: 18px; }
.ps-dev-phone{ background: #111; border-radius: 40px; padding: 14px 10px 22px; max-width: 420px; margin: 0 auto; }
.ps-dev-phone .ps-screen{ border-radius: 26px; }
.ps-screen{ background: #f8fafc; color: #111827; border-radius: 16px; min-height: 560px; max-height: 760px; overflow-y: auto; display: flex; flex-direction: column; position: relative; font-size: 18px; }
.ps-top{ position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; background: var(--ps-top, #1d4ed8); color: #fff; font-weight: 800; }
.ps-top-t{ font-size: 18px; }
.ps-top-b{ display: flex; gap: 6px; }
.ps-top button{ min-height: 44px; padding: 6px 12px; font-size: 15px; font-weight: 800; border-radius: 10px; border: 2px solid rgba(255,255,255,.7); background: transparent; color: #fff; cursor: pointer; }
.ps-body{ flex: 1; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.ps-body h3{ word-break: keep-all; margin: 2px 0; font-size: 22px; line-height: 1.35; color: #111827; text-align: center; }
.ps-body p{ margin: 0; color: #374151; line-height: 1.5; }
.ps-sub{ text-align: center; color: #4b5563; font-size: 17px; }
.ps-grid{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ps-grid3{ display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ps-btn{ white-space: normal; word-break: keep-all; min-height: 56px; padding: 10px 12px; font-size: 18px; font-weight: 800; border-radius: 14px; border: 2px solid #cbd5e1; background: #fff; color: #111827; cursor: pointer; line-height: 1.25; }
.ps-btn small{ display: block; font-size: 14px; font-weight: 600; color: #6b7280; margin-top: 3px; }
.ps-btn-main{ background: #2563eb; border-color: #2563eb; color: #fff; }
.ps-btn-main small{ color: #dbeafe; }
.ps-btn-red{ background: #dc2626; border-color: #dc2626; color: #fff; }
.ps-btn[aria-pressed="true"], .ps-btn.on{ border-color: #2563eb; background: #dbeafe; color: #1e3a8a; }
.ps-btn:disabled{ opacity: .45; cursor: default; }
.ps-big{ min-height: 96px; font-size: 21px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.ps-big .ps-ico{ font-size: 34px; }
.ps-wide{ width: 100%; }
.ps-row{ display: flex; gap: 10px; }
.ps-row > *{ flex: 1; }
.ps-list{ display: flex; flex-direction: column; gap: 8px; }
.ps-item{ display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 60px; padding: 10px 12px; text-align: left; font-size: 18px; font-weight: 700; border-radius: 12px; border: 2px solid #e5e7eb; background: #fff; color: #111827; cursor: pointer; }
.ps-item small{ display: block; font-size: 14px; color: #6b7280; font-weight: 600; }
.ps-item.on{ border-color: #2563eb; background: #eff6ff; }
.ps-box{ background: #fff; border: 2px solid #e5e7eb; border-radius: 14px; padding: 12px 14px; }
.ps-box dl{ margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 17px; }
.ps-box dt{ color: #6b7280; }
.ps-box dd{ margin: 0; font-weight: 800; text-align: right; }
.ps-display{ min-height: 64px; display: flex; align-items: center; justify-content: flex-end; padding: 8px 14px; font-size: 28px; font-weight: 800; letter-spacing: 1px; background: #fff; border: 2px solid #94a3b8; border-radius: 12px; color: #111827; word-break: break-all; }
.ps-display.ps-ph{ color: #9ca3af; font-size: 18px; font-weight: 600; }
.ps-dots{ display: flex; justify-content: center; gap: 14px; padding: 10px 0; }
.ps-dot{ width: 22px; height: 22px; border-radius: 50%; border: 3px solid #475569; }
.ps-dot.on{ background: #1d4ed8; border-color: #1d4ed8; }
.ps-keypad{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ps-key{ min-height: 58px; font-size: 26px; font-weight: 800; border-radius: 12px; border: 2px solid #cbd5e1; background: #fff; color: #111827; cursor: pointer; }
.ps-key-del{ font-size: 17px; background: #f1f5f9; }
.ps-key{ white-space: nowrap; padding: 0 2px; }
.ps-key-ok{ font-size: 17px; background: #2563eb; border-color: #2563eb; color: #fff; }
.ps-slot{ display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 10px; border: 3px dashed #94a3b8; border-radius: 16px; background: #f1f5f9; cursor: pointer; font-size: 19px; font-weight: 800; color: #111827; width: 100%; }
.ps-slot .ps-ico{ font-size: 46px; }
.ps-slot-out{ border-color: #16a34a; background: #f0fdf4; }
.ps-paper{ background: #fff; border: 1px solid #d1d5db; border-radius: 6px; padding: 14px; font-family: ui-monospace, Menlo, monospace; font-size: 15px; line-height: 1.6; box-shadow: 0 2px 6px rgba(0,0,0,.12); color: #111827; }
.ps-paper b{ font-size: 17px; }
.ps-note{ font-size: 14.5px; color: #6b7280; text-align: center; }
.ps-warnbox{ background: #fef2f2; border: 2px solid #fca5a5; color: #7f1d1d; border-radius: 12px; padding: 10px 12px; font-size: 16px; font-weight: 700; }
.ps-hint{ position: relative; z-index: 1; outline: 4px solid #f59e0b !important; outline-offset: 2px; animation: psPulse 1.1s ease-in-out infinite; }
@keyframes psPulse{ 0%,100%{ box-shadow: 0 0 0 0 rgba(245,158,11,.75); } 50%{ box-shadow: 0 0 0 10px rgba(245,158,11,0); } }
.ps-shake{ animation: psShake .35s; }
@keyframes psShake{ 0%,100%{ transform: translateX(0); } 25%{ transform: translateX(-6px); } 75%{ transform: translateX(6px); } }
.ps-result{ padding: 22px 16px; text-align: center; display: flex; flex-direction: column; gap: 10px; }
.ps-result h3{ margin: 0; font-size: 22px; color: #111827; }
.ps-result p{ margin: 0; color: #374151; }
.ps-res-big{ font-size: 54px; color: #f59e0b; letter-spacing: 4px; }
.ps-star-off{ color: #d1d5db; }
.ps-check{ list-style: none; padding: 0; margin: 4px 0; text-align: left; display: flex; flex-direction: column; gap: 6px; }
.ps-check li{ padding: 8px 10px; border-radius: 10px; font-weight: 700; font-size: 16.5px; }
.ps-check li.ok{ background: #dcfce7; color: #14532d; }
.ps-check li.no{ background: #fee2e2; color: #7f1d1d; }
.ps-check small{ display: block; font-weight: 600; }
.ps-new{ color: #b45309 !important; font-weight: 800; }
.ps-res-btns{ display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ps-res-btns .ps-btn{ flex: 1 1 140px; }
.ps-best{ text-align: center; font-weight: 700; color: var(--text-dim); min-height: 1.2em; margin: 8px 0 0; }
/* 휴대폰 앱 화면 */
.ps-app-top{ display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #fff; border-bottom: 1px solid #e5e7eb; font-weight: 800; font-size: 19px; position: sticky; top: 0; z-index: 2; color: #111827; }
.ps-app-top button{ min-height: 44px; min-width: 44px; font-size: 22px; border: 0; background: transparent; cursor: pointer; color: #111827; }
.ps-chip{ display: inline-flex; align-items: center; min-height: 44px; padding: 6px 14px; border-radius: 22px; border: 2px solid #cbd5e1; background: #fff; font-size: 16px; font-weight: 700; cursor: pointer; color: #111827; }
.ps-chip.on{ border-color: #2563eb; background: #dbeafe; color: #1e3a8a; }
.ps-chips{ display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 560px){
  .ps-missions{ grid-template-columns: 1fr; }
  .ps-seg button{ font-size: 16px; }
  .ps-coach{ font-size: 17.5px; }
  .ps-screen{ min-height: 520px; font-size: 17px; }
  .ps-device{ padding: 10px; border-radius: 20px; }
  .ps-dev-phone{ padding: 10px 7px 16px; border-radius: 32px; }
  .ps-btn{ font-size: 17px; }
  .ps-body h3{ font-size: 20px; word-break: keep-all; }
}
.ps-seg-wide{ flex-wrap: wrap; }
.ps-seg-wide button{ flex: 1 1 30%; }
.ps-item.ps-btn-main{ background: #2563eb; border-color: #2563eb; color: #fff; justify-content: center; }
.ps-item.ps-btn-main small{ color: #dbeafe; }
.ps-item.ps-btn-red{ background: #dc2626; border-color: #dc2626; color: #fff; justify-content: center; }
.ps-item:disabled{ opacity: .5; cursor: default; }

.ps-mbtn.ps-done b{ background: #16a34a; color: #fff; }
.ps-stamp{ font-weight: 800; color: #b45309 !important; }
.ps-stamp a{ color: #1d4ed8; }
.ps-item.ps-q-ok{ border-color: #16a34a; background: #dcfce7; opacity: 1; }
.ps-item.ps-q-no{ border-color: #dc2626; background: #fee2e2; opacity: 1; }
/* 수업용 큰 화면 (?present=1) */
.ps-present{ max-width: 760px; }
.ps-present .ps-screen{ font-size: 24px; min-height: 680px; max-height: none; }
.ps-present .ps-coach{ font-size: 26px; }
.ps-present .ps-btn, .ps-present .ps-item{ font-size: 23px; }
.ps-present .ps-key{ font-size: 32px; min-height: 72px; }
.ps-present .ps-body h3{ font-size: 28px; }
html.ps-present-page .cp-banner, html.ps-present-page .cp-side, html.ps-present-page #shareBar, html.ps-present-page ins.adsbygoogle{ display: none !important; }
/* 생활 연습 모음 (senior-practice) */
.hub-top{ margin-bottom: 8px; }
.hub-board{ font-size: 19px; font-weight: 800; text-align: center; }
.hub-board b{ color: #f59e0b; font-size: 24px; }
.hub-bar{ height: 12px; border-radius: 6px; background: var(--panel-border); overflow: hidden; margin: 8px 0; }
.hub-bar span{ display: block; height: 100%; background: #f59e0b; }
.hub-h{ margin: 16px 0 8px; font-size: 19px; }
.hub-grid{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hub-card{ display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 14px; border: 1px solid var(--panel-border); background: var(--bg); color: var(--text); text-decoration: none; min-height: 96px; }
.hub-card:hover{ border-color: #2563eb; }
.hub-ico{ font-size: 28px; }
.hub-name{ font-weight: 800; font-size: 16px; line-height: 1.3; word-break: keep-all; }
.hub-stamp{ font-size: 13.5px; color: var(--text-dim); font-weight: 700; margin-top: auto; }
.hub-some{ border-color: #f59e0b; }
.hub-full{ border-color: #16a34a; background: rgba(22,163,74,.08); }
.hub-full .hub-stamp{ color: #16a34a; }
@media (min-width: 700px){ .hub-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* 강사용 연습 카드 (practice-teacher) */
.tcards{ display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.tcard > div:last-child{ min-width: 0; }
@media (min-width: 640px){ .tcards{ grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tcard{ display: flex; gap: 10px; align-items: center; padding: 10px; border: 1px dashed #94a3b8; border-radius: 10px; background: #fff; color: #111; break-inside: avoid; }
.tqr{ width: 96px; height: 96px; flex: 0 0 96px; display: grid; place-items: center; }
.tqr svg{ width: 96px; height: 96px; }
.tname{ font-weight: 800; font-size: 15px; line-height: 1.3; }
.turl{ font-size: 11.5px; color: #475569; word-break: break-all; }
.thow{ font-size: 12px; color: #334155; margin-top: 2px; }
@media print{
  body *{ visibility: hidden !important; }
  #psim, #psim *{ visibility: visible !important; }
  #psim{ position: absolute; left: 0; top: 0; width: 100%; }
  .no-print{ display: none !important; }
  .tcards{ grid-template-columns: repeat(2, 1fr); }
}
