/* =============================================================================
   THE LITTLE KEROSENE LAMP · corner widget
   ---------------------------------------------------------------------------
   A quiet, breathing invitation — not a toolbar button. Opens ボッキ's own
   words before it ever asks for support. Draggable (touch + mouse); wherever
   it lands blocks *something* on some screen, so the user parks it themselves.
   Position persists per-device in localStorage. Ported from Kagami-Mirai's
   corner lamp, re-themed to Aion's dark navy/gold cockpit palette.
   ============================================================================= */

#aionLampWidget {
    position: fixed; z-index: 60;
    width: 50px; height: 50px;
    padding: 0; margin: 0;
    -webkit-appearance: none; appearance: none; outline: none;
    touch-action: none; user-select: none; -webkit-user-select: none;
    border-radius: 50%;
    border: 1px solid rgba(215, 145, 38, 0.55);
    cursor: grab;
    background: radial-gradient(circle at 50% 42%, #5a3208, #2a1604 65%, #1a0d02 100%);
    display: flex; align-items: center; justify-content: center;
    line-height: 0;
    box-shadow: 0 0 14px 2px rgba(255, 150, 40, 0.30), 0 2px 10px rgba(0, 0, 0, 0.45);
    animation: lampBreathe 3.6s ease-in-out infinite;
    transition: transform 0.15s;
}
#aionLampWidget svg { filter: drop-shadow(0 0 5px rgba(255, 170, 60, 0.85)); pointer-events: none; }
#aionLampWidget:hover { transform: scale(1.08); }
#aionLampWidget:active { transform: scale(0.97); }
#aionLampWidget.dragging {
    cursor: grabbing; animation: none; transition: none;
    box-shadow: 0 0 22px 6px rgba(255, 160, 40, 0.55), 0 4px 16px rgba(0, 0, 0, 0.5);
}
@keyframes lampBreathe {
    0%, 100% { box-shadow: 0 0 14px 2px rgba(255, 150, 40, 0.30), 0 2px 10px rgba(0, 0, 0, 0.45); }
    50%      { box-shadow: 0 0 26px 7px rgba(255, 175, 60, 0.55), 0 2px 10px rgba(0, 0, 0, 0.45); }
}
@media (prefers-reduced-motion: reduce) { #aionLampWidget { animation: none; } }
@media print { #aionLampWidget { display: none !important; } }

/* ── Modal — matches the cockpit's dark navy/gold overlay language ──────── */
.lamp-modal {
    position: fixed; inset: 0; z-index: 9300;
    display: none; align-items: center; justify-content: center;
    padding: 24px;
}
.lamp-modal.show { display: flex; }
.lamp-modal-backdrop {
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at center, rgba(20, 14, 4, 0.88), rgba(2, 2, 8, 0.96));
    backdrop-filter: blur(6px);
}
.lamp-modal-shell {
    position: relative;
    width: min(520px, 95vw);
    max-height: 88vh;
    overflow-y: auto;
    background: linear-gradient(180deg, rgba(28, 20, 8, 0.97), rgba(10, 6, 2, 0.99));
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(255, 200, 80, 0.22);
    padding: 26px 30px 28px;
}
.lamp-modal-head {
    display: flex; align-items: center; gap: 14px;
    margin-bottom: 6px;
    position: relative;
}
.lamp-modal-hanko { width: 40px; height: 40px; object-fit: contain; flex-shrink: 0; }
.lamp-modal-ttl h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 22px; font-weight: 700;
    color: #ffd66a;
    text-shadow: 0 0 10px rgba(255, 200, 80, 0.4);
    margin: 0;
}
.lamp-modal-sub {
    font-size: 11px; color: #b09c70;
    letter-spacing: 0.04em; margin-top: 2px;
}
.lamp-modal-close {
    position: absolute; top: -4px; right: -6px;
    width: 30px; height: 30px;
    background: rgba(255, 100, 100, 0.18);
    color: #ff8aa6;
    border: 1px solid rgba(255, 138, 166, 0.4);
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
}
.lamp-modal-close:hover { background: rgba(255, 100, 100, 0.32); }

.lamp-hero {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 19px; color: #f8f4e6;
    margin: 14px 0 12px; text-align: center;
}
.lamp-copy { font-size: 13.5px; color: #c9c4b1; line-height: 1.7; text-align: left; }
.lamp-copy p { margin: 0 0 12px; }
.lamp-copy em { color: #ffd66a; font-style: italic; }
.lamp-sign { margin-top: 6px; font-size: 12.5px; color: #b09c70; font-style: italic; text-align: right; }

.lamp-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.lamp-btn {
    padding: 11px 20px; border-radius: 100px;
    font-size: 12.5px; letter-spacing: 0.02em;
    text-decoration: none; cursor: pointer;
    transition: all 0.15s;
    border: 1.5px solid rgba(255, 200, 80, 0.35);
    color: #f8f4e6;
    background: transparent;
}
.lamp-btn:hover { border-color: rgba(255, 200, 80, 0.7); transform: translateY(-1px); }
.lamp-btn-primary {
    background: linear-gradient(180deg, rgba(255, 200, 80, 0.28), rgba(200, 150, 50, 0.16));
    border-color: rgba(255, 200, 80, 0.6);
    color: #fff5d4;
    box-shadow: 0 0 14px rgba(255, 200, 80, 0.25);
}
.lamp-btn-primary:hover { box-shadow: 0 0 24px rgba(255, 200, 80, 0.5); }
