:root {
  --pic-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --pic-content-width: 1440px;
  --pic-earth-950: #241a16;
  --pic-earth-900: #34251f;
  --pic-earth-800: #4b342a;
  --pic-earth-700: #694839;
  --pic-earth-600: #8a5a45;
  --pic-earth-500: #b07855;
  --pic-earth-300: #c9a890;
  --pic-earth-200: #ddc7b6;
  --pic-earth-100: #eee1d5;
  --pic-earth-50: #faf5ef;
  --pic-shell-bg: #d2b9a5;
  --pic-shell-surface: #fffaf5;
  --pic-shell-ink: #2b201b;
  --pic-shell-muted: #70594a;
  --pic-shell-line: rgba(91, 59, 46, 0.24);
  --pic-control-radius: 10px;
  --pic-shell-shadow: 0 14px 34px rgba(52, 37, 31, 0.13);
  font-family: var(--pic-font);
}

.pic-platform-root,
.pic-platform-header,
.pic-context-row {
  font-family: var(--pic-font);
}

.pic-platform-root {
  min-width: 320px;
  min-height: 100vh;
  overflow-x: clip;
  color: var(--pic-shell-ink);
  background: var(--pic-shell-bg);
}

body.pic-context--portal,
body.pic-context--seap {
  color: var(--pic-shell-ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 250, 245, 0.82), transparent 34rem),
    radial-gradient(circle at 92% 100%, rgba(105, 72, 57, 0.18), transparent 38rem),
    linear-gradient(145deg, #f5ede5 0%, #e4d3c4 54%, #cfb49e 100%);
}

.pic-platform-header {
  position: relative;
  z-index: 1000;
  width: 100%;
  border-bottom: 1px solid rgba(255, 246, 238, 0.13);
  color: #fffaf5;
  background:
    linear-gradient(105deg, rgba(255, 255, 255, 0.035), transparent 35%),
    linear-gradient(110deg, var(--pic-earth-950), var(--pic-earth-800));
  box-shadow: 0 6px 20px rgba(36, 26, 22, 0.2);
}

.pic-platform-header__inner {
  display: flex;
  width: min(var(--pic-content-width), calc(100% - 40px));
  min-height: 66px;
  margin: 0 auto;
  align-items: center;
  gap: 26px;
}

.pic-platform-brand {
  display: inline-flex;
  min-width: 54px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(238, 225, 213, 0.28);
  border-radius: 10px;
  color: #fffaf5;
  background: rgba(250, 245, 239, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-decoration: none;
}

.pic-platform-brand:hover {
  background: rgba(250, 245, 239, 0.14);
}

.pic-platform-nav {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
}

.pic-platform-nav a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: rgba(255, 250, 245, 0.74);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}

.pic-platform-nav a:hover {
  border-color: rgba(238, 225, 213, 0.14);
  color: #fffaf5;
  background: rgba(250, 245, 239, 0.07);
}

.pic-platform-nav a[aria-current="page"] {
  border-color: color-mix(in srgb, var(--pic-current-accent, #b07855) 70%, #f4e9df);
  color: var(--pic-current-ink, #fffaf5);
  background: var(--pic-current-accent, #8a5a45);
  box-shadow: 0 5px 15px color-mix(in srgb, var(--pic-current-accent, #8a5a45) 30%, transparent);
}

.pic-context--portal {
  --pic-current-accent: #8a5a45;
  --pic-current-ink: #fffaf5;
}

.pic-context--seap {
  --pic-current-accent: #a86f4f;
  --pic-current-ink: #fffaf5;
  --paper: #eee3d8;
  --surface: #fffaf5;
  --line: #d8c6b7;
  --ink: #1e1916;
  --muted: #715e51;
  --yellow: #a86f4f;
  --yellow-hover: #8a5a45;
  --yellow-soft: #f3e5da;
  --shadow: 0 8px 24px rgba(52, 37, 31, 0.07);
}

.pic-context--agenda {
  --pic-current-accent: #a86f4f;
  --pic-current-ink: #fffaf5;
}

.pic-context-row {
  width: 100%;
  border-bottom: 1px solid var(--pic-shell-line);
  background: rgba(250, 245, 239, 0.9);
  box-shadow: 0 2px 10px rgba(52, 37, 31, 0.045);
  backdrop-filter: blur(12px);
}

.pic-context-row__inner {
  display: flex;
  width: min(var(--pic-content-width), calc(100% - 40px));
  min-height: 48px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.pic-back-link {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--pic-shell-line);
  border-radius: var(--pic-control-radius);
  color: var(--pic-earth-900);
  background: var(--pic-shell-surface);
  box-shadow: 0 3px 10px rgba(52, 37, 31, 0.07);
  font-size: 0.79rem;
  font-weight: 750;
  text-decoration: none;
  transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.pic-back-link:hover {
  border-color: rgba(105, 72, 57, 0.5);
  box-shadow: 0 6px 14px rgba(52, 37, 31, 0.12);
  transform: translateY(-1px);
}

.pic-context-label {
  color: var(--pic-shell-muted);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pic-app-content--agenda {
  min-height: calc(100vh - 114px);
  background:
    radial-gradient(circle at 10% 0%, rgba(239, 224, 208, 0.86), transparent 35rem),
    radial-gradient(circle at 92% 100%, rgba(91, 59, 46, 0.16), transparent 42rem),
    linear-gradient(145deg, #d3b9a5, #b9957e);
}

@media (max-width: 760px) {
  .pic-platform-header__inner,
  .pic-context-row__inner {
    width: min(100% - 24px, var(--pic-content-width));
  }

  .pic-platform-header__inner {
    min-height: 62px;
    gap: 12px;
  }

  .pic-platform-nav {
    overflow-x: auto;
    padding: 8px 0;
    scrollbar-width: none;
  }

  .pic-platform-nav::-webkit-scrollbar {
    display: none;
  }

  .pic-platform-nav a {
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.77rem;
  }

  .pic-platform-brand {
    min-width: 46px;
    height: 34px;
  }

  .pic-context-label {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pic-platform-header *,
  .pic-context-row * {
    transition-duration: 0.01ms !important;
  }
}
