/* Servant upload page (/upload) */
.up { display: flex; flex-direction: column; gap: 18px; }
.up [hidden] { display: none !important; }
.up-demo {
  margin: 0; padding: 10px 14px; border-radius: 12px; font-size: 14px;
  background: #fff; border: 1px dashed var(--navy-soft); color: var(--navy);
}
.up-card {
  background: linear-gradient(135deg, rgba(255,255,255,.78), rgba(255,255,255,.5));
  -webkit-backdrop-filter: blur(6px) saturate(160%); backdrop-filter: blur(6px) saturate(160%);
  border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
  padding: 22px;
}
.up-step { display: flex; flex-direction: column; gap: 14px; }
.up-h { font-family: var(--display); font-size: 20px; font-weight: 400; }
.up-label {
  font-size: 13px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); margin: 6px 2px -4px;
}
.up-note { margin: 0; color: var(--muted); }

.up-form { display: flex; flex-direction: column; gap: 10px; }
.up-form label, .up-when label { font-weight: 600; color: var(--navy); }
.up input[type=email], .up input[inputmode=numeric], .up select {
  font: inherit; font-size: 18px; padding: 13px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); width: 100%;
}
.up input[inputmode=numeric] { letter-spacing: .3em; font-size: 22px; }
.up input:focus, .up select:focus { outline: 2px solid var(--navy-soft); outline-offset: 1px; }

.up-btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-weight: 700; font-size: 17px; text-decoration: none;
  background: var(--navy); color: #fff; border: 0; border-radius: 12px;
  padding: 14px 22px; cursor: pointer; min-height: 52px;
}
.up-btn:hover { background: var(--navy-soft); }
.up-btn:disabled { background: #b9c3e6; cursor: not-allowed; }
.up-btn-light { background: #fff; color: var(--navy); border: 1px solid var(--line); }
.up-btn-light:hover { background: var(--sky); }
.up-link {
  font: inherit; font-weight: 600; color: var(--navy); background: none; border: 0;
  padding: 6px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
  align-self: flex-start;
}
.up-backlink { text-decoration: none; margin-bottom: -4px; }

/* What are you uploading? */
.up-picks { display: grid; gap: 12px; }
.up-pick {
  display: flex; align-items: center; gap: 16px; width: 100%; text-align: left;
  font: inherit; color: var(--ink); cursor: pointer;
  background: linear-gradient(135deg, rgba(255,255,255,.82), rgba(255,255,255,.55));
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
  padding: 16px 18px; min-height: 84px;
}
.up-pick:hover { border-color: var(--navy-soft); }
.up-pick-t { flex: 1; display: flex; flex-direction: column; }
.up-pick-t strong { font-family: var(--display); font-weight: 400; color: var(--navy); font-size: 17px; }
.up-pick-t small, .up-recent small, .up-chosen small { color: var(--muted); font-size: 15px; }
.up-ic { width: 30px; height: 30px; color: var(--navy); flex: none; margin: 0 7px; }
.up-go {
  font-weight: 700; font-size: 15px; color: var(--navy);
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px;
}
.up-pick-hot { background: var(--navy); border-color: var(--navy); }
.up-pick-hot .up-pick-t strong { color: #fff; font-size: 19px; }
.up-pick-hot .up-pick-t small { color: #c9d3ff; }
.up-pick-hot:hover { background: var(--navy-soft); }

/* Little first-page preview */
.up-thumb {
  flex: none; width: 44px; height: 58px; border-radius: 4px; background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.18); padding: 8px 6px;
  display: flex; flex-direction: column; gap: 5px;
}
.up-thumb span { height: 3px; border-radius: 2px; background: #c9d3ee; }
.up-thumb span:first-child { background: var(--navy); width: 70%; height: 5px; }
.up-thumb span:nth-child(3) { width: 80%; }
.up-thumb.big { width: 92px; height: 120px; padding: 14px 11px; gap: 8px; border: 1px solid var(--line); }
.up-thumb.big span { height: 5px; }
.up-thumb.big span:first-child { height: 8px; }

/* Recently uploaded */
.up-recent { list-style: none; margin: 0; padding: 4px 20px; }
.up-recent li { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.up-recent li + li { border-top: 1px solid #e3ecfb; }
.up-recent li > span { flex: 1; display: flex; flex-direction: column; }
.up-recent .gone strong { text-decoration: line-through; color: var(--muted); }
.up-out { margin: 0; text-align: center; }
.up-out .up-link { align-self: center; }

/* Choose the file */
.up-when { display: grid; grid-template-columns: 1fr 110px; gap: 10px; align-items: end; }
.up-when label { display: flex; flex-direction: column; gap: 6px; }
.up-drop {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 34px 16px; border: 2px dashed #9fb4e8; border-radius: 16px; background: #fff;
  color: var(--navy); text-align: center; cursor: pointer;
}
.up-drop:hover, .up-drop.over { border-color: var(--navy); background: #f2f7ff; }
.up-drop svg { width: 38px; height: 38px; }
.up-drop strong { font-size: 19px; }
.up-drop small { color: var(--muted); font-size: 14px; }
.up-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.up-chosen { display: flex; gap: 16px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.up-chosen > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.up-chosen strong { color: var(--navy); overflow-wrap: anywhere; }
.up-warn { margin: 0; padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid #b3261e; color: #8a1d17; font-weight: 600; }
.up-publish { width: 100%; font-size: 18px; }

/* Done */
.up-done { align-items: center; text-align: center; }
.up-done > svg { width: 56px; height: 56px; color: var(--navy); }
.up-done .up-link { align-self: center; }
.up-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.up-chosen .up-link { text-align: left; }

/* Inside the app (/app/#upload) */
.up-app { --display: "Krona One", var(--sans); margin-top: 14px; }
.up-app .up-card, .up-app .up-pick { border-radius: var(--radius); }
.up-app .up-h { color: var(--navy); }

/* Manage trusted servants */
.up-manage {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer;
  font: inherit; color: var(--navy); background: transparent;
  border: 1px dashed #9fb4e8; border-radius: 16px; padding: 14px 18px;
}
.up-manage:hover { background: rgba(255,255,255,.6); border-color: var(--navy-soft); }
.up-manage > svg:first-child { width: 28px; height: 28px; flex: none; margin: 0 8px; }
.up-manage span { flex: 1; display: flex; flex-direction: column; }
.up-manage small { color: var(--muted); font-size: 14px; }
.up-chev { width: 20px; height: 20px; flex: none; }
.up-people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.up-person { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.up-person-top { display: flex; align-items: flex-start; gap: 12px; }
.up-person-top > span { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.up-person-top strong { color: var(--navy); }
.up-person-top small { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.up-person.gone strong { color: var(--muted); text-decoration: line-through; }
.up-remove { color: #8a1d17; padding-top: 0; }
.up-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.up-chip {
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--muted);
}
.up-chip[aria-pressed=true] { background: var(--navy); border-color: var(--navy); color: #fff; }
.up-chip[aria-pressed=true]::before { content: "✓ "; }
.up-chip-admin { border-style: dashed; }
.up-flabel { font-weight: 600; color: var(--navy); }
.up-small { font-size: 14px; text-align: center; }
.up input[type=text] { font: inherit; font-size: 18px; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--ink); width: 100%; }
.up .flash { margin: 0; }

/* Real version */
.up-notice { margin: 0; padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); color: var(--navy); font-weight: 600; }
.up-loading { text-align: center; padding: 30px 0; }
.up-row-left { justify-content: flex-start; gap: 18px; }
.up-bar { height: 8px; border-radius: 99px; background: #dfe8fb; overflow: hidden; }
.up-bar span { display: block; height: 100%; width: 2%; background: var(--navy); transition: width .2s; }
.up-recent .up-empty { color: var(--muted); }
.up-chip:disabled { opacity: .6; }

a.up-pick { text-decoration: none; box-sizing: border-box; }
.up-pick[hidden] { display: none; }

/* Help for files that come from Google Docs */
.up-tip { margin: 12px 2px 0; padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px solid #d6e3fa; font-size: 14px; line-height: 1.45; color: var(--muted, #565c88); }
.up-tip strong, .up-tip b { color: var(--navy, #04076a); }
.up-tip-row { display: block; margin-top: 6px; }
.up-tip[hidden] { display: none !important; }
