:root { color-scheme: light; font: 16px/1.5 system-ui, sans-serif; color: #19233b; background: #eef2fa; }
* { box-sizing: border-box; }
body { margin: 0; }
main { margin: 64px auto; width: min(100% - 36px, 1040px); }
.signin { max-width: 460px; margin-top: clamp(50px, 14vh, 140px); }
header { position: relative; margin-bottom: 24px; padding-right: 78px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(2.4rem, 6vw, 3.8rem); font-weight: 730; line-height: 1.03; letter-spacing: -.065em; }
h2 { font-size: 1.4rem; line-height: 1.25; letter-spacing: -.035em; }
.scope, .account { color: #52617d; }
.scope { font: .89rem/1.4 ui-monospace, monospace; margin-bottom: 9px; }
.account { margin: 8px 0 26px; overflow-wrap: anywhere; }
.card { background: #fff; border: 1px solid #d9e0ee; border-radius: 18px; padding: clamp(18px, 4vw, 30px); box-shadow: 0 14px 32px #223b700c; }
button, input, .upload-button { font: inherit; }
button, a, .upload-button { touch-action: manipulation; }
button, .upload-button { background: #294db8; color: #fff; border: 1px solid transparent; border-radius: 9px; padding: 7px 12px; font-weight: 650; cursor: pointer; }
button:hover, .upload-button:hover { background: #1c3a96; }
button:disabled { opacity: .5; cursor: default; }
.quiet { background: #fff; color: #294282; border-color: #d8e0f1; }
.quiet:hover { background: #eef3ff; }
:is(button, input, a, .upload-button):focus-visible, .upload-button:focus-within { outline: 3px solid #647df5; outline-offset: 2px; }
input:not([type=file]) { border: 1px solid #b9c5da; border-radius: 9px; padding: 9px; width: 100%; min-width: 0; }
label { display: block; font-weight: 620; margin: 0 0 6px; }
.signin button { margin-top: 12px; width: 100%; min-height: 44px; }
#status { font-size: .91rem; color: #435473; overflow-wrap: anywhere; }
#status:not(:empty) { margin-top: 12px; }
#logout { position: absolute; right: 0; bottom: 0; }
nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
nav button { background: transparent; color: #294282; }
nav button:hover, nav button[aria-pressed=true] { background: #dce5ff; }
.toolbar, .form-row { display: flex; gap: 8px; align-items: center; }
.toolbar { justify-content: space-between; flex-wrap: wrap; }
#location { font: .95rem ui-monospace, monospace; overflow-wrap: anywhere; }
#tools { display: flex; flex-wrap: wrap; gap: 7px; }
[hidden], #tools[hidden] { display: none !important; }
.upload-button { position: relative; margin: 0; overflow: hidden; }
.upload-button input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
#name-form { margin-top: 14px; }
.table-wrap { overflow-x: auto; margin-top: 18px; }
table { width: 100%; border-collapse: collapse; text-align: left; }
td, th { padding: 9px; border-bottom: 1px solid #e3e9f3; vertical-align: middle; }
th { color: #52617d; font-size: .87rem; }
td:first-child { font-weight: 650; overflow-wrap: anywhere; }
td:nth-child(2) { white-space: nowrap; color: #52617d; font-size: .88rem; }
td:last-child { min-width: 150px; }
td :is(button, a) { margin: 3px 5px 3px 0; font-size: .88rem; }
a, .file-name { color: #294db8; }
.file-name { text-decoration: underline; background: transparent; padding: 0; }
.file-name:hover { color: #19255d; background: transparent; }
.settings-row { display: flex; flex-wrap: wrap; gap: 8px; }
.settings-row select, .order-fields select {
  appearance: none;
  background: #fff;
  border: 1px solid #b9c5da;
  border-radius: 9px;
  color: inherit;
  font: inherit;
  padding: 7px 26px 7px 10px;
  background-image: linear-gradient(45deg, transparent 50%, #52617d 50%), linear-gradient(135deg, #52617d 50%, transparent 50%);
  background-position: right 13px center, right 8px center;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.settings-row select:focus-visible, .order-fields select:focus-visible { outline: 3px solid #647df5; outline-offset: 2px; }
#passcode-status:not(:empty) { margin-top: 12px; }
#wallpaper-picture { display: block; width: min(100%, 360px); }
#wallpaper-preview { display: block; max-width: 100%; max-height: 240px; border-radius: 9px; margin-top: 12px; object-fit: contain; }
.wallpaper-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 14px; }
#wallpaper-status:not(:empty) { margin-top: 12px; }
#picture-share { margin-top: 16px; }
#picture-share .wallpaper-actions { margin-top: 0; }
#picture-link { flex: 1 1 220px; }
#wallpaper-library-form { margin-top: 14px; }
#wallpaper-library { width: min(100%, 380px); min-width: 0; }
#library-picture-preview { display: block; max-width: 100%; max-height: 270px; border-radius: 9px; margin-top: 12px; object-fit: contain; }
#wallpaper-library-status:not(:empty) { margin-top: 12px; }
#wallpaper-view h3 { margin: 18px 0 0; }
.order-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 16px; margin: 16px 0; }
.order-fields label { font-size: .9rem; }
.order-fields select { width: 100%; min-height: 44px; }
.order-row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#order-form-heading { margin: 14px 0 0; }
#order-status:not(:empty) { overflow-wrap: anywhere; margin-top: 12px; }
#order-result, .order-activity { margin-top: 18px; }
#order-result .wallpaper-actions { margin-top: 0; }
#order-link { flex: 1 1 240px; }
.order-activity { border-top: 1px solid #e3e9f3; padding-top: 18px; }
.order-activity h3 { margin: 0; }
#order-activity-status:not(:empty) { margin-top: 9px; }
#order-activity-list article { padding: 10px 0; border-bottom: 1px solid #e3e9f3; overflow-wrap: anywhere; }
#order-activity-list .toolbar { gap: 8px; }
#order-activity-list details { margin-top: 5px; }
#order-activity-list summary { cursor: pointer; }
#order-activity-list ul { margin: 4px 0 0; padding-left: 20px; }
.receipt-state { font-weight: 650; margin-top: 14px; }
.receipt-note { color: #52617d; margin-top: 10px; font-size: .92rem; }
.home-access-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; font-size: .9rem; }
.order-home-background { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
.order-home { isolation: isolate; min-height: 100vh; display: flow-root; }
.order-home .order-receipt { background: #fffffff2; }
.pc-setup { margin-top: 18px; border-top: 1px solid #e3e9f3; padding-top: 12px; }
.pc-setup summary { cursor: pointer; color: #294282; font-weight: 650; }
#pc-pairing-status:not(:empty), #pc-code-status:not(:empty), #pc-code-result { margin-top: 12px; }
#pc-code-result .wallpaper-actions { margin-top: 0; }
#pc-code-value { flex: 1 1 240px; font-family: ui-monospace, monospace; }
@media (max-width: 540px) {
  .order-fields { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  main { width: min(100% - 24px, 1040px); margin-block: 32px; }
  .signin { margin-top: clamp(42px, 12vh, 100px); }
  .manager header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    column-gap: 12px;
    padding: 0;
    margin-bottom: 16px;
  }
  .manager .scope { grid-column: 1 / -1; }
  .manager h1 { font-size: clamp(2rem, 8vw, 2.75rem); }
  #logout { position: static; }
  .manager button, .manager .upload-button { min-height: 44px; }
  .manager .card { padding: 14px; border-radius: 13px; }
  .toolbar { align-items: flex-start; gap: 10px; }
  #location { width: 100%; }
  #up:disabled { display: none; }
  .form-row { flex-wrap: wrap; }
  .form-row input { flex-basis: 100%; }
  .table-wrap { overflow: visible; margin-top: 12px; }
  table, tbody { display: block; }
  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  tbody tr {
    display: grid;
    gap: 2px;
    border-top: 1px solid #e3e9f3;
    padding: 11px 0;
  }
  tbody td { min-width: 0; padding: 0; border: 0; }
  td:first-child { line-height: 1.35; }
  td:nth-child(2) { white-space: normal; }
  td:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 5px;
  }
  td :is(button, a) { max-width: 100%; margin: 0; }
  td:last-child :is(button, a) {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 6px 9px;
  }
  td:first-child .file-name { text-align: left; overflow-wrap: anywhere; }
}
