.wut{
    --paper: #FAF5EA;
    --paper-deep: #F1E9D8;
    --ink: #23262B;
    --ink-soft: #5B5B52;
    --brass: #C89B3C;
    --brass-deep: #A87F26;
    --teal: #2F6F5E;
    --teal-deep: #234F42;
    --tile-edge: #D8CDB8;
    --tile-shadow: rgba(35,38,43,0.18);
    --radius: 6px;
  }

  *{ box-sizing: border-box; }

  .wut{
    background: var(--paper);
    color: var(--ink);
    font-family: 'Public Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
    display:flex;
    flex-direction:column;
    align-items:center;
    padding: 40px 20px 60px;
    border-radius: 18px;
  }

  .wrap{ width:100%; max-width: 880px; }

  .eyebrow{
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brass-deep);
    text-align:center;
    margin-bottom: 14px;
  }

  .wut h1{
    font-family: 'Fraunces', serif !important;
    font-optical-sizing: auto;
    font-weight: 600;
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1.05;
    text-align:center;
    margin: 0 0 14px;
    color: var(--ink);
  }

  .sub{
    text-align:center;
    font-size: 19px;
    line-height: 1.5;
    color: var(--ink-soft);
    max-width: 560px;
    margin: 0 auto 40px;
  }

  .board{
    background: var(--paper-deep);
    border: 1px solid var(--tile-edge);
    border-radius: 16px;
    padding: 32px 28px;
    box-shadow: 0 2px 0 var(--tile-edge);
  }

  label.field-label{
    display:block;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--ink);
  }

  .tile-input-row{
    display:flex;
    flex-wrap:wrap;
    gap: 8px;
    margin-bottom: 20px;
  }

  .letter-tile{
    width: 52px;
    height: 52px;
    border-radius: var(--radius);
    background: #FFFCF5;
    border: 2px solid var(--tile-edge);
    box-shadow: 0 3px 0 var(--tile-edge);
    display:flex;
    align-items:center;
    justify-content:center;
    font-family: 'Fraunces', serif !important;
    font-weight: 700;
    font-size: 26px;
    text-transform: uppercase;
    text-align:center;
    color: var(--ink);
    outline: none;
    caret-color: var(--brass-deep);
  }

  .letter-tile:focus{
    border-color: var(--brass);
    box-shadow: 0 3px 0 var(--brass-deep);
  }

  .letter-tile.wild{
    color: var(--teal-deep);
  }

  input.letter-box{
    width: 52px;
    height: 52px;
    border-radius: var(--radius);
    background: #FFFCF5;
    border: 2px solid var(--tile-edge);
    box-shadow: 0 3px 0 var(--tile-edge);
    font-family: 'Fraunces', serif !important;
    font-weight: 700;
    font-size: 26px;
    text-transform: uppercase;
    text-align:center;
    color: var(--ink);
    outline: none;
    caret-color: var(--brass-deep);
    padding:0;
  }
  input.letter-box:focus{
    border-color: var(--brass);
    box-shadow: 0 3px 0 var(--brass-deep);
  }

  .add-remove{
    display:flex;
    align-items:center;
    gap:6px;
  }

  .stepper-btn{
    width: 44px;
    height: 52px;
    border-radius: var(--radius);
    border: 2px dashed var(--tile-edge);
    background: transparent;
    color: var(--ink-soft);
    font-size: 22px;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
  }
  .stepper-btn:hover{ border-color: var(--brass); color: var(--brass-deep); }

  .controls-row{
    display:flex;
    flex-wrap:wrap;
    gap: 14px;
    align-items:center;
    justify-content:space-between;
    margin-top: 4px;
  }

  .filter-group{
    display:flex;
    align-items:center;
    gap: 10px;
    font-size: 15px;
    color: var(--ink-soft);
  }

  select{
    font-family: 'Public Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    background: #FFFCF5;
    border: 2px solid var(--tile-edge);
    border-radius: var(--radius);
    padding: 8px 10px;
  }

  .btn-row{ display:flex; gap: 10px; }

  button.primary{
    background: var(--teal);
    color: #FFFCF5;
    border: none;
    font-family: 'Public Sans', sans-serif;
    font-weight: 700;
    font-size: 16px;
    padding: 14px 26px;
    border-radius: var(--radius);
    cursor:pointer;
    box-shadow: 0 3px 0 var(--teal-deep);
  }
  .wut button.primary:hover{
    background: var(--teal-deep) !important;
    color: #FFFCF5 !important;
    border-color: transparent !important;
    filter: none;
  }
  .wut button.primary:active{ transform: translateY(2px); box-shadow: 0 1px 0 var(--teal-deep); }
  .wut button.primary:focus{ background: var(--teal) !important; color: #FFFCF5 !important; }

  button.ghost{
    background: transparent;
    color: var(--ink-soft);
    border: 2px solid var(--tile-edge);
    font-family: 'Public Sans', sans-serif;
    font-weight: 700;
    font-size: 16px;
    padding: 12px 22px;
    border-radius: var(--radius);
    cursor:pointer;
  }
  .wut button.ghost:hover{
    border-color: var(--brass) !important;
    color: var(--brass-deep) !important;
    background: transparent !important;
  }
  .wut button.ghost:focus{ border-color: var(--brass) !important; color: var(--brass-deep) !important; }

  .status-line{
    margin: 28px 0 16px;
    display:flex;
    align-items:baseline;
    justify-content:space-between;
    flex-wrap:wrap;
    gap:10px;
  }

  .status-line .count{
    font-family: 'Fraunces', serif !important;
    font-weight: 600;
    font-size: 22px;
  }
  .status-line .count .num{ color: var(--teal-deep); }

  .results{
    display:flex;
    flex-direction:column;
    gap: 18px;
  }

  .length-group{
    background: #FFFCF5;
    border: 1px solid var(--tile-edge);
    border-radius: 12px;
    padding: 18px 20px;
  }

  .length-group h3{
    margin: 0 0 12px;
    font-family: 'Public Sans', sans-serif;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
  }

  .word-grid{
    display:flex;
    flex-wrap:wrap;
    gap: 10px;
  }

  .word-chip{
    display:flex;
    align-items:center;
    gap: 6px;
    background: var(--paper-deep);
    border: 1px solid var(--tile-edge);
    border-radius: 8px;
    padding: 8px 10px 8px 12px;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--ink);
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
  }

  a.word-chip:hover{
    border-color: var(--brass);
    background: #FFFCF5;
  }

  .word-chip-nodef{
    opacity: 0.5;
    cursor: default;
    border-style: dashed;
  }
  .word-chip-nodef:hover{
    border-color: var(--tile-edge) !important;
    background: var(--paper-deep) !important;
  }

  .wut .word-chip .score{
    font-family: 'Public Sans', sans-serif !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #FFFCF5 !important;
    background: var(--brass) !important;
    border-radius: 50% !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    display:flex;
    align-items:center;
    justify-content:center;
    flex-shrink:0;
    line-height: 1 !important;
  }

  .empty-state{
    text-align:center;
    padding: 50px 20px;
    color: var(--ink-soft);
    font-size: 16px;
  }

  .wut-footer{
    max-width: 880px;
    width:100%;
    text-align:center;
    margin-top: 48px;
    font-size: 14px;
    color: var(--ink-soft);
    line-height:1.6;
  }

  @media (max-width: 560px){
    .letter-tile, input.letter-box{ width: 42px; height: 46px; font-size: 21px; }
    .stepper-btn{ width: 36px; height: 46px; }
    .board{ padding: 22px 16px; }
  }