.tn-empty-state {
  display: grid;
  justify-items: start;
  gap: 8px;
  min-height: 128px;
  padding: 20px;
  border: 1px solid #dce7e2;
  border-radius: 8px;
  background: #fbfdfc;
}

.tn-empty-state strong {
  color: #173a31;
  font-size: 16px;
}

.tn-empty-state p {
  max-width: 44rem;
  margin: 0;
  color: #66766f;
  line-height: 1.5;
}

.tn-empty-state.is-compact {
  min-height: 0;
  padding: 14px;
}

.tn-unsaved-prompt {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 18px;
}

.tn-unsaved-prompt[hidden] {
  display: none;
}

.tn-unsaved-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 27, 22, 0.58);
}

.tn-unsaved-prompt article {
  position: relative;
  display: grid;
  width: min(420px, 100%);
  gap: 10px;
  padding: 20px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(10, 27, 22, 0.3);
}

.tn-unsaved-prompt article > strong {
  color: #173a31;
  font-size: 18px;
}

.tn-unsaved-prompt article > p {
  margin: 0;
  color: #66766f;
  line-height: 1.5;
}

.tn-unsaved-prompt article > div {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

body.tn-unsaved-open {
  overflow: hidden;
}

.tennisnote-update-notice {
  position: fixed;
  z-index: 120;
  right: max(14px, env(safe-area-inset-right));
  bottom: calc(84px + env(safe-area-inset-bottom));
  left: max(14px, env(safe-area-inset-left));
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 520px;
  margin-left: auto;
  padding: 12px;
  border: 1px solid #b8d9cc;
  border-radius: 8px;
  background: #ffffff;
  color: #173a31;
  box-shadow: 0 12px 30px rgba(17, 53, 43, 0.18);
}

.tennisnote-update-notice[hidden] {
  display: none;
}

.tennisnote-update-notice > div:first-child {
  min-width: 0;
}

.tennisnote-update-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.tennisnote-update-notice strong,
.tennisnote-update-notice span {
  display: block;
}

.tennisnote-update-notice span {
  margin-top: 2px;
  color: #60746c;
  font-size: 13px;
  line-height: 1.35;
}

.tennisnote-update-notice button {
  flex: 0 0 auto;
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  background: #087a5a;
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.tennisnote-update-notice .tennisnote-update-dismiss {
  width: 40px;
  padding: 0;
  border: 1px solid #cfe0da;
  background: #f3f8f6;
  color: #526b62;
  font-size: 22px;
  line-height: 1;
}

.tennisnote-release-check-notice {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: calc(86px + env(safe-area-inset-bottom));
  z-index: 120;
  display: flex;
  width: min(390px, calc(100vw - 24px));
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #f0c987;
  border-radius: 8px;
  background: #fffaf0;
  box-shadow: 0 12px 30px rgba(31, 41, 55, 0.18);
  color: #3f3523;
}

body.sheet-open .tennisnote-update-notice:not([data-update-required="true"]),
body.modal-open .tennisnote-update-notice:not([data-update-required="true"]),
body.sheet-open .tennisnote-release-check-notice,
body.modal-open .tennisnote-release-check-notice {
  display: none;
}

.tennisnote-update-notice[data-update-required="true"] {
  z-index: 220;
}

.tennisnote-release-check-notice[hidden] {
  display: none;
}

.tennisnote-release-check-notice div {
  display: grid;
  gap: 3px;
}

.tennisnote-release-check-notice span,
.tennisnote-release-check-notice small {
  color: #6b5b3f;
  font-size: 12px;
}

.tennisnote-release-check-notice button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid #d8aa56;
  border-radius: 6px;
  background: #fff;
  color: #6f4c10;
  font-weight: 800;
}

@media (max-width: 480px) {
  .tennisnote-release-check-notice {
    right: 10px;
    bottom: calc(82px + env(safe-area-inset-bottom));
    width: calc(100vw - 20px);
  }
}

.tn-comment-draft-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 8px;
}

.tn-comment-draft-tools input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #d6e2dd;
  border-radius: 6px;
  color: #173a31;
  background: #fff;
  font: inherit;
}

.tn-comment-draft-tools button {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #a9cabe;
  border-radius: 6px;
  color: #0f766e;
  background: #f0faf6;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.tn-comment-draft-tools button:disabled {
  cursor: default;
  opacity: 0.55;
}

@media (max-width: 480px) {
  .tn-empty-state {
    min-height: 112px;
    padding: 16px;
  }

  .tn-unsaved-prompt {
    align-items: end;
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
  }

  .tn-unsaved-prompt article > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .tn-unsaved-prompt article > div .primary-button {
    grid-column: 1 / -1;
    order: -1;
  }

  .tn-comment-draft-tools {
    grid-template-columns: 1fr;
  }
}
.app-toast {
  position: fixed;
  left: 50%;
  bottom: calc(84px + env(safe-area-inset-bottom));
  z-index: 10050;
  max-width: min(88vw, 420px);
  padding: 10px 14px;
  border-radius: 6px;
  background: #14372e;
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.app-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
