:root {
  --paper: #f5f3ed;
  --white: #fffefb;
  --ink: #2b332d;
  --muted: #7a7e75;
  --line: #dedfd5;
  --accent: #9c4735;
  --accent-hover: #803b2c;
  --sage: #e6eadf;
  --body: "DM Sans", "Avenir Next", "PingFang SC", sans-serif;
  --display: "Baskervville", "Songti SC", serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 14px/1.6 var(--body);
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  color: inherit;
}
input,
textarea,
select {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--white);
  color: var(--ink);
  padding: 11px 13px;
  width: 100%;
  outline: none;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #9c473514;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #9c473577;
  outline-offset: 4px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
}
h1,
h2,
p {
  margin-top: 0;
}
h1 {
  font: 400 36px/1.3 var(--display);
  letter-spacing: 0.01em;
}
h2 {
  font: 500 23px/1.4 var(--display);
  margin-bottom: 10px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 14px;
}
.brand {
  font-size: 23px;
  letter-spacing: 0.12em;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  gap: 13px;
}
.brand span {
  font: 11px/1 var(--body);
  letter-spacing: 0.13em;
  border-left: 1px solid #a3a99a;
  padding-left: 13px;
  color: var(--muted);
}
.primary,
.outline-button,
.subtle-button {
  border-radius: 5px;
  padding: 11px 21px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
}
.primary {
  background: var(--accent);
  color: white;
}
.primary:hover {
  background: var(--accent-hover);
}
.outline-button {
  border-color: var(--line);
  background: transparent;
}
.outline-button:hover,
.subtle-button:hover {
  background: var(--sage);
}
.subtle-button {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}
.text-button {
  border: 0;
  background: none;
  padding: 0;
  color: var(--accent);
  font-size: 12px;
}
.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}
.auth-story {
  background: #e7eadf;
  padding: 45px 11%;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 800px;
}
.auth-heading {
  margin-top: 90px;
  z-index: 1;
}
.auth-heading h1 {
  font-size: 44px;
  line-height: 1.5;
  margin-bottom: 22px;
}
.auth-heading > p:last-child {
  color: #73796b;
  line-height: 1.9;
}
.auth-story footer {
  margin-top: auto;
  padding-top: 250px;
  color: #79816f;
  font-size: 11px;
  letter-spacing: 0.1em;
}
.paper-composition {
  position: absolute;
  bottom: 110px;
  left: 16%;
  display: flex;
  align-items: center;
  gap: 15px;
}
.paper {
  background: var(--white);
  box-shadow: 0 15px 25px #46563c14;
  padding: 20px;
  width: 155px;
  height: 175px;
}
.calendar-paper {
  transform: rotate(-7deg);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}
.calendar-paper span {
  font: 13px var(--display);
  color: var(--muted);
}
.calendar-paper strong {
  font: 68px/0.9 var(--display);
  font-weight: 400;
}
.note-paper {
  transform: rotate(7deg) translateY(15px);
  background: #f4e8c8;
  width: 185px;
}
.note-paper > span {
  font-size: 11px;
  color: #8c7954;
}
.note-paper p {
  font: 15px/1.9 var(--display);
  margin-top: 14px;
}
.note-rule {
  display: block;
  border-top: 1px solid #d5c9a8;
  width: 70%;
}
.auth-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px 35px;
  background: var(--white);
}
.auth-form {
  width: 100%;
  max-width: 340px;
}
.auth-form h2 {
  font-size: 31px;
  margin-bottom: 10px;
}
.auth-form > .muted {
  margin-bottom: 37px;
  font-size: 13px;
}
.auth-form label {
  margin-bottom: 22px;
}
.auth-form > .primary {
  width: 100%;
}
.auth-switch {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin-top: 23px;
}
.form-error {
  color: #b24732;
  font-size: 12px;
  min-height: 20px;
}
.workspace {
  display: grid;
  grid-template-columns: 224px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: #eeeee6;
  border-right: 1px solid var(--line);
  padding: 32px 22px;
  display: flex;
  flex-direction: column;
}
.sidebar .brand {
  font-size: 21px;
  gap: 10px;
}
.sidebar-label {
  margin: 54px 10px 12px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
}
.device-link {
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 13px 12px;
  border-radius: 5px;
}
.device-link.selected {
  background: #dfe5d6;
}
.device-link small {
  display: block;
  color: #7d8577;
  font-size: 10px;
  margin-top: 3px;
}
.screen-glyph {
  width: 24px;
  height: 18px;
  border: 1.5px solid #7a8572;
  border-radius: 3px;
  flex-shrink: 0;
  position: relative;
}
.screen-glyph:after {
  content: "";
  position: absolute;
  width: 11px;
  height: 1px;
  background: #7a8572;
  left: 5px;
  bottom: 4px;
}
.add-device {
  background: none;
  border: 1px dashed #bdc6b4;
  border-radius: 5px;
  padding: 10px;
  margin-top: 18px;
  text-align: left;
  color: #657159;
  font-size: 12px;
}
.account {
  margin-top: auto;
  padding-top: 40px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
}
.account .text-button {
  margin-left: auto;
}
.avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #dfe3d5;
  color: #697660;
  font-size: 11px;
}
.main {
  padding: 0 5% 55px;
  min-width: 0;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  padding: 27px 0;
  border-bottom: 1px solid var(--line);
}
.page-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 40px 0 31px;
}
.page-title .eyebrow {
  font-size: 10px;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.page-title h1 {
  font-size: 30px;
  margin-bottom: 0;
}
.content-layout {
  display: grid;
  grid-template-columns: minmax(340px, 1fr) minmax(300px, 400px);
  gap: 38px;
  align-items: start;
}
.editor {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  min-width: 0;
}
.tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  padding: 0 20px;
  gap: 19px;
}
.tabs button {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 17px 0 14px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.tabs button.active {
  border-bottom-color: var(--accent);
  color: var(--accent);
}
#editor-body {
  padding: 28px;
  min-height: 355px;
}
.editor-heading {
  margin-bottom: 25px;
}
.editor-heading h2 {
  font-size: 22px;
}
.editor-heading p {
  font-size: 12px;
  line-height: 1.8;
}
.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}
.overview-grid button {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 18px;
  text-align: left;
  background: #f8f8f1;
}
.overview-grid button span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.overview-grid strong {
  font: 37px var(--display);
  margin-right: 8px;
}
.overview-grid small {
  font-size: 11px;
  color: var(--muted);
}
.overview-weather {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  margin-bottom: 22px;
}
.overview-weather > span {
  color: var(--muted);
}
.overview-weather .text-button {
  margin-left: auto;
}
.timezone-label input {
  font-size: 12px;
}
.save-bar {
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 25px;
}
.save-bar > span {
  color: var(--muted);
  font-size: 11px;
}
.preview-panel {
  position: sticky;
  top: 30px;
  padding-top: 10px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.section-heading h2 {
  font: 500 15px var(--body);
  margin: 0;
}
.device-preview {
  background: #d9ded0;
  border: 1px solid #c8cebf;
  padding: 15px;
  border-radius: 9px;
  box-shadow: 0 8px 24px #25391e09;
}
.device-preview img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: contain;
  background: #fff;
  image-rendering: pixelated;
  border: 1px solid #bbc4b0;
}
.receipt {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 19px;
  font-size: 12px;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #879a72;
}
.preview-caption {
  color: var(--muted);
  font-size: 11px;
  margin: 7px 0 25px 13px;
}
.device-details {
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 15px;
}
.device-details div {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
}
.device-details dd {
  margin: 0;
  color: #606b56;
}
.notes-list {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-bottom: 17px;
}
.note-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  background: #f7f3e8;
  border-radius: 4px;
  border: 1px solid #e5dfcf;
}
.note-row input[type="checkbox"] {
  width: 15px;
  accent-color: var(--accent);
  margin-top: 7px;
}
.note-row textarea {
  background: none;
  border: 0;
  box-shadow: none;
  padding: 3px;
  resize: vertical;
  font-size: 13px;
  min-height: 48px;
}
.icon-button {
  background: none;
  border: 0;
  font-size: 20px;
  color: #929484;
  padding: 0 3px;
}
.events-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 22px 0;
}
.event-row {
  display: flex;
  gap: 9px;
  align-items: center;
}
.event-row input {
  font-size: 12px;
  min-width: 0;
}
.event-row input[type="date"] {
  max-width: 145px;
}
.field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.search-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}
.search-row label {
  flex: 1;
}
.location-form {
  display: flex;
  flex-direction: column;
  gap: 17px;
  margin-top: 25px;
}
.city-result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 13px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #f5f7ef;
  font-size: 12px;
  text-align: left;
}
.city-result span {
  font-size: 11px;
  color: var(--muted);
}
.provider-credit {
  font-size: 10px;
  line-height: 1.8;
  color: var(--muted);
  margin: 23px 0 0;
}
.upload-area {
  border: 1px dashed #bdc6b4;
  border-radius: 5px;
  padding: 25px;
  text-align: center;
  cursor: pointer;
  color: #6b785e;
  font-size: 14px;
  background: #f6f8f1;
}
.upload-area span {
  font-weight: 400;
  font-size: 11px;
  color: var(--muted);
}
.upload-area input {
  width: 100%;
  font-size: 11px;
  margin-top: 7px;
  padding: 4px;
  border: 0;
  background: transparent;
}
.album-settings {
  margin-top: 24px;
}
.photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 25px;
}
.photo-grid figure {
  margin: 0;
  min-width: 0;
}
.photo-grid img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  image-rendering: pixelated;
}
.photo-grid figcaption {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
  font-size: 10px;
}
.photo-grid figcaption span {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.photo-grid .text-button {
  font-size: 10px;
}
.empty-state {
  max-width: 600px;
  margin: 100px auto;
  text-align: center;
}
.empty-state h1 {
  font-size: 38px;
}
.empty-state > p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.9;
}
.empty-screen {
  width: 120px;
  height: 90px;
  border: 6px solid #cbd3c0;
  border-radius: 8px;
  background: #fafaf3;
  margin: 0 auto 30px;
  box-shadow: 0 8px 20px #415c3212;
}
.empty-state .primary {
  margin-top: 15px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 35px;
  width: 440px;
  max-width: calc(100vw - 32px);
  background: var(--white);
  color: var(--ink);
}
dialog::backdrop {
  background: #27312166;
  backdrop-filter: blur(3px);
}
dialog form {
  position: relative;
}
dialog .dialog-close {
  position: absolute;
  right: -15px;
  top: -20px;
  background: none;
  border: 0;
  font-size: 25px;
  color: var(--muted);
}
dialog h2 {
  font-size: 29px;
}
dialog .muted {
  font-size: 12px;
  margin-bottom: 25px;
}
dialog label {
  margin-bottom: 19px;
}
dialog .primary {
  width: 100%;
}
#notice {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: #35402e;
  color: white;
  border-radius: 6px;
  padding: 13px 22px;
  font-size: 12px;
  max-width: 90vw;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  z-index: 10;
}
#notice.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
#notice.error {
  background: #8d4335;
}
@media (min-width: 1500px) {
  .main {
    max-width: 1350px;
    width: 100%;
    margin: auto;
  }
}
@media (max-width: 1150px) {
  .workspace {
    grid-template-columns: 190px 1fr;
  }
  .sidebar {
    padding: 28px 16px;
  }
  .sidebar .brand {
    font-size: 18px;
  }
  .brand span {
    font-size: 9px;
  }
  .main {
    padding: 0 28px 40px;
  }
  .content-layout {
    gap: 24px;
    grid-template-columns: minmax(310px, 1fr) minmax(240px, 320px);
  }
  #editor-body {
    padding: 22px;
  }
  .tabs {
    gap: 15px;
    padding: 0 17px;
  }
}
@media (max-width: 940px) {
  .content-layout {
    grid-template-columns: 1fr;
  }
  .preview-panel {
    position: static;
    max-width: 500px;
  }
  .auth-heading h1 {
    font-size: 35px;
  }
  .auth-story {
    padding: 35px 9%;
  }
  .paper-composition {
    left: 10%;
    transform: scale(0.85);
    transform-origin: left center;
  }
  .auth-layout {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 600px) {
  .auth-layout {
    display: block;
  }
  .auth-story {
    min-height: 0;
    padding: 24px 25px 30px;
  }
  .auth-heading {
    margin-top: 30px;
  }
  .auth-heading h1 {
    font-size: 29px;
    line-height: 1.5;
    margin-bottom: 0;
  }
  .auth-heading .eyebrow {
    margin-bottom: 8px;
  }
  .auth-heading > p:last-child,
  .paper-composition,
  .auth-story footer {
    display: none;
  }
  .auth-form-wrap {
    padding: 35px 25px 50px;
  }
  .auth-form h2 {
    font-size: 25px;
  }
  .workspace {
    display: block;
  }
  .sidebar {
    padding: 17px 20px;
    border-bottom: 1px solid var(--line);
    border-right: 0;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 13px;
  }
  .sidebar-label {
    display: none;
  }
  .sidebar nav {
    grid-column: 1/-1;
    display: flex;
    overflow: auto;
    gap: 8px;
    grid-row: 2;
  }
  .device-link {
    min-width: 160px;
    width: auto;
    padding: 8px 10px;
  }
  .device-link small {
    font-size: 9px;
  }
  .add-device {
    margin: 0;
    font-size: 11px;
    padding: 8px 12px;
  }
  .account {
    padding-top: 0;
    grid-column: 1/-1;
    justify-content: flex-end;
    margin-top: 0;
    font-size: 11px;
  }
  .account .text-button {
    margin-left: 7px;
  }
  .avatar {
    width: 21px;
    height: 21px;
    font-size: 9px;
  }
  .main {
    padding: 0 17px 35px;
  }
  .topbar {
    padding: 18px 0;
    font-size: 10px;
  }
  .page-title {
    margin: 25px 0;
  }
  .page-title h1 {
    font-size: 25px;
  }
  .page-title .subtle-button {
    font-size: 10px;
    padding: 7px 10px;
  }
  .tabs {
    gap: 0;
    justify-content: space-between;
  }
  .tabs button {
    font-size: 12px;
    padding-top: 14px;
  }
  #editor-body {
    padding: 22px 19px;
    min-height: 300px;
  }
  .editor-heading h2 {
    font-size: 21px;
  }
  .save-bar {
    padding: 14px 19px;
  }
  .save-bar > span {
    font-size: 10px;
  }
  .save-bar .primary {
    font-size: 12px;
    padding: 10px 15px;
  }
  .preview-panel {
    margin-top: 9px;
  }
  .empty-state {
    margin: 65px auto;
  }
  .empty-state h1 {
    font-size: 30px;
  }
  .field-pair {
    gap: 10px;
  }
  .event-row {
    flex-wrap: wrap;
  }
  .event-row input[type="date"] {
    max-width: none;
    flex: 1 0 100%;
  }
  .event-row input:not([type="date"]) {
    width: calc(100% - 30px);
  }
  .search-row {
    gap: 8px;
  }
  .search-row .outline-button {
    padding: 11px 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
