:root {
  --paper: #f8f7f2;
  --ink: #263a30;
  --green: #355c4b;
  --muted: #5c675d;
  --line: #e5e7de;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    14px/1.6 system-ui,
    sans-serif;
}
header {
  height: 94px;
  max-width: 1180px;
  margin: auto;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font:
    42px Georgia,
    serif;
  letter-spacing: -2px;
  text-decoration: none;
  color: var(--ink);
}
.brand span {
  color: #bb9457;
}
.owner-label,
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--muted);
}
header button {
  margin-left: auto;
}
main {
  max-width: 1180px;
  margin: 45px auto;
  padding: 0 32px;
}
h1 {
  font:
    46px/1.2 Georgia,
    serif;
  margin: 14px 0;
}
h2 {
  font:
    26px Georgia,
    serif;
  margin: 0 0 24px;
}
.muted,
small {
  color: var(--muted);
}
.layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 40px;
  margin-top: 38px;
  align-items: start;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
}
.login-panel {
  max-width: 440px;
  margin-top: 32px;
}
.shop-controls {
  margin-top: 28px;
}
.toggle-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}
.toggle-label input {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--green);
}
.shop-controls form > button {
  width: auto;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 18px;
}
input,
textarea {
  display: block;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  margin-top: 7px;
  font: 14px system-ui;
}
input:focus,
textarea:focus {
  outline: 2px solid #9db69e;
  outline-offset: 1px;
}
input[type="color"] {
  height: 45px;
  padding: 5px;
}
small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  margin-top: 8px;
  line-height: 1.5;
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
button {
  border: 0;
  border-radius: 10px;
  background: var(--green);
  color: white;
  font: 600 12px system-ui;
  padding: 14px 21px;
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.secondary {
  background: #e8ede3;
  color: var(--green);
}
form > button {
  width: 100%;
}
.file-box {
  padding: 20px;
  border: 1px dashed #b9c9b5;
  border-radius: 12px;
  background: #f1f4eb;
}
input[type="file"] {
  border: 0;
  padding: 8px 0;
  background: transparent;
  font-size: 12px;
}
.catalog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.catalog-heading h2 {
  margin: 0;
}
.book {
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
  padding: 22px;
  margin-bottom: 16px;
  display: flex;
  gap: 20px;
}
.book-cover {
  width: 72px;
  min-width: 72px;
  height: 103px;
  border-radius: 4px;
  background: var(--green);
  color: #fcf7ed;
  display: flex;
  align-items: center;
  justify-content: center;
  font:
    16px Georgia,
    serif;
  padding: 10px;
  text-align: center;
}
.book h3 {
  font:
    22px Georgia,
    serif;
  margin: 0 0 7px;
}
.book p {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 8px;
}
.book-content {
  flex: 1;
}
.book button {
  padding: 10px 16px;
  margin-top: 8px;
}
.badge {
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--green);
  display: block;
}
.empty {
  color: var(--muted);
  text-align: center;
  padding: 40px;
  border: 1px dashed var(--line);
  border-radius: 14px;
}
#message:not(:empty) {
  padding: 15px 20px;
  border-radius: 10px;
  background: #e8ede3;
  margin-top: 24px;
  position: sticky;
  bottom: 20px;
}
footer {
  text-align: center;
  color: var(--muted);
  font:
    italic 17px Georgia,
    serif;
  padding: 30px;
}
[hidden] {
  display: none !important;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  color: var(--ink);
  max-width: 620px;
  width: calc(100% - 40px);
  max-height: 90vh;
  padding: 28px;
}
dialog::backdrop {
  background: rgba(20, 35, 25, 0.45);
}
.book-content > button {
  margin-right: 8px;
}
#payments,
#support-inbox {
  margin-top: 22px;
  margin-bottom: 28px;
}
.book-cover img {
  width: 72px;
  height: 103px;
  object-fit: cover;
  border-radius: 4px;
}
@media (max-width: 760px) {
  .layout {
    grid-template-columns: 1fr;
  }
  main {
    padding: 0 20px;
  }
  header {
    padding: 0 20px;
  }
  h1 {
    font-size: 36px;
  }
  .panel {
    padding: 22px;
  }
}

.workspace-nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 24px 0;
}
select {
  width: 100%;
  padding: 12px;
  border: 1px solid #c5cec3;
  border-radius: 8px;
  background: white;
  color: #263a30;
  font: inherit;
}
#preview-dialog {
  width: min(900px, 90vw);
}
#preview-frame {
  width: 100%;
  height: 60vh;
  border: 1px solid #c5cec3;
  margin-top: 16px;
}
progress {
  width: 100%;
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}
