/* v3: queue viewer and standalone PWA controls. */
:root {
  color-scheme: light dark;
  --paper: var(--tg-theme-bg-color, #f4f1e9);
  --card: var(--tg-theme-secondary-bg-color, #fffdf7);
  --ink: var(--tg-theme-text-color, #18201c);
  --muted: var(--tg-theme-hint-color, #6e756f);
  --accent: var(--tg-theme-button-color, #176b4d);
  --accent-text: var(--tg-theme-button-text-color, #ffffff);
  --line: color-mix(in srgb, var(--ink) 12%, transparent);
  --danger: #b43b38;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 80% -8%, color-mix(in srgb, var(--accent) 15%, transparent), transparent 30rem),
    var(--paper);
}

button,
input,
textarea {
  font: inherit;
}

button,
label {
  -webkit-tap-highlight-color: transparent;
}

.shell {
  width: min(100%, 680px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 18px
    calc(30px + env(safe-area-inset-bottom));
}

.topbar,
.section-heading,
.media-actions,
.location-card {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  margin: 4px 2px 22px;
}

.connection-banner,
.queue-panel {
  margin: -10px 0 16px;
  padding: 11px 13px;
  border-radius: 13px;
  font-size: 13px;
}

.device-key-panel {
  display: grid;
  gap: 9px;
  margin: -10px 0 16px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 14px;
  background: var(--card);
}

.device-key-panel span {
  color: var(--muted);
  font-size: 13px;
}

.device-key-panel input {
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--card);
  font: inherit;
}

.device-key-panel button {
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  color: var(--accent-text);
  background: var(--accent);
  cursor: pointer;
  font-weight: 800;
}

.connection-banner {
  color: #704b00;
  background: #fff1c7;
}

.queue-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  background: color-mix(in srgb, var(--accent) 12%, var(--card));
}

.queue-panel button {
  border: 0;
  color: var(--accent);
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.queue-actions {
  display: flex;
  gap: 8px;
}

.queue-sheet {
  position: fixed;
  z-index: 35;
  inset: 0;
  display: grid;
  align-items: end;
  padding-top: max(20px, env(safe-area-inset-top));
  background: rgb(0 0 0 / 58%);
}

.queue-sheet-panel {
  display: grid;
  max-height: 82vh;
  gap: 14px;
  padding: 18px 16px max(18px, env(safe-area-inset-bottom));
  overflow: hidden;
  border-radius: 22px 22px 0 0;
  background: var(--bg);
}

.queue-sheet-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.queue-sheet-heading h2 {
  margin: 0;
  font-size: 21px;
}

.queue-sheet-heading button {
  border: 0;
  color: var(--accent);
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.queue-list {
  display: grid;
  gap: 10px;
  overflow-y: auto;
}

.queue-item {
  display: grid;
  gap: 7px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}

.queue-item time,
.queue-item span,
.queue-empty {
  color: var(--muted);
  font-size: 12px;
}

.queue-item p {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.queue-item button {
  justify-self: start;
  padding: 0;
  border: 0;
  color: var(--danger);
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(33px, 10vw, 48px);
  font-weight: 500;
  letter-spacing: -.035em;
}

.icon-button,
.text-button,
.quiet-button {
  border: 0;
  color: var(--accent);
  background: transparent;
  cursor: pointer;
}

.icon-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  font-size: 22px;
}

.location-card {
  gap: 12px;
  min-height: 82px;
  margin-bottom: 22px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  box-shadow: 0 14px 34px color-mix(in srgb, var(--ink) 7%, transparent);
}

.pin {
  display: grid;
  flex: 0 0 46px;
  height: 46px;
  place-items: center;
  border-radius: 15px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  font-size: 22px;
}

.location-copy {
  min-width: 0;
  flex: 1;
}

.location-copy .label,
.location-copy strong,
.location-copy span {
  display: block;
}

.location-copy .label {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 12px;
}

.location-copy strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.location-copy span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.text-button {
  padding: 10px 3px 10px 8px;
  font-size: 12px;
  font-weight: 700;
}

form {
  display: grid;
  gap: 18px;
}

.field {
  position: relative;
  display: grid;
  gap: 8px;
}

.field-label {
  font-size: 13px;
  font-weight: 750;
}

.field-label small {
  color: var(--muted);
  font-weight: 500;
}

textarea,
input[type="text"] {
  width: 100%;
  border: 1px solid var(--line);
  outline: none;
  color: var(--ink);
  background: var(--card);
  transition: border-color .18s, box-shadow .18s;
}

textarea {
  min-height: 140px;
  padding: 16px 16px 28px;
  border-radius: 20px;
  line-height: 1.45;
  resize: vertical;
}

input[type="text"] {
  height: 52px;
  padding: 0 15px;
  border-radius: 15px;
}

textarea:focus,
input[type="text"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
}

::placeholder {
  color: var(--muted);
  opacity: .75;
}

.counter {
  position: absolute;
  right: 13px;
  bottom: 10px;
  color: var(--muted);
  font-size: 11px;
}

.media-section {
  display: grid;
  gap: 11px;
}

.section-heading {
  justify-content: space-between;
}

.media-count {
  color: var(--muted);
  font-size: 12px;
}

.media-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.media-button {
  display: flex;
  min-height: 48px;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--card);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.media-button.primary {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 32%, transparent);
}

.voice-section {
  display: grid;
  gap: 10px;
}

.voice-button {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
  border-radius: 15px;
  color: var(--accent);
  background: var(--card);
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
}

.voice-button.recording {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 55%, transparent);
  background: color-mix(in srgb, var(--danger) 9%, var(--card));
}

.remove-voice {
  border: 0;
  color: var(--danger);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
}

.voice-section audio {
  width: 100%;
  height: 44px;
}

.voice-status {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.capture-sheet {
  position: fixed;
  z-index: 30;
  inset: 0;
  padding: max(12px, env(safe-area-inset-top))
    12px max(12px, env(safe-area-inset-bottom));
  background: #000;
}

.capture-panel {
  display: grid;
  width: 100%;
  height: 100%;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 12px;
}

.capture-panel video {
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 18px;
  background: #111;
  object-fit: cover;
}

.capture-status {
  margin: 0;
  color: #fff;
  text-align: center;
  font-size: 14px;
}

.capture-controls {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
}

.capture-controls button {
  min-height: 54px;
  border: 0;
  border-radius: 17px;
  cursor: pointer;
  font-weight: 800;
}

.capture-controls .quiet-button {
  color: #fff;
  background: #272727;
}

.capture-button {
  color: #0c2742;
  background: #fff;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.media-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 13px;
  background: color-mix(in srgb, var(--ink) 8%, var(--card));
}

.media-item img,
.media-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.remove-media {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  width: 27px;
  height: 27px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, .65);
  cursor: pointer;
}

.video-badge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  padding: 3px 6px;
  border-radius: 6px;
  color: #fff;
  background: rgba(0, 0, 0, .62);
  font-size: 10px;
  font-weight: 700;
}

.tags-preview {
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--muted);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  font-size: 12px;
  line-height: 1.45;
}

.tags-preview strong {
  display: block;
  margin-top: 3px;
  color: var(--accent);
  font-size: 13px;
}

.form-error {
  margin: -4px 0 0;
  padding: 11px 13px;
  border-radius: 12px;
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  font-size: 13px;
}

.publish-button,
.success-sheet > button {
  min-height: 56px;
  border: 0;
  border-radius: 18px;
  cursor: pointer;
  font-weight: 800;
}

.publish-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
  padding: 0 20px;
  color: var(--accent-text);
  background: var(--accent);
  box-shadow: 0 14px 26px color-mix(in srgb, var(--accent) 25%, transparent);
}

.publish-button:disabled {
  cursor: wait;
  opacity: .62;
}

.shell > .queue-panel {
  margin: 24px 0 8px;
}

.sending-flight {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 9;
  width: min(calc(100% - 32px), 430px);
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: 18px;
  color: var(--ink);
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  box-shadow: 0 18px 44px rgba(21, 46, 33, .2);
  backdrop-filter: blur(12px);
  transform: translateX(-50%);
}

.sending-flight[hidden] {
  display: none;
}

.sending-flight strong,
.sending-flight > span {
  display: block;
}

.sending-flight > span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.flight-track {
  position: relative;
  height: 5px;
  margin-bottom: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.flight-plane {
  position: absolute;
  top: 50%;
  left: -24px;
  color: var(--accent);
  font-size: 18px;
  line-height: 1;
  transform: translateY(-50%);
  animation: travel-flight 1.35s ease-in-out infinite;
}

@keyframes travel-flight {
  0% {
    left: -24px;
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    left: calc(100% + 8px);
    opacity: 0;
  }
}

.success-sheet {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  padding: 28px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  color: var(--ink);
  background: var(--paper);
}

.success-sheet[hidden] {
  display: none;
}

.success-mark {
  display: grid;
  width: 78px;
  height: 78px;
  margin-bottom: 22px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  font-size: 38px;
}

.success-sheet h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 33px;
  font-weight: 500;
}

.success-sheet p {
  max-width: 330px;
  margin: 12px auto 26px;
  color: var(--muted);
  line-height: 1.5;
}

.success-sheet > button {
  width: min(100%, 340px);
  color: var(--accent-text);
  background: var(--accent);
}

.success-sheet > .quiet-button {
  margin-top: 8px;
  color: var(--muted);
  background: transparent;
}

@media (min-width: 620px) {
  .shell {
    padding-right: 30px;
    padding-left: 30px;
  }

  .media-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .success-mark {
    animation: arrive .35s cubic-bezier(.2, .9, .2, 1.2);
  }

  @keyframes arrive {
    from { opacity: 0; transform: scale(.6); }
    to { opacity: 1; transform: scale(1); }
  }
}

/* v5: editorial travel notebook visual system. */
:root {
  color-scheme: light;
  --paper: var(--tg-theme-bg-color, #f4f0e7);
  --card: var(--tg-theme-secondary-bg-color, #fffdf8);
  --ink: var(--tg-theme-text-color, #15251f);
  --muted: var(--tg-theme-hint-color, #748078);
  --accent: var(--tg-theme-button-color, #087458);
  --accent-text: var(--tg-theme-button-text-color, #ffffff);
  --aqua: #27b9a2;
  --sun: #f0b857;
  --line: color-mix(in srgb, var(--ink) 10%, transparent);
  font-family: "Segoe UI Variable", "Aptos", "Segoe UI", sans-serif;
}

html {
  min-height: 100%;
  background: #e8e1d4;
}

body {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 92% 4%, rgba(39, 185, 162, .18), transparent 24rem),
    radial-gradient(circle at 0 38%, rgba(240, 184, 87, .13), transparent 22rem),
    linear-gradient(180deg, #f8f5ee 0%, var(--paper) 38%, #eee8dc 100%);
  background-attachment: fixed;
}

.shell {
  width: min(100%, 620px);
  padding: max(22px, env(safe-area-inset-top)) 16px
    calc(38px + env(safe-area-inset-bottom));
}

.topbar {
  position: relative;
  min-height: 116px;
  margin: 0 4px 26px;
  align-items: flex-start;
  overflow: hidden;
}

.topbar::after {
  position: absolute;
  top: 16px;
  right: 58px;
  width: 80px;
  height: 44px;
  border-top: 1px dashed color-mix(in srgb, var(--accent) 32%, transparent);
  border-radius: 50%;
  content: "";
  transform: rotate(-12deg);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  color: var(--accent);
  font-size: 10px;
  letter-spacing: .22em;
}

.eyebrow span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--aqua);
  box-shadow: 0 0 0 5px rgba(39, 185, 162, .11);
}

h1 {
  color: #15362b;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 12vw, 58px);
  line-height: .96;
  letter-spacing: -.055em;
}

.header-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.icon-button {
  position: relative;
  z-index: 1;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(21, 54, 43, .1);
  background: rgba(255, 253, 248, .74);
  box-shadow: 0 10px 26px rgba(31, 61, 49, .08);
  backdrop-filter: blur(14px);
}

form {
  gap: 16px;
}

.field-label {
  color: #23372f;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -.01em;
}

.field-story {
  padding: 18px 18px 14px;
  border: 1px solid rgba(21, 54, 43, .08);
  border-radius: 26px;
  background: rgba(255, 253, 248, .9);
  box-shadow:
    0 22px 50px rgba(33, 52, 44, .08),
    inset 0 1px rgba(255, 255, 255, .8);
}

.field-story textarea {
  min-height: 172px;
  padding: 10px 0 28px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.48;
}

.field-story textarea:focus {
  border: 0;
  box-shadow: none;
}

.field-story .counter {
  right: 18px;
  bottom: 13px;
}

input[type="text"] {
  height: 58px;
  padding: 0 17px;
  border-color: rgba(21, 54, 43, .09);
  border-radius: 18px;
  background: rgba(255, 253, 248, .84);
  box-shadow: 0 10px 28px rgba(33, 52, 44, .045);
}

textarea:focus,
input[type="text"]:focus {
  border-color: color-mix(in srgb, var(--aqua) 65%, transparent);
  box-shadow: 0 0 0 4px rgba(39, 185, 162, .11);
}

.media-section,
.voice-section {
  padding: 17px;
  border: 1px solid rgba(21, 54, 43, .075);
  border-radius: 24px;
  background: rgba(255, 253, 248, .66);
  box-shadow: 0 14px 34px rgba(33, 52, 44, .045);
  backdrop-filter: blur(12px);
}

.media-section {
  gap: 14px;
}

.media-actions {
  gap: 9px;
}

.media-button {
  min-height: 84px;
  flex-direction: column;
  gap: 9px;
  border-color: rgba(21, 54, 43, .08);
  border-radius: 18px;
  color: #294138;
  background: rgba(255, 255, 255, .7);
  box-shadow: inset 0 1px rgba(255, 255, 255, .9);
  font-size: 13px;
  transition: transform .18s ease, border-color .18s ease,
    background-color .18s ease;
}

.media-button.primary {
  color: #155a48;
  border-color: rgba(8, 116, 88, .14);
}

.media-button:active,
.voice-button:active,
.publish-button:active {
  transform: scale(.975);
}

.media-symbol {
  position: relative;
  display: block;
  width: 25px;
  height: 20px;
  color: currentColor;
}

.camera-symbol {
  border: 2px solid currentColor;
  border-radius: 6px;
}

.camera-symbol::before {
  position: absolute;
  top: -6px;
  left: 5px;
  width: 9px;
  height: 5px;
  border-radius: 3px 3px 0 0;
  background: currentColor;
  content: "";
}

.camera-symbol::after {
  position: absolute;
  top: 4px;
  left: 7px;
  width: 7px;
  height: 7px;
  border: 2px solid currentColor;
  border-radius: 50%;
  content: "";
}

.video-symbol {
  width: 22px;
  border: 2px solid currentColor;
  border-radius: 5px;
}

.video-symbol::after {
  position: absolute;
  top: 4px;
  right: -8px;
  border-width: 5px 0 5px 6px;
  border-style: solid;
  border-color: transparent transparent transparent currentColor;
  content: "";
}

.gallery-symbol {
  border: 2px solid currentColor;
  border-radius: 5px;
}

.gallery-symbol::before,
.gallery-symbol::after {
  position: absolute;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.gallery-symbol::before {
  top: 3px;
  right: 4px;
  width: 4px;
  height: 4px;
}

.gallery-symbol::after {
  right: 3px;
  bottom: 3px;
  left: 3px;
  height: 7px;
  border-radius: 5px 5px 2px 2px;
  clip-path: polygon(0 100%, 35% 18%, 58% 60%, 75% 35%, 100% 100%);
}

.media-item {
  border: 3px solid rgba(255, 255, 255, .85);
  border-radius: 18px;
  box-shadow: 0 8px 18px rgba(21, 37, 31, .12);
}

.voice-button {
  min-height: 58px;
  border: 0;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, #0d7056, #159078);
  box-shadow: 0 12px 26px rgba(8, 116, 88, .18);
}

.voice-symbol {
  position: relative;
  display: block;
  width: 14px;
  height: 22px;
  border: 2px solid currentColor;
  border-radius: 9px;
}

.voice-symbol::before {
  position: absolute;
  right: -6px;
  bottom: -6px;
  left: -6px;
  height: 10px;
  border-bottom: 2px solid currentColor;
  border-radius: 0 0 10px 10px;
  content: "";
}

.voice-symbol::after {
  position: absolute;
  bottom: -10px;
  left: 4px;
  width: 2px;
  height: 5px;
  background: currentColor;
  content: "";
}

.location-card {
  position: relative;
  min-height: 94px;
  margin: 2px 0 0;
  overflow: hidden;
  border: 0;
  border-radius: 24px;
  color: #f7fff9;
  background:
    radial-gradient(circle at 100% 0, rgba(39, 185, 162, .5), transparent 48%),
    linear-gradient(135deg, #143e31, #0b654e);
  box-shadow: 0 18px 38px rgba(14, 83, 63, .2);
}

.location-card::after {
  position: absolute;
  right: -18px;
  bottom: -35px;
  width: 116px;
  height: 80px;
  border: 1px dashed rgba(255, 255, 255, .25);
  border-radius: 50%;
  content: "";
  transform: rotate(-12deg);
}

.pin {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, .14);
}

.pin span {
  position: relative;
  display: block;
  width: 17px;
  height: 21px;
  border: 2px solid #fff;
  border-radius: 10px 10px 12px 12px;
  transform: rotate(45deg);
}

.pin span::after {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
  content: "";
}

.location-copy .label,
.location-copy span {
  color: rgba(255, 255, 255, .68);
}

.location-copy strong {
  color: #fff;
  font-size: 16px;
}

.location-card .text-button {
  position: relative;
  z-index: 1;
  color: #fff;
}

.tags-preview {
  padding: 14px 16px;
  border: 1px solid rgba(39, 185, 162, .13);
  border-radius: 18px;
  background: rgba(223, 247, 239, .72);
}

.tags-preview strong {
  color: #087458;
  font-size: 14px;
}

.publish-anchor {
  width: 1px;
  height: 1px;
  margin-bottom: -1px;
  pointer-events: none;
}

.publish-button {
  position: relative;
  z-index: 5;
  width: 100%;
  min-height: 58px;
  margin: 0 0 2px;
  padding: 0 22px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 19px;
  background:
    linear-gradient(135deg, #087458 0%, #0e8d70 72%, #25ad98 100%);
  box-shadow:
    0 14px 30px rgba(8, 83, 65, .3),
    inset 0 1px rgba(255, 255, 255, .24);
  font-size: 16px;
  touch-action: manipulation;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.publish-button.is-floating {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(22px, calc(env(safe-area-inset-bottom) + 16px));
  z-index: 8;
  width: auto;
  min-width: 164px;
  min-height: 56px;
  margin: 0;
  border-radius: 19px;
  box-shadow:
    0 18px 38px rgba(8, 60, 48, .36),
    inset 0 1px rgba(255, 255, 255, .28);
  animation: publish-float-in .2s ease-out both;
}

body.publish-fab-visible .shell {
  padding-bottom: calc(112px + env(safe-area-inset-bottom));
}

@keyframes publish-float-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(.96);
  }
}

@media (prefers-reduced-motion: reduce) {
  .publish-button.is-floating {
    animation: none;
  }
}

.queue-panel {
  padding: 15px 16px;
  border: 1px dashed rgba(8, 116, 88, .24);
  border-radius: 18px;
  background: rgba(255, 253, 248, .54);
}

.queue-sheet-panel {
  border-radius: 28px 28px 0 0;
  background: var(--paper);
  box-shadow: 0 -22px 60px rgba(10, 30, 22, .24);
}

.queue-item {
  padding: 15px;
  border-radius: 18px;
  background: rgba(255, 253, 248, .86);
}

.sending-flight {
  border-color: rgba(39, 185, 162, .22);
  border-radius: 22px;
  background: rgba(255, 253, 248, .94);
}

.flight-track {
  background: rgba(39, 185, 162, .13);
}

.flight-plane {
  color: #087458;
}

.success-sheet {
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 30%, rgba(39, 185, 162, .2), transparent 17rem),
    linear-gradient(180deg, #fbf9f3, #eee8dc);
}

.success-mark {
  width: 88px;
  height: 88px;
  background: linear-gradient(135deg, #087458, #27b9a2);
  box-shadow: 0 20px 45px rgba(8, 116, 88, .22);
}

.success-sheet h2 {
  color: #15362b;
  font-size: 38px;
  letter-spacing: -.04em;
}

.success-sheet > button {
  border-radius: 19px;
  background: linear-gradient(135deg, #087458, #159078);
}

#travelDiagnosticPanel {
  margin-top: 14px !important;
  border-color: rgba(21, 54, 43, .08) !important;
  background: rgba(255, 253, 248, .46) !important;
  opacity: .72;
}

@media (max-width: 390px) {
  .shell {
    padding-right: 12px;
    padding-left: 12px;
  }

  .media-button {
    min-height: 78px;
    font-size: 12px;
  }

  .field-story textarea {
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .field-story,
  .media-section,
  .voice-section,
  .location-card {
    animation: notebook-arrive .42s both;
  }

  .media-section {
    animation-delay: .04s;
  }

  .voice-section {
    animation-delay: .08s;
  }

  .location-card {
    animation-delay: .12s;
  }

  @keyframes notebook-arrive {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
