body {
  margin: 0;
  background: #faeee7;
  color: #33272a;
  font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;
}

a {
  color: #33272a;
}

h1,
h2,
h3 {
  color: #33272a;
}

p,
pre {
  color: #594a4e;
}

.page-content {
  padding: 24px 16px;
}

.pwa-header {
  background: #ffc6c7;
  border-bottom: 1px solid #33272a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  box-sizing: border-box;
  width: 100%;
  gap: 8px;
  flex-wrap: nowrap;
}

.pwa-header__brand {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  gap: 10px;
}

.pwa-header__logo {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pwa-header__title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.pwa-header__account {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.pwa-header__right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 0 0 auto;
  margin-left: auto;
}

.pwa-header__actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pwa-header__email {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 36vw;
}

.pwa-header__logout-form {
  margin: 0;
}

.icon-button {
  width: 34px;
  height: 34px;
  border: 1px solid #33272a;
  background: #ff8ba7;
  color: #33272a;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.icon-button .material-symbols-rounded {
  font-size: 20px;
  line-height: 1;
}

.icon-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.app-button:hover,
.icon-button:hover {
  background: #c3f0ca;
}

.icon-button:disabled:hover,
.icon-button:disabled:active {
  background: #ff8ba7;
}

.app-button:active,
.icon-button:active {
  background: #ffc6c7;
}

.app-button:focus-visible,
.icon-button:focus-visible {
  outline: 2px solid #33272a;
  outline-offset: 2px;
}

.app-button {
  border: 1px solid #33272a;
  background: #ff8ba7;
  color: #33272a;
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 8px;
}

.db-table {
  width: 100%;
  border-collapse: collapse;
  background: #fffffe;
}

.db-table th,
.db-table td {
  border: 1px solid #33272a;
  padding: 8px;
  text-align: left;
  vertical-align: top;
}

.db-table th {
  background: #ffc6c7;
}

.db-color-cell {
  text-align: center;
}

.db-color-swatch {
  width: 20px;
  height: 20px;
  border: 1px solid #33272a;
  border-radius: 4px;
  display: inline-block;
}

.db-action-button {
  padding: 4px 8px;
  font-size: 12px;
}

.db-record-status {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid #33272a;
  background: #fff3b0;
}

.db-record-status--create {
  background: #c3f0ca;
}

.db-record-status--update {
  background: #faeee7;
}

.events-panel {
  margin-top: 16px;
}

.offline-message {
  color: #33272a;
  background: #ffc6c7;
  border: 1px solid #33272a;
  border-radius: 8px;
  padding: 8px 10px;
  margin: 0 0 10px;
}

.events-tabs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.events-tab.is-active {
  background: #c3f0ca;
}

.event-form {
  max-width: 420px;
  display: grid;
  gap: 8px;
}

.event-form__mode {
  margin: 0;
}

.event-form__label {
  font-size: 13px;
}

.event-form__color-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.event-form__color-picker {
  width: 44px;
  height: 36px;
  border: 1px solid #33272a;
  border-radius: 8px;
  background: #fffffe;
  padding: 2px;
  cursor: pointer;
}

.event-form__input {
  border: 1px solid #33272a;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fffffe;
  color: #33272a;
  width: 100%;
}

.event-form__input:focus-visible {
  outline: 2px solid #33272a;
  outline-offset: 2px;
}

.event-form__message {
  margin-top: 10px;
  min-height: 1.5em;
}

.event-form__actions {
  display: flex;
  gap: 8px;
}

.event-form__delete {
  border: 1px solid #33272a;
  border-radius: 8px;
  padding: 8px;
}

.event-form__delete-text {
  margin: 0 0 8px;
}

.auth-form {
  max-width: 360px;
  display: grid;
  gap: 8px;
}

.auth-form__label {
  font-size: 13px;
}

.auth-form__input {
  border: 1px solid #33272a;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fffffe;
  color: #33272a;
}

.auth-form__input:focus-visible {
  outline: 2px solid #33272a;
  outline-offset: 2px;
}

.auth-error {
  color: #33272a;
  background: #ffc6c7;
  border: 1px solid #33272a;
  border-radius: 8px;
  padding: 8px 10px;
  max-width: 520px;
}

.is-hidden {
  display: none;
}

@media (max-width: 640px) {
  .pwa-header {
    padding: 6px 8px;
    gap: 6px;
  }

  .pwa-header__brand {
    gap: 6px;
  }

  .pwa-header__logo {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
  }

  .pwa-header__account {
    max-width: none;
    gap: 4px;
  }

  .pwa-header__email {
    display: inline-block;
    max-width: 18vw;
    font-size: 10px;
  }

  .pwa-header__title {
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .pwa-header__right,
  .pwa-header__actions {
    gap: 4px;
  }

  .icon-button {
    width: 26px;
    height: 26px;
    border-radius: 6px;
  }

  .icon-button .material-symbols-rounded {
    font-size: 16px;
  }
}
