
.add-crossword{
  --add-burgundy:#7A1635;
  --add-gold:#D4B277;
  --add-paper:#FFFDFA;
  --add-charcoal:#332F2D;
  width:100%;
  color:var(--add-charcoal)
}
.add-cw-top{text-align:center;margin-bottom:22px}
.add-cw-edition{
  font-family:"Cormorant Garamond",Georgia,serif;
  color:var(--add-burgundy);
  font-size:24px;
  letter-spacing:.06em;
  margin-bottom:7px
}
.add-cw-save{
  font-family:Manrope,Arial,sans-serif;
  font-size:12px;
  color:#756D68
}
.add-save-dot{
  display:inline-block;
  width:7px;
  height:7px;
  margin-right:6px;
  border-radius:50%;
  background:var(--add-gold)
}
.add-cw-engine-status{
  margin-top:6px;
  font-family:Manrope,Arial,sans-serif;
  font-size:11px;
  color:#8c817a
}
.add-cw-engine-status.ready{
  color:#6c7553
}
.add-cw-layout{
  display:grid;
  grid-template-columns:minmax(420px,560px) 1fr;
  gap:45px;
  align-items:start
}
.add-cw-buttons{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:14px
}
.add-cw-buttons button{
  min-height:42px;
  padding:0 18px;
  border:1px solid var(--add-burgundy);
  background:rgba(255,253,250,.92);
  color:var(--add-burgundy);
  font-family:Manrope,Arial,sans-serif;
  font-size:12px;
  font-weight:600;
  cursor:pointer
}
.add-cw-buttons .add-check{
  background:var(--add-burgundy);
  color:#fff
}
.add-cw-message{
  min-height:23px;
  margin-bottom:9px;
  text-align:center;
  font-family:Manrope,Arial,sans-serif;
  font-size:13px;
  color:#756D68
}
.add-cw-grid{
  display:grid;
  grid-template-columns:repeat(var(--addcw-size),1fr);
  width:100%;
  max-width:560px;
  aspect-ratio:1/1;
  margin:0 auto;
  border:2px solid #302B29;
  background:#302B29;
  gap:1px
}
.add-cw-cell{
  position:relative;
  min-width:0;
  background:var(--add-paper)
}
.add-cw-cell.block{background:#302B29}
.add-cw-number{
  position:absolute;
  z-index:3;
  top:3px;
  left:4px;
  font-family:Manrope,Arial,sans-serif;
  font-size:10px;
  font-weight:700;
  line-height:1;
  color:#423A36;
  pointer-events:none
}
.add-cw-cell input{
  position:absolute;
  inset:0;
  box-sizing:border-box;
  width:100%;
  height:100%;
  border:0;
  outline:0;
  background:transparent;
  text-align:center;
  text-transform:uppercase;
  font-family:Manrope,Arial,sans-serif;
  font-size:28px;
  font-weight:600;
  color:#272321;
  caret-color:transparent;
  padding-top:7px
}
.add-cw-cell.active{background:#E4CCA1}
.add-cw-cell.incorrect{background:#F5E1E6}
.add-cw-cell.incorrect input{color:#A2264A}
.add-cw-cell.revealed{background:#F4EBD9}
.add-cw-cell.revealed input{color:#9B793E}
.add-cw-current-clue{
  min-height:46px;
  margin-top:16px;
  text-align:center;
  font-family:Manrope,Arial,sans-serif;
  font-size:14px;
  line-height:1.5;
  color:#58504B
}
.add-cw-clues{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:30px
}
.add-cw-clue-column h3{
  margin:0 0 12px;
  padding-bottom:7px;
  border-bottom:1px solid rgba(122,22,53,.22);
  font-family:"Cormorant Garamond",Georgia,serif;
  font-size:27px;
  font-weight:500;
  color:var(--add-burgundy)
}
.add-cw-clue-column ol{
  list-style:none;
  margin:0;
  padding:0
}
.add-cw-clue-column li{
  display:grid;
  grid-template-columns:28px 1fr;
  gap:5px;
  padding:7px 5px;
  font-family:Manrope,Arial,sans-serif;
  font-size:13px;
  line-height:1.45
}
.add-cw-clue-number{
  color:var(--add-burgundy);
  font-weight:700
}
.add-cw-test-note{
  margin-top:0;
  font-family:Manrope,Arial,sans-serif;
  font-size:13px;
  line-height:1.5;
  color:#756D68
}
@media(max-width:900px){
  .add-cw-layout{grid-template-columns:1fr;gap:35px}
  .add-cw-grid{max-width:650px}
  .add-cw-clues{max-width:650px;margin:0 auto}
}
@media(max-width:560px){
  .add-cw-clues{grid-template-columns:1fr}
  .add-cw-cell input{font-size:20px}
}

.add-cw-clues li { cursor:pointer; }
.add-cw-clues li.active-clue { font-weight:700; }
.add-cw-cell.word-active:not(.active) { background:#f3e6c8; }


/* After Dark Crossword interaction polish */
.add-cw-cell:not(.block) {
    transition: background-color .14s ease, box-shadow .14s ease;
}
.add-cw-cell:not(.block):hover,
.add-cw-cell:not(.block):focus-within {
    background: #F3E6C8 !important;
}
.add-cw-cell.word-active:not(.active) {
    background: #F3E6C8 !important;
}
.add-cw-cell.active {
    background: #D4B277 !important;
}
.add-cw-clues li {
    transition: background-color .14s ease;
    border-radius: 3px;
}
.add-cw-clues li:hover,
.add-cw-clues li.active-clue {
    background: #F3E6C8;
}
.add-cw-buttons button {
    transition: background-color .14s ease, border-color .14s ease, color .14s ease;
}
.add-cw-buttons button:hover,
.add-cw-buttons button:focus-visible {
    background: #D4B277 !important;
    border-color: #D4B277 !important;
    color: #350B1A !important;
}


/* v1.0.3 — ensure crossword controls sit above surrounding Breakdance layers */
.add-crossword {
    position: relative;
    z-index: 20;
}
.add-cw-top,
.add-cw-layout,
.add-cw-puzzle,
.add-cw-buttons,
.add-cw-message {
    position: relative;
    z-index: 21;
}
.add-cw-buttons {
    pointer-events: auto !important;
}
.add-cw-buttons button,
.add-check,
.add-reveal,
.add-reset {
    position: relative;
    z-index: 22;
    pointer-events: auto !important;
    cursor: pointer !important;
}


/* v1.0.4 — refined editorial controls and clue alignment */
.add-crossword .add-cw-buttons {
    gap: 12px;
    margin-bottom: 12px;
}

.add-crossword .add-cw-buttons button,
.add-crossword .add-cw-buttons .add-check,
.add-crossword .add-cw-buttons .add-reveal,
.add-crossword .add-cw-buttons .add-reset {
    min-height: 40px;
    padding: 0 17px;
    border: 0 !important;
    border-radius: 12px !important;
    background: var(--add-burgundy) !important;
    color: #FFFFFF !important;
    box-shadow:
        0 7px 15px rgba(53, 11, 26, .16),
        0 2px 5px rgba(53, 11, 26, .12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-family: Manrope, Arial, sans-serif;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    transition:
        transform .14s ease,
        box-shadow .14s ease,
        background-color .14s ease;
}

.add-crossword .add-cw-buttons button:hover,
.add-crossword .add-cw-buttons button:focus-visible {
    background: #8A1C3F !important;
    color: #FFFFFF !important;
    border: 0 !important;
    transform: translateY(-1px);
    box-shadow:
        0 9px 18px rgba(53, 11, 26, .19),
        0 3px 6px rgba(53, 11, 26, .13);
}

.add-crossword .add-cw-buttons button:active {
    transform: translateY(0);
    box-shadow:
        0 4px 9px rgba(53, 11, 26, .15),
        0 1px 3px rgba(53, 11, 26, .12);
}

.add-crossword .add-cw-btn-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF !important;
}

.add-crossword .add-cw-btn-icon svg {
    width: 18px;
    height: 18px;
    display: block;
    fill: none;
    stroke: #FFFFFF !important;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.add-crossword .add-cw-message {
    min-height: 22px;
    margin-bottom: 8px;
}

/* Place Across/Down headings level with the top of the crossword grid,
   while the action buttons remain above the grid. */
.add-crossword .add-cw-clues {
    margin-top: 82px;
}

.add-crossword .add-cw-clue-column h3 {
    color: var(--add-burgundy) !important;
    border-bottom-color: rgba(212, 178, 119, .72);
}

.add-crossword .add-cw-clue-column li {
    color: #4B413C;
}

.add-crossword .add-cw-clue-number {
    color: var(--add-burgundy) !important;
}

@media(max-width:900px){
    .add-crossword .add-cw-clues {
        margin-top: 0;
    }
}

@media(max-width:560px){
    .add-crossword .add-cw-buttons {
        gap: 8px;
    }
    .add-crossword .add-cw-buttons button,
    .add-crossword .add-cw-buttons .add-check,
    .add-crossword .add-cw-buttons .add-reveal,
    .add-crossword .add-cw-buttons .add-reset {
        min-height: 38px;
        padding: 0 13px;
        font-size: 11px;
        gap: 7px;
    }
    .add-crossword .add-cw-btn-icon,
    .add-crossword .add-cw-btn-icon svg {
        width: 16px;
        height: 16px;
        flex-basis: 16px;
    }
}


/* v1.0.5 — locked final desktop button refinement */
.add-crossword .add-cw-buttons {
    margin-top: 20px !important;
    margin-bottom: 20px !important;
}

.add-crossword .add-cw-buttons button,
.add-crossword .add-cw-buttons .add-check,
.add-crossword .add-cw-buttons .add-reveal,
.add-crossword .add-cw-buttons .add-reset {
    min-height: 40px !important;
    height: 40px;
    padding: 0 18px !important;
    border: 0 !important;
    border-radius: 20px !important;
    background: var(--add-burgundy) !important;
    color: #FFFFFF !important;
    box-shadow:
        0 7px 15px rgba(53, 11, 26, .16),
        0 2px 5px rgba(53, 11, 26, .12) !important;
}

.add-crossword .add-cw-btn-icon,
.add-crossword .add-cw-btn-icon svg {
    color: #FFFFFF !important;
    stroke: #FFFFFF !important;
}

/* Keep Across/Down level with the grid after adding button breathing room. */
.add-crossword .add-cw-clues {
    margin-top: 110px;
}

@media(max-width:900px){
    .add-crossword .add-cw-clues {
        margin-top: 0;
    }
}

@media(max-width:560px){
    .add-crossword .add-cw-buttons {
        margin-top: 16px !important;
        margin-bottom: 16px !important;
    }
    .add-crossword .add-cw-buttons button,
    .add-crossword .add-cw-buttons .add-check,
    .add-crossword .add-cw-buttons .add-reveal,
    .add-crossword .add-cw-buttons .add-reset {
        min-height: 38px !important;
        height: 38px;
        border-radius: 19px !important;
        padding: 0 13px !important;
    }
}
