* { box-sizing: border-box; }
body { margin: 0; font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; background: #f2f4f8; }

.ss-outer { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.ss-container { width: 100%; max-width: 820px; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 18px 45px rgba(0,0,0,0.15); }

.ss-header {
  background: #d35400; color: #fff; padding: 14px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.ss-title { font-size: 16px; font-weight: 800; }
.ss-instruction { font-size: 12px; opacity: .92; }
.ss-home-btn { background: #2ecc71; color: #fff; border: none; border-radius: 20px; padding: 6px 16px; font-size: 12px; font-weight: 700; cursor: pointer; }

.ss-loading, .ss-warning {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 20px; gap: 14px; color: #3a3a3a; min-height: 420px;
}
.ss-spinner { width: 36px; height: 36px; border: 4px solid #fbe4d3; border-top-color: #d35400; border-radius: 50%; animation: ss-spin .8s linear infinite; }
@keyframes ss-spin { to { transform: rotate(360deg); } }
.ss-warning-icon { font-size: 40px; }

.ss-board { min-height: 420px; padding: 26px 18px 30px; background: linear-gradient(180deg, #fdf0e6 0%, #ffffff 100%); }

.ss-boxes { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 22px; }
.ss-box {
  width: 84px; height: 84px; border: 3px dashed #e08a45; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: #fff8f2; cursor: pointer; font-size: 34px;
}
.ss-box-number { font-size: 20px; font-weight: 800; color: #d35400; opacity: .5; }
.ss-box-locked { border-style: solid; border-color: #1c8f4f; background: #e9f8ef; cursor: default; }

.ss-feedback { text-align: center; font-weight: 800; font-size: 15px; padding: 8px 14px; border-radius: 10px; max-width: 400px; margin: 0 auto 14px; }
.ss-feedback-correct { background: #d7f5df; color: #1c8f4f; }
.ss-feedback-wrong { background: #fde2e2; color: #c0392b; }

.ss-tray-label { text-align: center; color: #d35400; font-weight: 700; font-size: 13px; margin-bottom: 10px; }
.ss-tray { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-bottom: 24px; }
.ss-tray-card {
  position: relative;
  width: 78px; height: 78px; border: 3px solid #e08a45; border-radius: 12px;
  background: #fff; cursor: pointer; font-size: 30px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 0 #b56423;
}
.ss-tray-card:active { transform: translateY(2px); box-shadow: 0 2px 0 #b56423; }
.ss-tray-card-selected { border-color: #1c8f4f; box-shadow: 0 0 0 3px #a6e6bf; }
.ss-audio-btn {
  position: absolute; bottom: -10px; right: -10px;
  width: 26px; height: 26px; border-radius: 50%; border: none;
  background: #2980b9; color: #fff; font-size: 12px; cursor: pointer;
}

.ss-check-wrap { display: flex; justify-content: center; }
.ss-check-btn {
  background: #2ecc71; color: #fff; border: none; border-radius: 30px; padding: 12px 30px;
  font-size: 15px; font-weight: 800; cursor: pointer; box-shadow: 0 5px 0 #1f9c56;
}
.ss-check-btn:active { transform: translateY(2px); box-shadow: 0 3px 0 #1f9c56; }

.ss-result {
  min-height: 420px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; color: #fff; gap: 8px; padding: 20px; background: #d35400;
}
.ss-result-icon { font-size: 56px; }
.ss-result h2 { margin: 0; font-size: 24px; }
.ss-result p { margin: 0 0 12px; font-size: 14px; opacity: .9; }
.ss-result-actions { display: flex; gap: 12px; }

.ss-btn { border: none; border-radius: 22px; padding: 10px 22px; font-size: 13px; font-weight: 800; cursor: pointer; text-decoration: none; display: inline-block; }
.ss-btn-primary { background: #2ecc71; color: #fff; }
.ss-btn-secondary { background: #fff; color: #d35400; }

.ss-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; z-index: 50; }
.ss-modal { background: #fff; border-radius: 14px; padding: 24px; max-width: 320px; text-align: center; }
.ss-modal p { margin: 0 0 16px; font-weight: 700; color: #333; }
.ss-modal-actions { display: flex; gap: 10px; justify-content: center; }
.ss-modal .ss-btn-primary { background: #2ecc71; }
.ss-modal .ss-btn-secondary { background: #eee; color: #333; }
