:root {
  color-scheme: dark;
  --ink: #160f0a;
  --gold: #dfbf85;
  --cream: #eee0c8;
  --edge: #8d7248;
  --panel: #2a2018;
  font-family:
    Baskerville, "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif CJK JP", serif;
  color: var(--cream);
  background: #110c08;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
#shell {
  max-width: 540px;
  height: 100vh;
  height: 100dvh;
  margin: auto;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  padding-top: env(safe-area-inset-top);
}
[hidden] {
  display: none !important;
}
header {
  position: relative;
  background: url(assets/home/header-large.jpg) center/100% 100%;
  aspect-ratio: 941/130;
  min-height: 55px;
  display: flex;
  flex: none;
}
header button {
  border: 0;
  background: transparent;
  border-radius: 0;
  padding: 0;
}
#brand {
  flex: 1;
  user-select: none;
  -webkit-touch-callout: none;
}
#gear {
  width: 44px;
  font: 25px system-ui;
}
#bell {
  width: 18%;
}
main {
  flex: 1;
  overflow: auto;
  padding: 18px;
  overscroll-behavior: contain;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a {
  color: var(--gold);
}
button {
  border: 1px solid var(--edge);
  background: transparent;
  border-radius: 5px;
  min-height: 40px;
  padding: 7px 12px;
  cursor: pointer;
  touch-action: manipulation;
}
button:disabled {
  opacity: 0.38;
  cursor: default;
}
button.primary {
  background: var(--gold);
  color: var(--ink);
}
input,
textarea,
select {
  background: #302319;
  color: var(--cream);
  border: 1px solid #70573a;
  border-radius: 5px;
  padding: 10px;
  width: 100%;
  font-size: 16px;
}
textarea {
  resize: vertical;
}
h2 {
  font-weight: 400;
  color: var(--gold);
  font-size: 22px;
  margin: 14px 0 5px;
}
.stack {
  display: grid;
  gap: 13px;
}
.row {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}
.line {
  border-bottom: 1px solid #42352a;
  padding: 9px 0;
}
.number {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.login {
  max-width: 380px;
  margin: 3vh auto;
  text-align: center;
  display: grid;
  gap: 14px;
}
.logo {
  width: min(87%, 38vh);
  margin: auto;
  user-select: none;
  -webkit-touch-callout: none;
}
.provider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font: 500 17px system-ui;
  min-height: 50px;
  border-radius: 8px;
}
.apple {
  background: black;
  color: white;
}
.google {
  background: white;
  color: #171717;
}
.provider img {
  width: 20px;
}
.card {
  position: relative;
  aspect-ratio: 1.76;
  background-size: cover;
  border-radius: 12px;
  overflow: hidden;
  width: min(100%, 398px);
  margin: 14px auto 22px;
  display: block;
  border: 0;
  text-align: left;
  color: #222;
}
.card b,
.card small {
  position: absolute;
  left: 6%;
  letter-spacing: 0.12em;
}
.card b {
  top: 32%;
  font: 600 16px system-ui;
}
.card small {
  bottom: 15%;
}
.card.dark {
  color: white;
}
.facts div {
  display: grid;
  grid-template-columns: 44% 1fr;
  border-bottom: 1px solid #42352a;
  padding: 6px 0;
}
.flat {
  border: 0;
  text-align: left;
}
.menu {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #49392a;
  border-radius: 0;
  min-height: 58px;
  text-align: left;
}
.menu:after {
  content: "›";
  float: right;
}
.grid,
.designs {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(3, 1fr);
}
.designs button {
  padding: 5px;
  border-color: transparent;
}
.designs .selected,
.selected {
  border-color: var(--gold);
  background: #322619;
}
.designs img {
  width: 100%;
  display: block;
}
.letter,
.coupon {
  border: 1px solid var(--edge);
  outline: 1px solid #705735;
  outline-offset: -6px;
  padding: 23px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.letter img,
.preview {
  max-width: 100%;
  border-radius: 4px;
}
.letter p {
  line-height: 1.7;
}
.coupon {
  background: linear-gradient(110deg, #30251d 62%, #171e2d);
}
nav {
  display: flex;
  justify-content: space-around;
  padding: 6px 0 max(6px, env(safe-area-inset-bottom));
  border-top: 1px solid #56432c;
  background: var(--ink);
}
nav button {
  font-size: 12px;
  position: relative;
  display: grid;
  justify-items: center;
  border: 0;
  min-width: 20%;
  gap: 3px;
  color: #b5a995;
}
nav img {
  height: 22px;
}
nav .active {
  color: var(--gold);
}
.badge {
  background: #ad352e;
  color: white;
  font: 11px system-ui;
  border-radius: 1em;
  padding: 1px 5px;
}
.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}
.calendar button {
  border: 0;
  padding: 4px;
}
dialog {
  border: 1px solid var(--edge);
  border-radius: 13px;
  color: var(--cream);
  background: #271d16;
  width: min(90vw, 390px);
  max-height: 85dvh;
  box-shadow: 0 8px 40px #0008;
}
dialog::backdrop {
  background: #0009;
}
.chat {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.msgs {
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.bubble {
  max-width: 80%;
  align-self: flex-start;
  background: #30261e;
  border-radius: 12px;
  padding: 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  position: relative;
}
.mine {
  align-self: flex-end;
  background: #55412e;
}
.bubble small {
  display: block;
  font-size: 10px;
  color: #ccbda6;
}
.bubble img,
.bubble video {
  max-width: 100%;
  max-height: 260px;
}
.tools {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.composer {
  display: flex;
  gap: 5px;
  align-items: end;
}
.composer textarea {
  flex: 1;
  min-width: 0;
}
.composer button {
  padding: 6px;
}
.muted {
  color: #bcae98;
  font-size: 14px;
}
.hint {
  padding: 12px;
  text-align: center;
}
.wide {
  width: 100%;
}
.center {
  text-align: center;
}
.notice-body {
  min-height: 220px;
}
.action-menu {
  position: absolute;
  bottom: 100%;
  z-index: 2;
  display: flex;
  gap: 4px;
  white-space: nowrap;
  background: var(--panel);
  border-radius: 6px;
}
.mine .action-menu {
  right: 0;
}
.action-menu button {
  font-size: 12px;
  min-height: 32px;
}
.bubble:first-child .action-menu {
  top: 100%;
  bottom: auto;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid #f3daab;
}
.card {
  container-type: inline-size;
}
.card .card-copy {
  display: grid;
  align-content: center;
  justify-items: start;
  height: 100%;
  padding-left: 5%;
  gap: 2.6cqw;
}
.card b,
.card small {
  position: static;
  font-weight: 400;
}
.card b {
  font: 4.6cqw system-ui;
  white-space: pre-line;
}
.card.dark b {
  font:
    6.5cqw Baskerville,
    serif;
}
.card.dark {
  color: #ebc485;
}
.card span {
  letter-spacing: 0.28em;
  font-size: 2.9cqw;
}
.card small {
  font-size: 4.3cqw;
  letter-spacing: 0.09em;
}
nav.home-bar {
  position: relative;
  margin-top: min(30vw, 14dvh);
  background:
    linear-gradient(#160f0acb, #160f0acb),
    url("assets/bar.jpg") center bottom/cover;
}
nav.home-bar:before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 0;
  width: 100%;
  height: min(30vw, 14dvh);
  background: url("assets/bar.jpg") center 55% / cover;
}
nav .badge {
  position: absolute;
  top: 0;
  left: 56%;
}
dialog.settings {
  position: fixed;
  inset: max(57px, 7dvh) max(10px, calc((100vw - 535px) / 2 + 36px)) auto auto;
  margin: 0;
  width: 205px;
  padding: 7px;
  border-radius: 11px;
}
dialog.settings .stack {
  gap: 0;
}
dialog.settings button,
dialog.settings a {
  text-align: left;
  border: 0;
  border-bottom: 1px solid #604c31;
  border-radius: 0;
  padding: 11px;
  font-size: 15px;
}
dialog.settings a {
  text-decoration: none;
}
