body.trial-sign-in {
  box-sizing: border-box;
  display: grid;
  place-items: center;
  min-height: 100vh;
  margin: 0;
  padding: 24px;
  background: #f0f1eb;
  color: #26332d;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

.trial-sign-in main {
  box-sizing: border-box;
  width: min(100%, 420px);
  padding: clamp(24px, 6vw, 40px);
  border: 1px solid #daddd2;
  border-radius: 12px;
  background: #fffefa;
}

.trial-sign-in h1 { margin: 0; font-size: clamp(26px, 7vw, 34px); }
.trial-sign-in p { margin: 12px 0 0; color: #59675e; font-size: 14px; line-height: 1.6; }
.trial-sign-in form { display: grid; gap: 9px; margin-top: 25px; }
.trial-sign-in label { font-size: 14px; font-weight: 600; }

.trial-sign-in :is(input, button) {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  border-radius: 6px;
  font: inherit;
}

.trial-sign-in input { padding: 8px 12px; border: 1px solid #8c9a8f; background: #fff; color: inherit; }
.trial-sign-in button { margin-top: 6px; border: 1px solid #315b4a; background: #315b4a; color: #fff; cursor: pointer; }
.trial-sign-in button:hover { background: #244737; }
.trial-sign-in :is(input, button):focus-visible { outline: 2px solid #315b4a; outline-offset: 2px; }
.trial-sign-in #trial-login-error { margin: 0; color: #95382f; }
.trial-sign-in:has(.trial-filing) { grid-template-rows: 1fr auto; }
.trial-filing { padding-top: 16px; font-size: 12px; }
.trial-filing a { color: #59675e; }

body[data-trial-reader] { grid-template-rows: auto auto minmax(0, 1fr); }
body:not([data-trial-upload="open"]) :is(#import, #first-import) { display: none !important; }
body[data-trial-readonly] :is(#retry-generate, #upgrade-reader, #retry-match, .note-compose,
  .note-toolbar:has(button), .note-footer > button, [data-retry-question]) { display: none !important; }

.trial-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2px 10px;
  padding: 4px 12px;
  border-bottom: 1px solid var(--edge);
  background: var(--chrome);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.trial-notice[data-draining] { background: var(--accent-wash); color: var(--ink); }
.trial-summary, .trial-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.trial-actions { margin-inline-start: auto; }
.trial-quota { color: var(--ink); white-space: nowrap; }
.trial-remove { min-height: 28px; color: var(--danger); }
.trial-remove:not(:disabled):hover { background: var(--surface); }

.trial-delete-dialog {
  width: min(420px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  overflow: auto;
  padding: clamp(18px, 5vw, 24px);
  border: 1px solid var(--edge);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
}

.trial-delete-dialog::backdrop { background: #161b18a6; }
.trial-delete-dialog h2 { margin-bottom: 10px; font-size: 19px; }
.trial-delete-dialog strong { display: block; margin-bottom: 7px; overflow-wrap: anywhere; }
.trial-delete-dialog p { color: var(--muted); font-size: 13px; line-height: 1.6; }
.trial-delete-dialog #trial-delete-error { margin-top: 10px; color: var(--danger); }
.trial-delete-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.trial-delete-actions .button { min-width: 74px; min-height: 36px; }
.trial-confirm-remove { border-color: var(--danger); color: var(--danger); }
.trial-confirm-remove:not(:disabled):hover { background: var(--surface); }

@media (max-width: 700px) {
  .trial-notice { padding-inline: 8px; }
  .trial-summary { flex: 1 1 200px; }
  .trial-remove, .trial-delete-actions .button { min-height: 36px; }
}
