@import url('https://fonts.bunny.net/css?family=caveat:500|lora:400|roboto-mono:400|special-elite:400');

.sticky-page { min-height: 100vh; overflow: hidden; }
.sticky-shell { position: fixed; inset: 0; width: 100%; height: 100dvh; margin: 0; padding: 0; }
.sticky-header { position: absolute; top: calc(70px + env(safe-area-inset-top)); left: 18px; right: 18px; z-index: 80; display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 7px; background: rgba(18,19,19,.82); box-shadow: 0 8px 24px rgba(0,0,0,.28); backdrop-filter: blur(8px); }
.sticky-header h1 { margin: 0; color: var(--text-primary, #f4f4f1); font-size: clamp(1.7rem, 4vw, 2.7rem); letter-spacing: 0; }
.sticky-header p { margin: 6px 0 0; color: var(--text-muted, #a8aaa8); }
.sticky-account-actions { display: flex; align-items: center; gap: 8px; }
.icon-text-button, .primary-action, .secondary-action, .pay-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; border: 1px solid #555; border-radius: 6px; padding: 9px 14px; color: #f6f5ef; background: #202223; font: inherit; cursor: pointer; }
.primary-action, .pay-button { border-color: var(--accent, #f2a900); background: var(--accent, #f2a900); color: #111; font-weight: 700; }
.sticky-board { position: absolute; inset: 0; overflow: hidden; isolation: isolate; background-color: #9b6d45; background-image: url('/img/grain.png'); background-blend-mode: soft-light; box-shadow: inset 0 0 90px rgba(39, 19, 6, .46); cursor: grab; touch-action: none; }
.sticky-board.is-panning { cursor: grabbing; }
.sticky-board::after { content: ''; position: absolute; inset: 0; z-index: -1; opacity: .2; background-image: url('/img/grain.png'); pointer-events: none; }
.sticky-canvas { position: absolute; top: 0; left: 0; width: 2600px; height: 1800px; transform-origin: 0 0; will-change: transform; }
.board-status { position: absolute; inset: 50% auto auto 50%; translate: -50% -50%; padding: 8px 12px; color: rgba(255,255,255,.72); background: rgba(32, 20, 12, .5); border-radius: 4px; }
.sticky-note { --note: #f7dc63; --note-font-size: 17px; --note-letter-spacing: 0; position: absolute; width: 220px; aspect-ratio: 1; padding: 22px 18px 18px; overflow: hidden; color: #26231e; background: var(--note); box-shadow: 2px 5px 12px rgba(31, 16, 5, .3); font-family: 'Special Elite', 'Courier New', monospace; font-size: var(--note-font-size); line-height: 1.42; letter-spacing: var(--note-letter-spacing); white-space: pre-wrap; overflow-wrap: anywhere; transform: translate(-50%, -50%) rotate(var(--rotation, 0deg)); }
.sticky-note--dense { --note-letter-spacing: -.025em; padding: 1.42em 1em; }
.sticky-note::before { content: ''; position: absolute; inset: 0; opacity: .16; background-image: url('/img/grain.png'); pointer-events: none; }
.sticky-note--pink { --note: #f3a7c4; }.sticky-note--blue { --note: #91d2eb; }.sticky-note--green { --note: #acd986; }.sticky-note--orange { --note: #f4b266; }
.sticky-note--font-mono { font-family: 'Roboto Mono', 'Courier New', monospace; }.sticky-note--font-handwritten { font-family: 'Caveat', cursive; }.sticky-note--font-serif { font-family: 'Lora', Georgia, serif; }
.sticky-note__text { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; text-align: center; }
.sticky-note__pin { position: absolute; top: 7px; left: 50%; z-index: 3; width: 16px; height: 16px; translate: -50% 0; border: 2px solid rgba(90, 9, 6, .7); border-radius: 50%; background: #c32920; box-shadow: 1px 2px 3px rgba(0,0,0,.45); cursor: pointer; }
.sticky-note__author { position: absolute; right: 10px; bottom: 7px; z-index: 2; max-width: 76%; overflow: hidden; color: rgba(38,35,30,.58); font-family: var(--site-font, monospace); font-size: .58rem; text-overflow: ellipsis; white-space: nowrap; }
.sticky-note--placing { z-index: 500; width: 240px; cursor: grab; outline: 2px dashed rgba(255,255,255,.8); box-shadow: 5px 12px 24px rgba(0,0,0,.42); user-select: none; }
.sticky-note--placing:active { cursor: grabbing; }
.sticky-dialog { width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 1px solid #4b4d4d; border-radius: 8px; background: #17191a; color: #f3f3f1; box-shadow: 0 24px 75px rgba(0,0,0,.64); }
.sticky-dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(4px); }
.dialog-inner { position: relative; padding: 26px; overflow: auto; }
.dialog-inner h2 { margin: 0 42px 8px 0; color: var(--accent, #f2a900); letter-spacing: 0; }
.dialog-inner > p { color: #bfc1bf; line-height: 1.55; }
.dialog-close { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 38px; height: 38px; border: 0; background: transparent; color: #aaa; font-size: 22px; cursor: pointer; }
.login-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 20px 0; }
.login-methods button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; border: 1px solid #505354; border-radius: 6px; background: #242627; color: #f1f1ee; font: inherit; cursor: pointer; }
.login-field { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; margin: 10px 0; }
.login-field input { min-width: 0; height: 42px; border: 1px solid #505354; border-radius: 5px; padding: 0 10px; background: #101112; color: #f2f2ef; font: inherit; }
.login-field button { height: 42px; border: 1px solid var(--accent, #f2a900); border-radius: 5px; background: transparent; color: var(--accent, #f2a900); cursor: pointer; }
.private-key-login { margin-top: 18px; color: #bbb; }.private-key-login summary { color: #ddd; cursor: pointer; }.private-key-login p { font-size: .84rem; }
.inline-status { min-height: 1.4em; margin-top: 12px; color: #c6c8c6; font-size: .88rem; text-align: center; }
.inline-status.is-error { color: #ff7b75; }
.account-card { display: grid; gap: 10px; }.account-card code { overflow: hidden; color: #aaa; text-overflow: ellipsis; }.account-card .secondary-action { margin-top: 10px; }
.composer-dialog { width: min(440px, calc(100vw - 20px)); }.composer-inner { display: grid; justify-items: center; }
.draft-note { position: relative; width: min(280px, calc(100vw - 82px)); margin: 16px auto 12px; padding: 22px; transform: none; }
.sticky-editor { position: absolute; top: 50%; left: 22px; right: 22px; z-index: 1; min-height: 1.42em; max-height: calc(100% - 44px); overflow: hidden; outline: none; text-align: center; white-space: pre-wrap; overflow-wrap: anywhere; transform: translateY(-50%); }
.draft-note.sticky-note--dense .sticky-editor { left: 1em; right: 1em; max-height: calc(100% - 2.84em); }
.sticky-editor:empty::before { content: attr(data-placeholder); color: rgba(38,35,30,.42); }
.color-swatches { display: flex; gap: 12px; margin: 4px 0 8px; }.swatch { width: 30px; height: 30px; border: 2px solid transparent; border-radius: 50%; background: #f7dc63; cursor: pointer; }.swatch--pink { background:#f3a7c4 }.swatch--blue { background:#91d2eb }.swatch--green { background:#acd986 }.swatch--orange { background:#f4b266 }.swatch.is-selected { border-color: #fff; box-shadow: 0 0 0 2px var(--accent, #f2a900); }
.composer-count { min-height: 22px; color: #aeb0ae; font-size: .8rem; }.composer-count #noteCapacity { transition: color .16s ease, text-shadow .16s ease; }.composer-count #noteCapacity.is-almost-full { color: var(--accent, #f2a900); }.composer-count #noteCapacity.is-full { color: #ff625b; font-weight: 700; text-shadow: 0 0 10px rgba(255,98,91,.25); }.pay-button { width: min(280px, 100%); margin-top: 8px; }
.payment-dialog { width:min(360px,calc(100vw - 24px)); }.sticky-payment { display:grid; justify-items:center; gap:10px; padding:24px; background:#101112; }.sticky-payment strong { padding-right:38px; color:var(--accent,#f2a900); font-size:1.05rem; }.sticky-payment img { width:min(230px,70vw); aspect-ratio:1; border:8px solid #fff; background:#fff; image-rendering:pixelated; }.sticky-payment code { display:block; width:100%; overflow:hidden; color:#aeb0ae; font-size:.68rem; text-overflow:ellipsis; white-space:nowrap; }.sticky-payment .secondary-action { min-height:36px; padding:6px 10px; }.sticky-payment p { margin:0; color:#aeb0ae; font-size:.78rem; }
.rail-tabs { display:grid; grid-template-columns:1fr 1fr; gap:6px; width:100%; }.rail-tabs[hidden] { display:none; }.rail-tab { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:38px; border:1px solid #505354; border-radius:5px; background:#101112; color:#d5d6d3; font:inherit; font-size:.86rem; cursor:pointer; }.rail-tab:hover { border-color:#8a8c8a; }.rail-tab.is-active { border-color:var(--accent,#f2a900); color:#fff; box-shadow:inset 0 0 0 1px var(--accent,#f2a900); }
.font-choice { width: min(320px, 100%); margin: 7px 0; padding: 0; border: 0; color: #c5c7c5; }.font-choice legend { margin: 0 auto 7px; font-size: .78rem; }.font-options { display:grid; grid-template-columns:1fr 1fr; gap:6px; }.font-option { min-height:38px; overflow:hidden; border:1px solid #505354; border-radius:5px; padding:6px 8px; background:#101112; color:#d5d6d3; font-size:.88rem; letter-spacing:0; cursor:pointer; white-space:nowrap; }.font-option:hover { border-color:#8a8c8a; }.font-option.is-selected { border-color:var(--accent,#f2a900); color:#fff; box-shadow:inset 0 0 0 1px var(--accent,#f2a900); }.font-option--typewriter { font-family:'Special Elite','Courier New',monospace; }.font-option--mono { font-family:'Roboto Mono','Courier New',monospace; }.font-option--handwritten { font-family:'Caveat',cursive; font-size:1.15rem; }.font-option--serif { font-family:'Lora',Georgia,serif; }
.board-controls { position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: calc(54px + env(safe-area-inset-bottom)); z-index: 2100; display: flex; align-items: center; gap: 4px; padding: 5px; border: 1px solid rgba(255,255,255,.18); border-radius: 7px; background: rgba(18,19,19,.88); backdrop-filter: blur(7px); }.board-controls button { display:grid; place-items:center; width:38px; height:38px; border:0; background:transparent; color:#eee; font-size:18px; cursor:pointer; }.board-controls button:hover { color:var(--accent,#f2a900); }.board-controls output { min-width:46px; color:#ccc; font-size:.76rem; text-align:center; }
.note-menu { position: fixed; z-index: 2400; display: grid; grid-template-columns: 1fr auto; gap: 7px 12px; width: min(330px, calc(100vw - 24px)); padding: 18px; border: 1px solid #555; border-radius: 7px; background: rgba(23,25,26,.97); color: #eee; box-shadow: 0 18px 44px rgba(0,0,0,.55); }.note-menu[hidden] { display:none; }.note-menu > span { color:#989b99; font-size:.72rem; text-transform:uppercase; }.note-menu code, .note-menu time { grid-column:1 / -1; overflow:hidden; color:#ddd; font-size:.78rem; text-overflow:ellipsis; white-space:nowrap; }.note-menu .secondary-action { grid-column:1 / -1; min-height:36px; padding:6px 10px; }.note-menu__close { position:absolute; top:7px; right:7px; display:grid; place-items:center; width:32px; height:32px; border:0; background:transparent; color:#aaa; cursor:pointer; }.remove-note { grid-column:1 / -1; min-height:40px; border:1px solid #ce4c46; border-radius:5px; background:transparent; color:#ff8079; font:inherit; cursor:pointer; }.note-menu .inline-status { grid-column:1 / -1; }
.placement-controls { position: fixed; left: 50%; bottom: calc(52px + env(safe-area-inset-bottom)); z-index: 2250; display: flex; align-items: center; gap: 7px; translate: -50% 0; padding: 7px; border: 1px solid #4c4e4d; border-radius: 7px; background: rgba(20,21,21,.94); box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.placement-controls[hidden] { display: none; }.placement-controls > button:not(.primary-action) { display:grid; place-items:center; width:38px; height:38px; border:1px solid #555; border-radius:5px; background:#272929; color:#eee; cursor:pointer; }.placement-controls > span { padding: 0 7px; color:#ccc; font-size:.82rem; white-space:nowrap; }
@media (max-width: 680px) {
  .sticky-header { top: calc(66px + env(safe-area-inset-top)); left:8px; right:8px; align-items: start; padding: 8px 10px; }.sticky-header p { font-size: .76rem; }
  .sticky-account-actions { align-items: stretch; flex-direction: column; }.icon-text-button, .primary-action { min-height: 38px; padding: 7px 10px; font-size: .78rem; }
  .sticky-note { width: 190px; font-size: 15px; padding: 18px 12px 15px; }
  .sticky-note--placing { width: 210px; font-size: 16px; }
  .login-methods { grid-template-columns: 1fr; }.login-field { grid-template-columns: 1fr auto; }.login-field > span { grid-column: 1 / -1; }
  .dialog-inner { padding: 22px 18px; }
  .placement-controls > span { display:none; }.placement-controls { bottom: calc(48px + env(safe-area-inset-bottom)); }
  .board-controls { right:8px; bottom:calc(48px + env(safe-area-inset-bottom)); }.board-controls button { width:34px; height:34px; }
}
