/* Hangeul Path — Hangul Wordle Styles */

.wd-shell {
  width: 100%;
  min-height: 100vh;
  background: #F7F3EC;
  color: #14213D;
  font-family: Manrope, "Noto Sans KR", sans-serif;
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
}

.wd-main {
  flex: 1 1 auto;
  min-width: 0;
  padding: 28px 36px 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  box-sizing: border-box;
}

.wd-guest-bar {
  width: 100%;
  min-height: 72px;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  border-bottom: 1.5px solid #E2DACB;
  background: #FBF8F2;
  box-sizing: border-box;
}

.wd-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  color: #14213D;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.wd-brand-mark {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #14213D;
  color: #F7F3EC;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Noto Serif KR", serif;
  font-weight: 900;
  font-size: 20px;
}

.wd-brand-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #D8502A;
  border: 2px solid #FBF8F2;
  box-sizing: border-box;
}

.wd-container {
  width: 100%;
  max-width: 1040px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.wd-studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
  width: 100%;
}

.wd-studio-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.wd-side-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 24px;
}

.wd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.wd-kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #2B7F72;
}

.wd-title {
  margin: 2px 0 0;
  font-size: clamp(24px, 3.2vw, 34px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #14213D;
}

.wd-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.wd-pill-btn {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 1.5px solid #E2DACB;
  color: #14213D;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.wd-pill-btn:hover {
  border-color: #14213D;
}

.wd-pill-btn--primary {
  background: #C8421C;
  border-color: #C8421C;
  color: #FFFFFF;
}

.wd-pill-btn--teal {
  background: #2B7F72;
  border-color: #2B7F72;
  color: #FFFFFF;
}

.wd-info-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: #FFFFFF;
  border: 1.5px solid #E2DACB;
  border-radius: 20px;
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 700;
  color: #3B4660;
}

.wd-countdown {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  color: #14213D;
}

.wd-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 700;
  color: #5C6479;
}

.wd-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.wd-legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: inline-block;
}

.wd-swatch-correct { background: #2B7F72; }
.wd-swatch-present { background: #D4911C; }
.wd-swatch-absent  { background: #8F96A3; }

.wd-board-wrap {
  background: #FFFFFF;
  border: 1.5px solid #E2DACB;
  border-radius: 28px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.wd-preview-bar {
  min-height: 36px;
  padding: 4px 16px;
  border-radius: 999px;
  background: #FBF8F2;
  border: 1px solid #E2DACB;
  font-family: "Noto Sans KR", sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: #14213D;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.wd-preview-label {
  font-family: Manrope, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5C6479;
}

.wd-board {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 420px;
}

.wd-row {
  display: grid;
  grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr));
  gap: 8px;
  align-items: center;
}

.wd-row-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wd-row-wrap .wd-row {
  flex: 1 1 auto;
}

.wd-row-word {
  width: 66px;
  flex: 0 0 auto;
  font-family: "Noto Sans KR", sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: #3B4660;
  text-align: center;
  background: #F7F3EC;
  border-radius: 10px;
  padding: 6px 4px;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wd-cell {
  aspect-ratio: 1 / 1;
  min-height: 44px;
  max-height: 60px;
  border-radius: 14px;
  border: 2px solid #E2DACB;
  background: #FBF8F2;
  color: #14213D;
  font-family: "Noto Sans KR", sans-serif;
  font-size: clamp(20px, 4.8vw, 26px);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  transition: transform 0.12s ease, border-color 0.15s ease, background-color 0.2s ease, color 0.2s ease;
}

.wd-cell--filled {
  border-color: #14213D;
  background: #FFFFFF;
}

.wd-cell--active {
  border-color: #C8421C;
}

.wd-cell--correct {
  background: #2B7F72;
  border-color: #2B7F72;
  color: #FFFFFF;
}

.wd-cell--present {
  background: #D4911C;
  border-color: #D4911C;
  color: #FFFFFF;
}

.wd-cell--absent {
  background: #8F96A3;
  border-color: #8F96A3;
  color: #FFFFFF;
}

.wd-message {
  min-height: 24px;
  font-size: 14px;
  font-weight: 800;
  color: #C8421C;
  text-align: center;
}

/* Result & Word Reveal Card */
.wd-result-card {
  width: 100%;
  background: #14213D;
  color: #F7F3EC;
  border-radius: 28px;
  padding: 24px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wd-result-card[hidden] {
  display: none;
}

.wd-result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.wd-answer-ko {
  font-family: "Noto Serif KR", serif;
  font-size: 38px;
  font-weight: 900;
  color: #FFFFFF;
  line-height: 1.1;
}

.wd-answer-ky {
  font-size: 18px;
  font-weight: 800;
  color: #FBE0D6;
  margin-top: 4px;
}

.wd-answer-rom {
  font-size: 13px;
  color: #CBD5E1;
  margin-top: 2px;
}

.wd-example-box {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.5;
}

.wd-result-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.wd-btn-light {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: #FFFFFF;
  color: #14213D;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.wd-btn-accent {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: #C8421C;
  color: #FFFFFF;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.wd-btn-teal {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: #2B7F72;
  color: #FFFFFF;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Hangul On-screen Keyboard */
.wd-keyboard {
  width: 100%;
  background: #FFFFFF;
  border: 1.5px solid #E2DACB;
  border-radius: 24px;
  padding: 14px 10px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wd-kb-row {
  display: flex;
  justify-content: center;
  gap: 5px;
}

.wd-key {
  flex: 1 1 0;
  max-width: 48px;
  min-width: 28px;
  height: 48px;
  border: 1.5px solid #E2DACB;
  border-radius: 12px;
  background: #FBF8F2;
  color: #14213D;
  font-family: "Noto Sans KR", Manrope, sans-serif;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  user-select: none;
  touch-action: manipulation;
}

.wd-key:hover {
  border-color: #14213D;
}

.wd-key--wide {
  max-width: 96px;
  flex: 1.5 1 0;
  font-family: Manrope, sans-serif;
  font-size: 13px;
}

.wd-key--enter {
  max-width: 136px;
  flex: 2 1 0;
  background: #C8421C;
  border-color: #C8421C;
  color: #FFFFFF;
  font-family: Manrope, sans-serif;
  font-size: 14px;
}

.wd-key--shift-on {
  background: #14213D;
  border-color: #14213D;
  color: #FFFFFF;
}

.wd-key--correct {
  background: #2B7F72;
  border-color: #2B7F72;
  color: #FFFFFF;
}

.wd-key--present {
  background: #D4911C;
  border-color: #D4911C;
  color: #FFFFFF;
}

.wd-key--absent {
  background: #8F96A3;
  border-color: #8F96A3;
  color: #FFFFFF;
}

/* Stats & Archive Cards */
.wd-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.wd-stat-box {
  background: #FFFFFF;
  border: 1.5px solid #E2DACB;
  border-radius: 20px;
  padding: 16px 12px;
  text-align: center;
}

.wd-stat-val {
  font-size: 28px;
  font-weight: 800;
  color: #14213D;
}

.wd-stat-lbl {
  font-size: 12px;
  font-weight: 700;
  color: #5C6479;
  margin-top: 4px;
}

.wd-card {
  background: #FFFFFF;
  border: 1.5px solid #E2DACB;
  border-radius: 24px;
  padding: 20px 22px;
}

.wd-dist-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 800;
}

.wd-dist-bar-bg {
  flex: 1 1 auto;
  height: 24px;
  background: #F7F3EC;
  border-radius: 8px;
  overflow: hidden;
}

.wd-dist-bar {
  height: 100%;
  background: #2B7F72;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 8px;
  box-sizing: border-box;
  min-width: 24px;
}

.wd-archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.wd-archive-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1.5px solid #E2DACB;
  background: #FBF8F2;
  color: #14213D;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.wd-archive-item--locked {
  opacity: 0.72;
}

.wd-jamo-breakdown {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wd-jamo-bd-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #CBD5E1;
}

.wd-jamo-bd-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.wd-jamo-syl-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 8px;
  border-radius: 12px;
}

.wd-jamo-syl-head {
  font-family: "Noto Serif KR", serif;
  font-weight: 900;
  font-size: 16px;
  color: #FFFFFF;
  margin-right: 2px;
}

.wd-jamo-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  border-radius: 8px;
  background: #2B7F72;
  color: #FFFFFF;
  font-family: "Noto Serif KR", serif;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  transition: transform 0.12s ease, background 0.12s ease;
}

.wd-jamo-chip:hover {
  background: #C8421C;
  transform: translateY(-1px);
}

@media (max-width: 900px) {
  .wd-container {
    max-width: 640px;
  }
  .wd-studio-grid {
    grid-template-columns: 1fr;
  }
  .wd-side-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .wd-main {
    padding: 18px 14px 104px;
  }
  .wd-board-wrap {
    padding: 14px 10px;
    border-radius: 22px;
  }
  .wd-row-word {
    width: 54px;
    font-size: 13px;
  }
  .wd-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .wd-key {
    height: 44px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .wd-guest-bar {
    padding: 10px 14px;
  }
  .wd-kb-row {
    gap: 3px;
  }
  .wd-key {
    min-width: 24px;
    font-size: 15px;
  }
}
