@import './editorial-tokens.css';

:root {
  color-scheme: light;
  --paper: var(--hb-paper);
  --ink: var(--hb-blue);
  --rule: var(--hb-line);
  font-family: var(--hb-font);
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }

.masthead { border-bottom: 1px solid var(--rule); }
.masthead a {
  display: flex;
  align-items: center;
  gap: .45rem;
  width: fit-content;
  margin-inline: auto;
  padding: max(.9rem, env(safe-area-inset-top)) 1rem .9rem;
  font-family: Georgia, 'Noto Serif TC', serif;
  font-size: 1.125rem;
  font-weight: 700;
  text-decoration: none;
}
.masthead img { object-fit: contain; }
.masthead:has(form) { display: flex; align-items: center; justify-content: space-between; padding-inline-end: max(1rem,env(safe-area-inset-right)); }
.masthead:has(form) a { margin-inline: 0; }
.masthead form { margin: 0; }
.masthead form button { min-height: 44px; padding: 0 .9rem; white-space: nowrap; border:1px solid var(--rule); border-radius:var(--hb-control); background:var(--hb-white);color:var(--ink); }

main {
  margin-inline: auto;
  max-width: 38rem;
  padding: clamp(1.5rem, 8vw, 5rem) max(1rem, env(safe-area-inset-right)) max(2rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}

.auth-card {
  background: var(--hb-white);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--hb-yellow);
  border-radius: var(--hb-card);
  padding: clamp(1rem, 6vw, 3rem);
}

h1 {
  font-family: var(--hb-serif);
  font-size: clamp(1.65rem, 7vw, 2.75rem);
  line-height: 1.2;
  margin: 0;
  letter-spacing: .025em;
}
p { line-height: 1.65; margin-block: 1rem 0; }
form { margin-top: 1.5rem; }
.studio-trial-consent { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem .85rem; margin-block:1rem; }
.studio-trial-consent label { display:flex; align-items:center; min-height:44px; }
.studio-trial-consent label input[type="checkbox"] { width:1.15rem; min-height:1.15rem; height:1.15rem; padding:0; accent-color:var(--ink); }
.trial-legal-dialog { width:min(38rem,calc(100% - 2rem)); max-height:90dvh; overflow:auto; overscroll-behavior:contain; padding:1rem; border:1px solid var(--rule); border-radius:var(--hb-card); color:var(--ink); background:var(--hb-white); }
.trial-legal-dialog::backdrop { background:#15253b80; }
.trial-legal-dialog h2 { margin:0; }
.trial-legal-dialog h3 { margin:1rem 0 .3rem; font-size:1rem; }
.trial-legal-dialog h3 + p { margin-top:0; }
.trial-legal-dialog .legal-revision { font-size:.875rem; }
.trial-legal-dialog form { margin-top:.75rem; text-align:right; }
.studio-brand-profile { display:grid; gap:.75rem; }
.studio-brand-profile label { margin:0; }
.studio-brand-profile small { color:var(--hb-gray); }
.studio-brand-profile .primary-action { width:100%; }
.professional-trial-workspace section { margin-top:1.5rem; padding-top:1rem; border-top:1px solid var(--rule); }
.professional-trial-workspace h2 { display:flex; justify-content:space-between; align-items:center; gap:1rem; margin:0; }
.professional-trial-workspace ul { padding-left:1.2rem; }
.professional-trial-workspace li { margin-block:.65rem; overflow-wrap:anywhere; }
.professional-trial-workspace label + label { margin-top:.75rem; }
label { display: grid; gap: .375rem; font-weight: 650; }
input:not([type="hidden"]) {
  width: 100%;
  min-height: 3rem;
  padding: .65rem .75rem;
  border: 1px solid var(--rule);
  border-radius: var(--hb-control);
  font: inherit;
}

button { font: inherit; cursor: pointer; }
.primary-action, .line-login {
  min-height: 3rem;
  border: 0;
  border-radius: var(--hb-control);
  font-weight: 700;
}
.primary-action {
  margin-top: 1rem;
  padding-inline: 1rem;
  background: var(--ink);
  color: white;
}
.line-login {
  display: inline-flex;
  align-items: center;
  padding: 0;
  color: white;
  background: #06c755;
  text-decoration: none;
  white-space: nowrap;
}
.line-login:hover { background: #05b34d; }
.line-login:active { background: #048b3c; }
.line-icon { display: flex; box-shadow: inset -1px 0 rgb(0 0 0 / 8%); }
.line-login > span + span { padding: .65rem 1.25rem; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.auth-card.hb-third-level { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.hb-third-level > h1, .hb-third-level > .settings-history-heading h1 { font-family: var(--hb-font); font-weight: 750; }
.hb-third-level > :is(h1,.settings-history-heading)::after { content: ''; display: block; width: 2.1rem; height: 3px; margin-top: .7rem; background: var(--hb-yellow); border-radius: 3px; }
.hb-third-level > .settings-history-heading { position: relative; display: flex; align-items: start; justify-content: space-between; gap: .6rem; padding-bottom: .7rem; }
.hb-third-level > .settings-history-heading::after { position: absolute; bottom: 0; left: 0; }
.hb-third-level > .settings-history-heading h1::after { display: none; }
main .hb-third-level > .studio-page-identity { margin-top: .75rem; padding-top: .65rem; border-top: 1px solid var(--rule); }
.account-entry-list{display:grid;gap:.65rem;margin-block:1rem}
.account-entry-list a{display:flex;align-items:center;min-height:44px;padding:.5rem .8rem;border:1px solid currentColor;border-radius:.5rem;text-decoration:none;font-weight:700}
.account-email-form{display:grid;gap:.5rem;margin-top:1.1rem}
.account-email-form input{box-sizing:border-box;width:100%;min-height:44px;padding:.55rem .7rem;font:inherit;border:1px solid #bbb6ab;border-radius:.45rem}
.account-email-form button{min-height:44px;margin-top:.3rem}

.account-back{display:inline-flex;align-items:center;min-height:44px;padding:0 12px;margin-bottom:1rem;border:1px solid var(--rule);border-radius:8px;text-decoration:none}
