:root {
  color-scheme: dark;
  --bg: #090d18;
  --panel: rgba(18, 25, 42, .82);
  --panel-border: rgba(166, 183, 218, .13);
  --text: #e8edf8;
  --muted: #8c9ab5;
  --amber: #ffc878;
  --amber-bright: #fff0c5;
  --teal: #75d9d0;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  color: var(--text); font-family: var(--font);
  background:
    radial-gradient(ellipse at 50% 27%, rgba(42, 51, 83, .3), transparent 43%),
    radial-gradient(ellipse at 90% 75%, rgba(20, 73, 82, .12), transparent 40%),
    var(--bg);
}
button, input, textarea, select { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
.ambient { position: fixed; pointer-events: none; filter: blur(75px); opacity: .14; border-radius: 50%; z-index: 0; }
.ambient-one { width: 280px; height: 280px; top: 12%; left: -150px; background: #b77d37; }
.ambient-two { width: 350px; height: 350px; right: -220px; bottom: 5%; background: #237c8a; }
.topbar {
  position: relative; z-index: 1; display: flex; align-items: center;
  justify-content: space-between; gap: 20px; padding: 22px clamp(20px, 5vw, 76px);
  border-bottom: 1px solid rgba(173, 190, 220, .09);
}
.wordmark { display: inline-flex; align-items: center; gap: 11px; font-size: 11px; letter-spacing: .18em; font-weight: 750; }
.wordmark-mark { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid #d3a968; border-radius: 50%; color: var(--amber); font-size: 14px; }
.muted, .system-state { color: var(--muted); }
.system-state { display: flex; align-items: center; gap: 9px; font-size: 9px; letter-spacing: .13em; }
.status-dot { display: inline-block; width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: #8cceb2; box-shadow: 0 0 9px rgba(140, 206, 178, .45); }
.status-muted { background: #77849c; box-shadow: none; }
.state-divider { opacity: .4; }
.layout { position: relative; z-index: 1; max-width: 980px; margin: 0 auto; padding: 58px 24px 30px; }
.welcome { max-width: 600px; margin: 0 auto; text-align: center; }
.eyebrow { margin: 0 0 14px; color: var(--teal); font-size: 9px; letter-spacing: .22em; font-weight: 750; }
h1 { margin: 0; font-size: clamp(39px, 6vw, 62px); line-height: 1.08; letter-spacing: -.055em; font-weight: 550; }
h1 span { color: #b5c2db; font-weight: 400; }
.intro { max-width: 460px; margin: 20px auto 0; color: #9eabc3; font-size: 14px; line-height: 1.85; }
.lantern-stage {
  position: relative; display: flex; flex-direction: column; align-items: center;
  min-height: 355px; padding-top: 12px; isolation: isolate;
}
.lantern {
  position: relative; z-index: 2; width: 222px; height: 230px; margin-top: 8px;
  padding: 0; border: 0; background: transparent; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.lantern:focus-visible { outline: 2px solid var(--amber); outline-offset: 8px; border-radius: 50%; }
.orb-glass {
  position: absolute; left: 27px; top: 22px; width: 168px; height: 168px;
  display: block; overflow: hidden; border-radius: 50%;
  border: 1px solid rgba(255, 236, 194, .57);
  background:
    radial-gradient(ellipse at 32% 23%, rgba(255,255,255,.8), transparent 9%),
    radial-gradient(circle at 36% 32%, rgba(255,236,192,.65), transparent 15%),
    radial-gradient(circle at 52% 56%, rgba(255,181,87,.25), transparent 48%),
    radial-gradient(circle at 50% 60%, #30263a 0%, #161b30 54%, #11192b 74%);
  box-shadow: inset 0 0 22px rgba(255, 227, 177, .19), inset -12px -17px 26px rgba(4, 9, 22, .75), 0 0 18px rgba(255, 183, 91, .12);
  transition: box-shadow .7s ease, border-color .7s ease, transform .7s ease;
}
.orb-reflection {
  position: absolute; left: 24px; top: 13px; width: 39px; height: 18px;
  border-top: 2px solid rgba(255,255,255,.66); border-radius: 50%; transform: rotate(-42deg); filter: blur(.3px);
}
.orb-core {
  position: absolute; left: 56px; top: 57px; width: 54px; height: 54px; border-radius: 50%;
  opacity: .66; transform: scale(.78);
  background: radial-gradient(circle, #fff9dc 0%, #ffd98c 15%, #ffac4d 34%, rgba(255,154,67,.22) 65%, transparent 74%);
  filter: blur(2px);
  transition: opacity .65s ease, transform .65s ease, filter .65s ease;
}
.orb-spark {
  position: absolute; left: 82px; top: 76px; width: 7px; height: 7px; border-radius: 50%;
  background: #fff7d4; opacity: .55; box-shadow: 0 0 12px 4px rgba(255, 211, 127, .55);
  transition: opacity .65s ease, box-shadow .65s ease;
}
.orb-ring {
  position: absolute; left: 29px; top: 29px; width: 108px; height: 108px;
  border: 1px solid rgba(255, 216, 151, .13); border-radius: 50%;
  transform: rotateX(63deg) rotateZ(-20deg);
}
.orb-halo {
  position: absolute; inset: -5px 0 15px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 178, 83, .09), transparent 65%);
  opacity: .65; filter: blur(9px); transition: opacity .7s ease, background .7s ease;
}
.orb-shadow {
  position: absolute; left: 42px; bottom: 11px; width: 138px; height: 22px; border-radius: 50%;
  background: rgba(0,0,0,.6); filter: blur(10px); transition: all .7s ease;
}
.lantern.awake .orb-glass {
  border-color: rgba(255, 231, 177, .95);
  box-shadow: inset 0 0 30px rgba(255, 235, 184, .3), inset -12px -17px 26px rgba(4, 9, 22, .48), 0 0 18px rgba(255, 183, 91, .5), 0 0 55px rgba(255, 173, 72, .28), 0 0 105px rgba(255, 164, 68, .13);
  transform: translateY(-3px) scale(1.025);
}
.lantern.awake .orb-core { opacity: 1; transform: scale(1.45); filter: blur(1px); }
.lantern.awake .orb-spark { opacity: 1; box-shadow: 0 0 20px 9px rgba(255, 224, 147, .8); }
.lantern.awake .orb-halo { opacity: 1; background: radial-gradient(ellipse, rgba(255, 185, 91, .26), transparent 68%); }
.lantern.awake .orb-shadow { width: 120px; left: 51px; opacity: .7; }
.orbital { position: absolute; z-index: -1; left: 50%; top: 87px; width: 295px; height: 115px; border: 1px solid rgba(131, 173, 203, .16); border-radius: 50%; transform: translateX(-50%) rotate(-18deg); pointer-events: none; }
.orbit-two { width: 260px; height: 155px; transform: translateX(-50%) rotate(52deg); border-color: rgba(255, 199, 120, .13); }
.star { position: absolute; color: #d8c59c; opacity: .7; }
.star-one { top: 50px; left: calc(50% - 153px); font-size: 15px; }
.star-two { top: 144px; right: calc(50% - 168px); font-size: 27px; }
.star-three { top: 16px; right: calc(50% - 105px); font-size: 14px; color: var(--teal); }
.lantern-caption { text-align: center; margin-top: -4px; }
.lantern-caption h2 { margin: 0; font-size: 20px; font-weight: 550; letter-spacing: .04em; }
.lantern-caption p { margin: 8px 0 12px; color: #a4b0c7; font-size: 12px; }
.click-hint { color: #697790; font-size: 8px; letter-spacing: .18em; }
.workbench { margin-top: 28px; padding: 27px; border: 1px solid var(--panel-border); border-radius: 18px; background: linear-gradient(135deg, rgba(21,29,47,.9), rgba(13,19,33,.86)); box-shadow: 0 20px 60px rgba(0,0,0,.12); }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 24px; }
.section-heading .eyebrow { margin-bottom: 8px; }
.section-heading h2, .connection-copy h2 { margin: 0; font-size: 20px; font-weight: 550; letter-spacing: -.025em; }
.count-pill { color: #a5b1c8; border: 1px solid var(--panel-border); border-radius: 20px; padding: 7px 10px; font-size: 10px; white-space: nowrap; }
.note-form { display: flex; flex-direction: column; gap: 10px; }
.note-form label { margin-top: 6px; color: #9eabc3; font-size: 9px; font-weight: 700; letter-spacing: .13em; }
.note-form select, .note-form textarea {
  width: 100%; border: 1px solid rgba(156,176,213,.18); border-radius: 9px;
  background: rgba(6,11,23,.62); color: var(--text); padding: 12px 13px; outline: none;
}
.note-form select { max-width: 240px; }
.note-form textarea { resize: vertical; min-height: 100px; line-height: 1.65; }
.note-form select:focus, .note-form textarea:focus { border-color: rgba(117,217,208,.7); box-shadow: 0 0 0 3px rgba(117,217,208,.07); }
.note-form textarea::placeholder { color: #66748d; }
.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 5px; }
.form-note { color: #73819a; font-size: 10px; }
.primary-button, .secondary-button { border-radius: 9px; padding: 11px 15px; font-size: 11px; font-weight: 700; cursor: pointer; transition: transform .15s ease, background .2s ease; }
.primary-button { color: #1c1a18; border: 1px solid #ffd995; background: linear-gradient(135deg, #ffe4ae, #e8ae60); }
.primary-button:hover { background: #ffedc7; transform: translateY(-1px); }
.primary-button span { padding-left: 9px; }
.inline-status { min-height: 14px; margin: 0; color: var(--teal); font-size: 11px; }
.saved-heading { display: flex; justify-content: space-between; align-items: center; margin: 25px 0 10px; padding-top: 18px; border-top: 1px solid rgba(156,176,213,.11); }
.saved-heading h3 { margin: 0; font-size: 12px; font-weight: 650; }
.text-button { border: 0; background: transparent; color: var(--teal); cursor: pointer; font-size: 10px; }
.notes-list { display: grid; gap: 9px; }
.empty-state { padding: 21px 12px; text-align: center; color: #75839c; font-size: 11px; border: 1px dashed rgba(156,176,213,.15); border-radius: 9px; }
.note-card { padding: 14px; border: 1px solid rgba(156,176,213,.12); border-radius: 10px; background: rgba(6,11,23,.38); }
.note-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.note-kind { color: var(--amber); font-size: 9px; letter-spacing: .12em; font-weight: 750; }
.note-date { color: #74819a; font-size: 9px; }
.note-text { margin: 0; color: #d6deed; font-size: 12px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.connection-panel { display: flex; align-items: center; gap: 19px; margin-top: 18px; padding: 23px; border: 1px solid var(--panel-border); border-radius: 15px; background: rgba(13,19,33,.7); }
.connection-icon { display: grid; place-items: center; flex: 0 0 43px; width: 43px; height: 43px; border: 1px solid rgba(117,217,208,.22); border-radius: 13px; color: var(--teal); font-size: 23px; }
.connection-copy { flex: 1; min-width: 0; }
.connection-copy .eyebrow { margin-bottom: 7px; }
.connection-copy h2 { font-size: 17px; }
.connection-copy > p:not(.eyebrow) { max-width: 560px; margin: 9px 0; color: #8e9cb5; font-size: 11px; line-height: 1.8; }
.connection-state { display: flex; align-items: center; gap: 8px; color: #8190a9; font-size: 8px; letter-spacing: .12em; }
.secondary-button { flex: 0 0 auto; color: #7f8ba2; background: rgba(6,11,23,.4); border: 1px solid rgba(156,176,213,.16); cursor: not-allowed; }
.footer { display: flex; justify-content: space-between; gap: 12px; padding: 26px 2px 0; color: #66738a; font-size: 9px; letter-spacing: .08em; }
.footer span:first-child { color: #aab5c9; }
.footer a { color: #9daec5; }
@media (max-width: 620px) {
  .topbar { padding: 17px 18px; }
  .system-state { font-size: 8px; gap: 6px; }
  .layout { padding: 44px 16px 22px; }
  .intro { font-size: 13px; }
  .lantern-stage { min-height: 340px; }
  .workbench { padding: 19px 15px; }
  .section-heading h2 { font-size: 18px; }
  .form-footer { align-items: flex-start; flex-direction: column; }
  .connection-panel { align-items: flex-start; flex-wrap: wrap; padding: 18px; }
  .connection-copy { flex-basis: calc(100% - 65px); }
  .secondary-button { margin-left: 62px; }
  .footer { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
