/* What SideDock is (#what): a dictionary entry, set large on its own. Each place it names
   carries a small screen with that stretch of edge lit, the marks the Dock chapters use. */
.define { padding-top: 120px; }
.define-wrap { max-width: 900px; }

.define-entry { display: grid; gap: 26px; }
.define-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 18px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.define-head b { font: 600 clamp(56px, 9vw, 104px)/0.95 var(--heading); letter-spacing: -0.03em; color: var(--text); }
.define-ipa { font: 400 clamp(17px, 2vw, 22px) var(--mono); color: var(--text-3); }
.define-head i { font: italic 500 clamp(17px, 2vw, 21px) var(--font); color: var(--accent); }

.define-senses { list-style: none; counter-reset: sense; display: grid; gap: 20px; margin: 0; padding: 0; }
.define-senses li { counter-increment: sense; position: relative; padding-left: 46px; color: var(--text-2); font-size: clamp(18px, 2vw, 21px); line-height: 1.65; }
.define-senses li::before { content: counter(sense); position: absolute; left: 0; top: 4px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.08); color: var(--text); font: 600 14px var(--display); }
.define-senses a { color: var(--text); font-weight: 600; text-decoration: underline rgba(232, 153, 84, 0.6); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.define-senses a:hover { color: var(--accent); }

/* A place: its words in white, a small screen before them with the place lit in orange. */
.define-place { color: var(--text); font-weight: 600; white-space: nowrap; }
.define-glyph { width: 1.25em; height: 0.95em; margin: 0 0.3em 0 0.08em; vertical-align: -0.08em; color: rgba(255, 255, 255, 0.4); }
.define-glyph g { fill: var(--accent); }
.define-aside { font: 700 1.45em/1 var(--hand); color: var(--accent); font-style: normal; white-space: nowrap; display: inline-block; transform: rotate(-4deg); margin-left: 4px; }

.define-usage { color: var(--text-3); font-size: 17px; font-style: italic; padding-left: 46px; }
.define-usage span { font: normal 600 12px var(--display); letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.8; margin-right: 10px; }
.define-terms { display: flex; flex-wrap: wrap; gap: 8px; padding-left: 46px; }
.define-terms span { padding: 6px 12px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line); color: var(--text-2); font-size: 13.5px; font-weight: 600; }
.define-terms span:first-child { background: rgba(232, 153, 84, 0.16); border-color: rgba(232, 153, 84, 0.35); color: var(--accent); }

@media (max-width: 640px) {
  .define { padding-top: 96px; }
  .define-senses li, .define-usage, .define-terms { padding-left: 38px; }
  .define-place { white-space: normal; }
}

/* ---- The lively bits: dock icons drifting round the word, Pip among them, and a note in
   the margin. All decoration. ---- */
.define { overflow-x: clip; }
.define-top { position: relative; }
.define-dot { color: var(--accent); }

.define-float { position: absolute; inset: 0; pointer-events: none; }
.define-float > * { position: absolute; left: var(--x); top: var(--y); rotate: var(--r, 0deg); animation: define-bob 6s ease-in-out infinite var(--t, 0s); }
.define-float i { width: 30px; height: 30px; border-radius: 9px; background: var(--c); opacity: 0.9; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.15), 0 10px 22px rgba(5, 3, 18, 0.35); }
.define-float i::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: rgba(255, 255, 255, 0.35); }
.define-pip { display: flex; gap: 6px; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%; background: #fff; box-shadow: 0 12px 26px rgba(5, 3, 18, 0.4); }
.define-pip em { width: 5px; height: 12px; border-radius: 3px; background: #1d153e; animation: define-blink 5s infinite; }
@keyframes define-bob { 50% { transform: translateY(-9px); } }
@keyframes define-blink { 0%, 92%, 100% { scale: 1 1; } 95% { scale: 1 0.15; } }

.define-verb { position: absolute; left: min(560px, 62%); top: 100%; margin-top: -6px; display: flex; align-items: flex-start; gap: 4px; font: 700 23px/1.1 var(--hand); color: var(--accent); rotate: -3deg; white-space: nowrap; }
.define-verb svg { width: 44px; height: 30px; flex: none; margin-top: -18px; fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.define-head { margin-bottom: 18px; }

@media (max-width: 760px) {
  .define-verb { position: static; margin: -6px 0 6px; font-size: 20px; }
  .define-verb svg { display: none; }
  /* No room beside the word on a phone: the icons and Pip line up above it instead. */
  .define-top { padding-top: 46px; }
  .define-float { inset: 0 0 auto 0; height: 40px; }
  .define-float > * { top: 4px !important; }
  .define-float > :nth-child(1) { left: 38% !important; }
  .define-float > :nth-child(2) { left: 50% !important; }
  .define-float > :nth-child(3) { left: 62% !important; }
  .define-float > :nth-child(4) { display: none; }
  .define-float > :nth-child(5) { left: 26% !important; }
  .define-float .define-pip { left: 76% !important; top: 0 !important; }
  .define-float i { width: 22px; height: 22px; border-radius: 7px; }
  .define-float i::after { inset: 5px; }
  .define-pip { width: 34px; height: 34px; }
  .define-pip em { width: 4px; height: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .define-float > *, .define-pip em { animation: none; }
}
