:root {
  --ink: #282626;
  --red: #d40909;
  --line: #d8d8d8;
  --muted: #666;
  font-family: ui-monospace, SFMono-Regular, Menlo, "PingFang SC", sans-serif;
  color: var(--ink);
  background: #fff;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  background: #fff;
  border: 1px solid var(--ink);
  cursor: pointer;
  padding: 9px 15px;
}
a {
  color: inherit;
  text-decoration: none;
}
button:hover {
  background: #f1f1f1;
}
button:disabled {
  color: #999;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 4px;
}
header {
  position: relative;
  z-index: 5;
  padding: 38px 40px 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
}
.brand,
nav {
  pointer-events: auto;
}
.brand {
  position: relative;
  width: 291px;
  height: 124px;
}
.brand > button {
  border: 0;
  padding: 0;
  background: transparent;
  width: 100%;
  height: 100%;
  text-align: left;
}
.brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left top;
}
.brand-actions {
  position: absolute;
  inset: 0 auto auto 0;
  height: 122px;
  display: none;
}
.brand-actions button,
.brand-actions a {
  display: grid;
  place-items: center;
  width: 122px;
  font-size: 64px;
  color: #fff;
  background: var(--red);
  border: 0;
}
.brand-actions a {
  width: 74px;
  background: #000;
  font-size: 42px;
}
.brand:hover .brand-actions,
.brand:focus-within .brand-actions,
.brand.open .brand-actions {
  display: flex;
}
nav {
  display: flex;
  gap: 32px;
  font-size: 21px;
  padding-top: 12px;
}
nav a[aria-current] {
  border-bottom: 2px solid var(--ink);
}
#cloud {
  position: fixed;
  inset: 0;
  border: 0;
  width: 100%;
  height: 100%;
  background: white;
}
body:not(.home) #cloud {
  visibility: hidden;
  pointer-events: none;
}
#page {
  padding: 34px 88px 64px 40px;
}
body.home #page {
  display: none;
}
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
}
.search {
  font-size: 26px;
  padding: 18px 22px;
  border: 1px solid var(--ink);
  width: 100%;
  min-width: 0;
}
.toolbar select {
  height: 46px;
  max-width: 180px;
  background: #fff;
  border: 1px solid var(--ink);
  padding: 8px;
}
.count {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 20px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px 28px;
}
.card {
  display: block;
  min-width: 0;
}
.scan {
  aspect-ratio: 1;
  background: #f6f6f5;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.scan img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
  transition: transform 0.2s;
}
.card:hover img {
  transform: scale(1.025);
}
.caption {
  font-size: 14px;
  line-height: 1.6;
  margin-top: 12px;
}
.caption strong {
  font-weight: 400;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.caption time {
  display: block;
}
.detail {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  align-items: start;
}
.detail .scan {
  width: 100%;
  position: relative;
}
.id {
  font-size: 14px;
  margin: 0 0 20px;
}
h1 {
  font-size: 26px;
  font-weight: 400;
  line-height: 1.5;
  margin: 0 0 20px;
}
h2 {
  font-size: 22px;
  font-weight: 400;
  margin: 0 0 28px;
}
.tags {
  display: flex;
  gap: 8px;
  margin-bottom: 40px;
}
.tag {
  padding: 5px 9px;
  border: 1px solid;
  font-size: 14px;
}
.meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
.meta dt {
  font-size: 14px;
  margin-bottom: 10px;
}
.meta dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.wide {
  grid-column: 1/-1;
}
.detailhead {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.editor {
  display: grid;
  grid-template-columns: 280px minmax(0, 760px);
  gap: 60px;
}
.tabs {
  display: flex;
  flex-direction: column;
  gap: 25px;
  align-items: flex-start;
}
.tabs button {
  font-size: 32px;
  border: 0;
  padding: 0;
  color: #999;
}
.tabs button[aria-selected="true"] {
  color: var(--ink);
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.fields label {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
}
.fields input,
.fields select,
.fields textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #777;
  background: white;
  border-radius: 0;
}
.fields textarea {
  height: 120px;
}
.primary {
  background: var(--ink);
  color: white;
}
.error {
  color: #b00000;
  white-space: pre-wrap;
}
.muted {
  color: #777;
  font-size: 14px;
}
.empty {
  padding: 64px;
  text-align: center;
  background: #fafafa;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
th,
td {
  border-bottom: 1px solid var(--line);
  padding: 16px 10px;
  font-size: 14px;
}
td img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}
th {
  font-weight: 400;
  color: #777;
}
@media (max-width: 1100px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .editor {
    grid-template-columns: 190px 1fr;
    gap: 30px;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .search {
    flex-basis: 100%;
  }
}
@media (max-width: 700px) {
  header {
    padding: 20px 16px 0;
  }
  .brand {
    width: 190px;
    height: 82px;
  }
  .brand-actions {
    height: 80px;
  }
  .brand-actions button {
    font-size: 42px;
  }
  .brand-actions a {
    width: 54px;
  }
  nav {
    gap: 14px;
    font-size: 16px;
  }
  #page {
    padding: 30px 16px;
  }
  .grid {
    gap: 22px 14px;
  }
  .tabs {
    flex-direction: row;
    gap: 24px;
  }
  .tabs button {
    font-size: 23px;
  }
  .fields {
    grid-template-columns: 1fr;
  }
  .meta {
    gap: 22px;
  }
  .search {
    font-size: 22px;
  }
  .detailhead {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
[hidden] {
  display: none !important;
}
body.home header {
  display: flex;
  position: absolute;
  inset: 0 0 auto;
  justify-content: space-between;
  align-items: flex-start;
}
body.home nav {
  display: flex;
  flex-direction: row;
  gap: 32px;
  margin: 0;
  width: auto;
  font-size: 21px;
  padding-top: 12px;
}
body.home nav a {
  background: transparent;
  width: auto;
}
.brand-actions {
  width: 122px;
}
.brand-actions button {
  width: 122px;
  height: 122px;
}
.brand:hover > #brandToggle,
.brand:focus-within > #brandToggle,
.brand.open > #brandToggle {
  opacity: 0;
}
.brand-actions button svg {
  width: 54px;
  height: 54px;
}
.spatial-viewer {
  perspective: 1400px;
  background: #fafafa;
  position: relative;
  overflow: hidden;
}
.ticket-object {
  position: absolute;
  inset: 8%;
  width: 84%;
  height: 84%;
  padding: 0;
  border: 0;
  background: transparent;
  transform-style: preserve-3d;
  cursor: pointer;
}
.ticket-object:hover {
  background: transparent;
}
.ticket-object:focus-visible {
  outline: 2px solid #d40909;
}
.ticket-turn {
  display: block;
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.ticket-object.flipped .ticket-turn {
  transform: rotateY(180deg);
}
.ticket-side {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.ticket-side img {
  padding: 0;
  filter: drop-shadow(0 14px 13px rgba(0, 0, 0, 0.12));
  pointer-events: none;
}
.ticket-back {
  transform: rotateY(180deg);
}
@keyframes ticket-drift {
  0%,
  100% {
    transform: rotateY(-7deg) rotateX(3deg) translateY(0);
  }
  50% {
    transform: rotateY(7deg) rotateX(-3deg) translateY(-7px);
  }
}
body.home #toolRail,
body.home #toolPanel {
  display: none;
}
.toolbar {
  margin-right: 0;
}
@media (max-width: 700px) {
  body.home nav {
    gap: 14px;
    font-size: 16px;
    margin: 0;
  }
  .brand-actions {
    width: 80px;
  }
  .brand-actions button {
    width: 80px;
    height: 80px;
  }
  .brand-actions button svg {
    width: 38px;
    height: 38px;
  }
  #page {
    padding-right: 70px;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .detail,
  .editor {
    grid-template-columns: minmax(0, 1fr);
  }
  .ticket-object {
    inset: 7%;
    width: 86%;
    height: 86%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ticket-object {
    animation: none;
  }
  .ticket-turn {
    transition: none;
  }
}
.ticket-object {
  animation: none;
}
.ticket-float {
  position: absolute;
  inset: 0;
  display: block;
  transform-style: preserve-3d;
  animation: ticket-drift 9s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .ticket-float {
    animation: none;
  }
}
.brand:hover > #brandToggle,
.brand:focus-within > #brandToggle,
.brand.open > #brandToggle {
  pointer-events: auto;
}
.ticket-side img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
}
.detail .related-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 24px;
}
.scan {
  position: relative;
}
.scan > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
body.home .brand-actions {
  display: none !important;
}
body.home .brand > #brandToggle {
  opacity: 1 !important;
  pointer-events: none !important;
  cursor: default;
}
body.home .brand img {
  opacity: 1 !important;
}
.settings-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 54px;
}
.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-size: 22px;
  align-items: flex-start;
}
.settings-nav a {
  color: #888;
}
.settings-nav a[aria-current] {
  color: #282626;
  border-bottom: 1px solid;
}
.section-title {
  margin: 38px 0 22px;
}
.compact {
  font-size: 18px;
  padding: 14px 16px;
  margin: 12px 0 26px;
}
.selectable-card {
  position: relative;
  min-width: 0;
}
.card-selector {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #fff;
  padding: 7px;
  z-index: 1;
}
.card-selector input,
.select-card > input {
  accent-color: #282626;
  width: 19px;
  height: 19px;
  margin: 0;
}
.panel-form input,
.panel-form textarea {
  font: inherit;
  padding: 10px;
  border: 1px solid #aaa;
  width: 100%;
  border-radius: 0;
  background: #fff;
}
.panel-form label {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 0 0 18px;
  font-size: 13px;
}
.panel-form .panel-actions {
  margin-top: 24px;
}
.category-group {
  border-top: 1px solid #282626;
  padding: 24px 0;
  margin-bottom: 28px;
}
.category-group h2 {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.category-group small {
  font-size: 13px;
  color: #666;
  font-weight: 400;
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.category-grid > label {
  border: 1px solid #ccc;
  padding: 15px;
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 14px;
}
.category-grid > label small {
  margin-left: auto;
  color: #777;
}
.category-grid input {
  accent-color: #282626;
}
.review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 28px 0;
}
.review-grid dt {
  color: #777;
  font-size: 13px;
  margin-bottom: 12px;
}
.review-grid dd {
  margin: 0;
  font-size: 23px;
}
.review-card {
  border-top: 1px solid #282626;
  padding: 25px 0;
  margin-top: 28px;
}
.review-examples {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.warning {
  font-size: 14px;
  color: #8d3700;
  line-height: 1.7;
}
.import-entries {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.import-entry {
  border: 1px solid #ccc;
  padding: 20px;
  min-width: 0;
}
.import-entry .fields {
  grid-template-columns: 1fr;
}
.import-entry input,
.import-entry select {
  min-width: 0;
}
.import-entry summary {
  cursor: pointer;
  font-size: 14px;
  margin: 18px 0;
}
.import-entry strong {
  font-size: 16px;
  font-weight: 400;
}
.import-choice {
  display: flex;
  align-items: start;
  gap: 12px;
}
.import-choice input {
  accent-color: #282626;
}
.scan-choice {
  border: 1px solid transparent;
  background: #fff;
  padding: 0;
  text-align: left;
  min-width: 0;
}
.scan-choice.selected {
  border-color: #282626;
}
.scan-choice:hover {
  background: #fff;
}
.scan-choice .scan {
  display: block;
  width: 100%;
}
.scan-choice .caption {
  display: block;
  padding: 5px 10px 12px;
}
.editor-scans {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.select-card {
  position: relative;
  display: block;
  cursor: pointer;
  min-width: 0;
}
.select-card > input {
  position: absolute;
  z-index: 1;
  top: 10px;
  left: 10px;
}
.select-card .scan {
  display: block;
}
.select-card .scan img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.select-card small {
  display: block;
  color: #777;
  margin-top: 6px;
}
.related-choices {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 24px;
}
.issue-groups {
  margin-bottom: 36px;
}
.settings-layout #workspace {
  min-width: 0;
}
.settings-layout .grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.tool-panel {
  overscroll-behavior: contain;
}
a,
button,
summary,
input {
  scroll-margin-top: 24px;
}
@media (max-width: 1100px) {
  .settings-layout {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 30px;
  }
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .settings-nav {
    font-size: 19px;
  }
  .related-choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .import-entries {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .settings-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }
  .settings-nav {
    flex-direction: row;
    gap: 18px;
    overflow: auto;
    white-space: nowrap;
    padding-bottom: 10px;
    font-size: 16px;
  }
  .category-grid,
  .settings-layout .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .category-grid > label {
    padding: 10px;
    font-size: 13px;
    flex-wrap: wrap;
  }
  .review-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .import-entries {
    grid-template-columns: 1fr;
  }
  .tabs {
    overflow: auto;
    white-space: nowrap;
  }
  .editor-scans {
    grid-template-columns: 1fr;
  }
  .related-choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
#busyStatus {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 40;
  background: #fff;
  border: 1px solid #282626;
  padding: 12px 16px;
  font-size: 14px;
}
