

.number-layer       {z-index: 15;}
.board-canvas       {z-index: 13;}
.hint-diag-layer    {z-index: 12;}
.hint-rowcol-layer  {z-index: 11;}
.hint-edge-layer    {z-index: 10;}
.bg-layer           {z-index: 4;}

.layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: auto;
}

.board-canvas {
    pointer-events: none; !important;
}

.board-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    margin: auto;
    overflow: visible;
}

.bg-layer {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    grid-template-rows: repeat(9, 1fr);
    cursor: default;
    touch-action: none; /* Prevent browser gestures */
}

.cell {
    background-color: transparent;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5vmin;
    font-weight: 400;
    color: #000;
    user-select: none;
    transition: background-color 0.2s;
    pointer-events: auto;
    cursor: default;
}

.cell.clickable:hover {
    background-color: rgba(0, 0, 0, 0.05);
}
.cell.selectable:hover {
    background-color: rgba(0, 0, 0, 0.03);
}
.cell.selected { }

.hint-dot {
    position: absolute;
    background-color: #7FBCFF;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.hint-dot:hover {
    transform: translate(-50%, -50%) scale(1.4);
}
.hint-dot.selected {
    background: #3399ff;
    box-shadow: 0 0 5px #3399ff;
}

.hint-rc-label {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background-color: transparent;
    font-size: 2vmin;
    font-weight: bold;
    color: #333;
    user-select: none;
    cursor: pointer;
    pointer-events: auto;
    white-space: nowrap;
    transition: color 0.2s ease, transform 0.2s ease;
}
.hint-rc-label:hover {
    background-color: #eef6ff;
}
.hint-rc-label.selected {
    background-color: #cce6ff;
    color: #000;
}

.number-layer {
    pointer-events: none;
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    grid-template-rows: repeat(9, 1fr);
}

.cell-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    user-select: none;
    overflow: hidden;
}


.cell-content.multi-color-background {
    transition: background 0.3s ease;
}

.value-layer {
    font-weight: 400;
    text-align: center;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.value-layer.fixed {
    color: black;
}
.value-layer.editable {
    color: blue;
}
.value-layer.editable.solution-style {
    color: green;
}

.candidate-layer {
    position: absolute;
    top: 15%;
    left: 15%;
    width: 70%;
    height: 70%;
    aspect-ratio: 1 / 1;
    display: grid;
    grid-template-columns: repeat(3, 33.33%);
    grid-template-rows: repeat(3, 33.33%);
    pointer-events: none;
}

.candidate-cell {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal !important;
}

.centered-candidate-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal !important;
    color: gray;
    pointer-events: none;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
}

.hidden {
    display: none !important;
}

.hint-diag-label {
    position: absolute;
    width: 24px;   /* or dynamically set via JS */
    height: 24px;  /* same as width */
    pointer-events: all;

    display: flex;
    justify-content: center;
    align-items: center;

    font-size: 1.1em;
    background-color: rgba(255, 255, 255, 0.0);
    border-radius: 4px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;

    transform: translate(-100%, -100%); /* anchors bottom-right to base point */
}

.hint-diag-label:hover {
    background-color: #d0eaff;
    font-weight: bold;
}

.hint-diag-label i::before {
    width: 100%;
    height: 100%;
    display: block;
    line-height: 1;
    text-align: center;
}

