:root {
  color-scheme: light;
  --bg: #f5f5f6;
  --card: #ffffff;
  --line: rgba(0, 0, 0, 0.1);
  --text: #2a2a2e;
  --muted: #6b6b72;
  --faint: #8a8a93;
  --accent: #468cff;
  --ink: #1a1a1e;
  --paper: #f0f0f2;
  --sans: "Segoe UI", system-ui, sans-serif;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(900px 420px at 80% -10%, rgba(70, 140, 255, 0.06), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 42%, #ececee 100%);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.02rem;
  line-height: 1.5;
}

button,
input,
textarea,
select {
  font: inherit;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.4rem;
  padding: calc(0.7rem + env(safe-area-inset-top)) 1.1rem 0.7rem;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
}

.logo-d {
  width: 2.15rem;
  height: 2.15rem;
  display: block;
  color: var(--ink);
}

.logo-d-accent {
  fill: var(--accent);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-word {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.brand-sub {
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.shell {
  width: min(760px, calc(100% - 1.6rem));
  margin: 0 auto;
  padding: 1.2rem 0 calc(2rem + env(safe-area-inset-bottom));
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 1.15rem 1.05rem 1.2rem;
}

.stack {
  display: grid;
  gap: 0.85rem;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 1.55rem;
  line-height: 1.2;
  color: var(--ink);
  font-weight: 680;
}

h2 {
  font-size: 1.15rem;
  color: var(--ink);
}

.lede,
.hint,
.meta {
  color: var(--muted);
}

.lede {
  margin-top: 0.45rem;
}

.kicker {
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.banner {
  border: 1px solid rgba(70, 140, 255, 0.35);
  background: rgba(70, 140, 255, 0.08);
  border-radius: 14px;
  padding: 0.85rem 0.9rem;
  margin-bottom: 0.9rem;
}

.banner strong {
  display: block;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

.banner ul {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
}

.banner code,
.missing-name {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.86rem;
  color: var(--ink);
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field span {
  font-size: 0.92rem;
  color: var(--ink);
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #d4d4d8;
  border-radius: 12px;
  padding: 0.75rem 0.8rem;
  background: #fff;
  color: var(--ink);
}

textarea {
  min-height: 6.5rem;
  resize: vertical;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3rem;
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1rem;
  background: #3d6fbf;
  color: #fff;
  font-weight: 650;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

.btn:hover {
  background: #345f9f;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn.quiet,
.btn.ghost {
  background: #f3f3f5;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn.quiet:hover,
.btn.ghost:hover {
  background: #ececee;
}

.btn.dark {
  background: var(--ink);
}

.btn.danger {
  background: #8d3a3a;
}

.btn.danger:hover {
  background: #743131;
}

.view-line {
  margin: 0.2rem 0 0;
  font-size: 0.92rem;
  font-weight: 650;
}

.view-line.unseen {
  color: #8a4b12;
}

.view-line.seen {
  color: #1e6b45;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.actions .btn.wide {
  grid-column: 1 / -1;
}

.text-btn,
.linkish {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  padding: 0.35rem 0;
  text-decoration: none;
  font: inherit;
}

.linkish {
  color: #2f5f9f;
}

.text-btn:hover,
.linkish:hover {
  color: var(--ink);
}

.person-row {
  display: flex;
  align-items: stretch;
  gap: 0.6rem;
}

.person-row .row-link {
  flex: 1;
}

.person-row .btn.slim {
  width: auto;
  align-self: center;
  min-height: 2.75rem;
  padding: 0.55rem 0.95rem;
}

.row-link.static {
  cursor: default;
}

.row-link,
.version {
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.9rem 0.95rem;
  color: inherit;
  cursor: pointer;
}

.version.selected {
  border-color: rgba(70, 140, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(70, 140, 255, 0.15);
}

.row-top,
.version-top {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: baseline;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 650;
  white-space: nowrap;
}

.badge-wartet {
  color: #1d4e89;
  background: rgba(70, 140, 255, 0.14);
}

.badge-freigegeben {
  color: #1e6b45;
  background: rgba(47, 158, 111, 0.14);
}

.badge-aenderung {
  color: #8a4b12;
  background: rgba(196, 122, 44, 0.16);
}

.badge-entwurf {
  color: #5c5c66;
  background: #eeeef1;
}

.player,
.post-image {
  width: 100%;
  border-radius: 16px;
  background: #111;
}

.player {
  max-height: 72vh;
}

.post-image {
  background: #fff;
  border: 1px solid var(--line);
}

.comment {
  margin-top: 0.7rem;
  padding: 0.75rem 0.8rem;
  border-radius: 12px;
  background: var(--paper);
  white-space: pre-wrap;
}

.error {
  color: #8d2f2f;
}

.notice {
  color: #1e6b45;
}

.legal {
  margin-top: 0.8rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.check {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}

.check input {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.2rem;
  flex: none;
}

.file input {
  padding: 0.55rem;
}

@media (min-width: 720px) {
  .shell {
    padding-top: 2rem;
  }

  .card {
    padding: 1.4rem 1.35rem 1.45rem;
  }
}

body.phone {
  --accent: #2563eb;
  min-height: 100dvh;
  margin: 0;
  display: flex;
  justify-content: center;
  background: #e8edf3;
  color: #0f172a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body.phone .device {
  width: min(480px, 100%);
  min-height: 100dvh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #f5f7fa;
  overflow: hidden;
}

body.phone .p-bar {
  flex: none;
  padding: calc(0.85rem + env(safe-area-inset-top)) 1rem 0.7rem;
  background: #f5f7fa;
}

body.phone .p-lockup {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 44px;
}

body.phone .p-mark {
  width: 2.5rem;
  height: 2.5rem;
  display: block;
  flex: none;
  color: #0f172a;
}

body.phone .p-node {
  fill: #2f6fed;
}

body.phone .p-word {
  color: #0f172a;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  line-height: 1;
}

body.phone .p-hello {
  margin: 0.35rem 0 0;
  color: #475569;
  font-size: 1rem;
  line-height: 1.5;
}

body.phone .screen {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0;
}

body.phone .device:not(:has(.p-tabs:not([hidden]))) .screen {
  padding-bottom: env(safe-area-inset-bottom);
}

body.phone .p-pad {
  padding: 0.35rem 1rem 1rem;
}

body.phone .p-stack {
  display: grid;
  gap: 0.85rem;
}

body.phone .p-card {
  background: #fff;
  border: 1px solid #e6eaf0;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  padding: 1rem;
}

body.phone h1,
body.phone .p-title {
  margin: 0;
  color: #0f172a;
  font-size: 1.45rem;
  font-weight: 650;
  line-height: 1.3;
}

body.phone h2 {
  margin: 0;
  color: #0f172a;
  font-size: 1.15rem;
  line-height: 1.35;
}

body.phone .p-lead,
body.phone .p-empty,
body.phone .p-copy {
  margin: 0;
  color: #334155;
  font-size: 1rem;
  line-height: 1.5;
}

body.phone .p-copy {
  white-space: pre-wrap;
}

body.phone .p-error {
  margin: 0;
  color: #9f1239;
  font-size: 1rem;
  line-height: 1.5;
}

body.phone .p-loading {
  margin: 0;
  min-height: 10.5rem;
  display: flex;
  align-items: center;
  color: #64748b;
  font-size: 1rem;
  line-height: 1.5;
}

body.phone .p-privacy {
  margin: 0;
  color: #64748b;
  font-size: 1rem;
  line-height: 1.5;
}

body.phone .p-privacy a,
body.phone .p-back {
  color: #2563eb;
}

body.phone .p-field {
  display: grid;
  gap: 0.35rem;
}

body.phone .p-field span,
body.phone .p-check span,
body.phone .p-label {
  color: #0f172a;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.4;
}

body.phone .p-label {
  color: #64748b;
  font-weight: 650;
}

body.phone input,
body.phone textarea,
body.phone select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #e6eaf0;
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  background: #fff;
  color: #0f172a;
  font-size: 16px;
  line-height: 1.5;
}

body.phone textarea {
  min-height: 7rem;
  resize: vertical;
}

body.phone .p-btn,
body.phone .p-textbtn,
body.phone .p-tab,
body.phone .p-back,
body.phone .p-chip,
body.phone .p-more,
body.phone .p-row,
body.phone .p-link {
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
}

body.phone .p-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  padding: 0.7rem 1rem;
  background: #2563eb;
  color: #fff;
  font-weight: 650;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

body.phone .p-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

body.phone .p-btn-line {
  background: #fff;
  color: #2563eb;
  border: 1px solid #2563eb;
}

body.phone .p-textbtn,
body.phone .p-back,
body.phone .p-more {
  display: flex;
  align-items: center;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: #2563eb;
  font-weight: 650;
  cursor: pointer;
}

body.phone .p-back,
body.phone .p-more,
body.phone .p-textbtn {
  justify-content: flex-start;
  padding: 0;
}

body.phone .p-textbtn {
  justify-content: center;
  width: 100%;
}

body.phone .p-hold {
  height: 10.5rem;
  border-radius: 16px;
  background: #e8eef5;
  color: #64748b;
  display: grid;
  place-items: center;
}

body.phone .p-hold-ico {
  width: 3rem;
  height: 3rem;
}

body.phone .p-status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.4;
}

body.phone .p-ico {
  width: 1rem;
  height: 1rem;
  flex: none;
}

body.phone .p-status-wait {
  color: #b45309;
}

body.phone .p-status-ok {
  color: #15803d;
}

body.phone .p-status-ask {
  color: #2563eb;
}

body.phone .p-status-work {
  color: #475569;
}

body.phone .p-name {
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.35;
  color: #0f172a;
}

body.phone .p-row,
body.phone .p-link {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  text-align: left;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid #e6eaf0;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  padding: 0.75rem 0.9rem;
  cursor: pointer;
}

body.phone .p-menu {
  display: grid;
  padding: 0.35rem;
  gap: 0.15rem;
}

body.phone .p-menu .p-link {
  border: 0;
  box-shadow: none;
  border-radius: 12px;
  background: transparent;
}

body.phone .p-list {
  display: grid;
  gap: 0.65rem;
}

body.phone .p-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
  margin: 0.2rem 0 0;
  padding: 0;
  list-style: none;
}

body.phone .p-step {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  text-align: center;
  color: #94a3b8;
  font-size: 1rem;
  line-height: 1.3;
}

body.phone .p-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  background: #e6eaf0;
}

body.phone .p-step-active {
  color: #2563eb;
  font-weight: 650;
}

body.phone .p-step-active .p-dot {
  background: #2563eb;
}

body.phone .p-step-done {
  color: #15803d;
  font-weight: 650;
}

body.phone .p-step-done .p-dot {
  background: #15803d;
}

body.phone .p-frame {
  border: 1px solid #e6eaf0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  padding: 0.4rem;
}

body.phone .p-player {
  width: 100%;
  height: auto;
  max-height: 70dvh;
  display: block;
  border-radius: 12px;
  background: #0f172a;
  object-fit: contain;
}

body.phone .p-block {
  display: grid;
  gap: 0.55rem;
}

body.phone .p-head {
  display: grid;
  gap: 0.35rem;
}

body.phone .p-project {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

body.phone .p-project .p-pad {
  flex: 1 0 auto;
}

body.phone .p-decide {
  position: sticky;
  bottom: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border-top: 1px solid #e6eaf0;
}

body.phone .p-check {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-height: 44px;
  cursor: pointer;
}

body.phone .p-check input {
  width: 1.35rem;
  height: 1.35rem;
  min-height: 0;
  margin-top: 0.15rem;
  padding: 0;
  flex: none;
  accent-color: #2563eb;
}

body.phone .p-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

body.phone .p-chip {
  min-height: 44px;
  border: 1px solid #e6eaf0;
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
}

body.phone .p-chip[aria-pressed="true"] {
  border-color: #2563eb;
  color: #2563eb;
  background: #eff6ff;
}

body.phone .p-tabs {
  flex: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.25rem;
  padding: 0.3rem 0.45rem calc(0.35rem + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid #e6eaf0;
}

body.phone .p-tab {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #475569;
  font-weight: 650;
  cursor: pointer;
}

body.phone .p-tab[aria-current="page"] {
  color: #2563eb;
  background: #eff6ff;
}

body.phone .p-sheet-wrap {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

body.phone .p-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.35);
  cursor: pointer;
}

body.phone .p-sheet {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
  background: #fff;
  border: 1px solid #e6eaf0;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
}

body.phone :focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  body.phone *,
  body.phone *::before,
  body.phone *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
