/* Boxing method — Cornell-style sheet + draggable labeled boxes */

.boxing-notes-page .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.boxing-notes-page {
    background: #000000;
    min-height: calc(100vh - 56px);
    padding: clamp(1rem, 4vw, 2rem);
    box-sizing: border-box;
}

.boxing-notes-inner {
    max-width: 960px;
    margin: 0 auto;
}

.boxing-notes-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 1rem;
    padding: 0.35rem 0.5rem;
    background: transparent;
    border: none;
    color: #3dd68c;
    font-size: 0.95rem;
    cursor: pointer;
    font-family: inherit;
}

.boxing-notes-back:hover {
    text-decoration: underline;
}

.boxing-notes-page h1 {
    color: #f8fafc;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 0 0.35rem 0;
    font-size: clamp(1.35rem, 4vw, 1.75rem);
}

.boxing-notes-lede {
    color: #94a3b8;
    margin: 0 0 1.25rem 0;
    font-size: 0.95rem;
    line-height: 1.45;
}

.boxing-notes-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-bottom: 1rem;
}

.boxing-notes-toolbar-btn {
    padding: 0.45rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(61, 214, 140, 0.45);
    background: linear-gradient(135deg, #2eb574 0%, #3dd68c 100%);
    color: #041208;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.boxing-notes-toolbar-btn:hover {
    filter: brightness(1.06);
}

.boxing-notes-toolbar-btn--secondary {
    background: transparent;
    color: #3dd68c;
    border-color: rgba(61, 214, 140, 0.45);
}

.boxing-notes-toolbar-btn--secondary:hover {
    background: rgba(61, 214, 140, 0.1);
}

.boxing-notes-toolbar-icon {
    font-weight: 800;
}

.boxing-notes-save-status {
    font-size: 0.85rem;
    color: #94a3b8;
    flex: 1 1 auto;
    min-width: 120px;
}

.boxing-notes-save-status.is-error {
    color: #f87171;
}

.boxing-notes-save-status.is-ok {
    color: #3dd68c;
}

.boxing-notes-sheet {
    border: 1px solid rgba(61, 214, 140, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.boxing-notes-title-row {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(61, 214, 140, 0.15);
    background: rgba(0, 0, 0, 0.25);
}

.boxing-notes-title-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.5rem 0.65rem;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.6);
    color: #f1f5f9;
    font-size: 1rem;
    font-family: inherit;
}

.boxing-notes-title-input::placeholder {
    color: #64748b;
}

.boxing-notes-title-input:focus {
    outline: none;
    border-color: rgba(61, 214, 140, 0.55);
    box-shadow: 0 0 0 2px rgba(61, 214, 140, 0.15);
}

.boxing-notes-topic-block {
    padding: 0.65rem 1rem 0.75rem;
    border-bottom: 1px solid rgba(61, 214, 140, 0.12);
    background: rgba(0, 0, 0, 0.15);
}

.boxing-notes-panel-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 0.4rem;
}

.boxing-notes-topic-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.5rem 0.65rem;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.35);
    color: #e2e8f0;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-align: center;
    font-family: inherit;
}

.boxing-notes-topic-input::placeholder {
    color: #64748b;
    font-weight: 600;
}

.boxing-notes-topic-input:focus {
    outline: none;
    border-color: rgba(61, 214, 140, 0.45);
}

.boxing-notes-canvas-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid rgba(61, 214, 140, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.boxing-notes-canvas {
    position: relative;
    min-height: min(62vh, 560px);
    background: rgba(0, 0, 0, 0.2);
    background-image: radial-gradient(rgba(61, 214, 140, 0.06) 1px, transparent 1px);
    background-size: 20px 20px;
}

.boxing-notes-canvas-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    text-align: center;
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.5;
    pointer-events: none;
}

.boxing-notes-box {
    position: absolute;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(61, 214, 140, 0.4);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.65);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    overflow: visible;
    min-width: 200px;
    min-height: 160px;
}

.boxing-notes-box--dragging {
    opacity: 0.92;
    z-index: 50;
    box-shadow: 0 8px 32px rgba(61, 214, 140, 0.15);
}

.boxing-box-chrome {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    padding: 0.25rem 0.4rem;
    background: rgba(61, 214, 140, 0.12);
    border-bottom: 1px solid rgba(61, 214, 140, 0.2);
    cursor: grab;
    user-select: none;
}

.boxing-box-chrome:active {
    cursor: grabbing;
}

.boxing-box-drag-hint {
    font-size: 0.75rem;
    color: #94a3b8;
}

.boxing-box-remove {
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    border: 1px solid rgba(248, 113, 113, 0.35);
    background: transparent;
    color: #f87171;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    font-family: inherit;
}

.boxing-box-remove:hover {
    background: rgba(248, 113, 113, 0.1);
}

.boxing-box-label-wrap {
    flex-shrink: 0;
    margin: -0.5rem 0.75rem 0;
    padding: 0.15rem 0.5rem;
    align-self: center;
    background: linear-gradient(180deg, rgba(61, 214, 140, 0.2) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(61, 214, 140, 0.45);
    border-radius: 6px;
    z-index: 2;
}

.boxing-box-heading {
    width: 100%;
    min-width: 140px;
    max-width: 220px;
    box-sizing: border-box;
    padding: 0.2rem 0.25rem;
    border: none;
    background: transparent;
    color: #3dd68c;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: center;
    font-family: inherit;
}

.boxing-box-heading::placeholder {
    color: #64748b;
    text-transform: none;
    font-weight: 600;
}

.boxing-box-heading:focus {
    outline: none;
}

.boxing-box-body {
    flex: 1;
    min-height: 0;
    width: 100%;
    box-sizing: border-box;
    margin: 0.35rem 0.5rem 0.5rem;
    padding: 0.45rem 0.5rem;
    border: none;
    border-radius: 6px;
    resize: none;
    background: rgba(0, 0, 0, 0.25);
    color: #e2e8f0;
    font-size: 0.9rem;
    line-height: 1.45;
    font-family: inherit;
}

.boxing-box-body::placeholder {
    color: #64748b;
}

.boxing-box-body:focus {
    outline: none;
    background: rgba(0, 0, 0, 0.35);
}

@media (max-width: 640px) {
    .boxing-notes-box {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        width: 100% !important;
        margin-bottom: 0.75rem;
    }

    .boxing-notes-canvas {
        min-height: auto;
        padding: 0.75rem;
    }
}
