:root {
  --color-base: #fff;
  --color-page: #f5f6f8;
  --color-text: #233044;
  --color-muted: #566579;
  --color-primary: #0a72e0;
  --color-accent: #00a7e5;
  --color-link: #0a5fc2;
  --color-annotation-blue: #2a3fa0;
  --color-surface: #eaf3ff;
  --color-line: #dbe8f9;
  --color-border: #7f8fa6;
  --color-sun: #ffd75a;
  --color-sun-soft: #fff6d8;
  --color-sun-text: #6b4e00;
  --color-red: #b3261e;
  --color-green: #1e7a4c;
  --color-purple: #7541a6;
  --color-yellow: #b58b00;
  --section-gap: 2rem;
  --page-padding: 1.5rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body,
h1,
h2,
h3,
p,
ul,
dl,
dd,
fieldset {
  margin: 0;
}

body {
  background: var(--color-page);
  color: var(--color-text);
  font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Yu Gothic UI', Meiryo, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

body[data-modal='true'] {
  overflow: hidden;
}

h1 {
  font-size: 1.5rem;
  line-height: 1.5;
}

h2 {
  font-size: 1.125rem;
}

h3 {
  font-size: 1rem;
}

a {
  color: var(--color-link);
  text-underline-offset: 0.2em;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button,
summary {
  cursor: pointer;
}

summary {
  min-height: 44px;
  padding-block: 0.625rem;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

fieldset {
  min-width: 0;
  padding: 0;
  border: 0;
}

ul {
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--color-link);
  outline-offset: 3px;
}

.l-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
  padding: 0.75rem var(--page-padding);
  border-bottom: 1px solid var(--color-line);
  background: var(--color-base);
}

.l-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 44px;
  color: var(--color-text);
  font-size: 1.375rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.l-header__dot {
  align-self: flex-end;
  flex: none;
  width: 7px;
  height: 7px;
  margin: 0 0 0.75rem -0.25rem;
  border-radius: 50%;
  background: var(--color-sun);
}

.l-inner {
  width: 100%;
  max-width: 1000px;
  margin-inline: auto;
  padding-inline: var(--page-padding);
}

.l-app {
  --sidebar-width: 232px;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--color-page);
}

.l-app__bar {
  display: none;
}

.l-app__sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  border-right: 1px solid var(--color-line);
  background: var(--color-base);
}

.l-app-panel {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  min-height: 100%;
  padding: 2rem 1.25rem 1.5rem;
}

.l-app-panel__group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.l-app-panel__label {
  padding-inline: 0.25rem;
  color: var(--color-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.l-app-panel__nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.l-app-panel__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 46px;
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--color-muted);
  font-size: 0.875rem;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
}

.l-app-panel__item svg {
  flex: none;
}

.l-app-panel__item:hover {
  background: var(--color-page);
  color: var(--color-text);
}

.l-app-panel__item[aria-current='page'] {
  background: var(--color-surface);
  color: var(--color-link);
}

.l-app-panel__text {
  flex: 1;
  min-width: 0;
}

.l-app-panel__dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-primary);
}

.l-app-panel__count {
  flex: none;
  min-width: 1ch;
  font-weight: 600;
}

.l-app-panel__foot {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: auto;
}

.l-app-panel__tagline {
  padding: 1.25rem 1rem;
  border-radius: 16px;
  background: var(--color-surface);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.9;
}

.p-plan {
  gap: 0.5rem;
}

.p-plan__name {
  font-size: 0.875rem;
  font-weight: 700;
}

.p-plan__used {
  color: var(--color-muted);
  font-size: 0.875rem;
}

.c-meter {
  display: block;
  width: 100%;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: var(--color-line);
  appearance: none;
  overflow: hidden;
}

.c-meter::-webkit-progress-bar {
  background: var(--color-line);
}

.c-meter::-webkit-progress-value {
  border-radius: 999px;
  background: var(--color-primary);
}

.c-meter::-moz-progress-bar {
  border-radius: 999px;
  background: var(--color-primary);
}

.l-app__main {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  padding: 2.5rem 2.75rem 2rem;
}

.l-app__main.l-stack {
  gap: 2rem;
}

.l-app-menu {
  --menu-width: 280px;
  inset: 0 auto 0 0;
  width: var(--menu-width);
  max-width: calc(100% - 32px);
  height: 100vh;
  height: 100dvh;
  max-height: 100%;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  border: 0;
  background: var(--color-base);
  color: var(--color-text);
}

.l-app-menu::backdrop {
  background: var(--color-text);
  opacity: 0.35;
}

.l-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.l-cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.l-cluster--between {
  justify-content: space-between;
}

.c-small {
  color: var(--color-muted);
  font-size: 0.875rem;
  font-weight: 400;
}

.c-label {
  font-weight: 400;
}

.c-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.625rem 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-base);
  color: var(--color-text);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
}

.c-button[data-primary='true'] {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: var(--color-base);
  font-size: 1rem;
  font-weight: 700;
}

.c-button:hover {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.c-button[aria-pressed='true'] {
  border-color: var(--color-link);
  background: var(--color-surface);
}

.c-button:disabled {
  border-color: var(--color-border);
  background: var(--color-page);
  color: var(--color-text);
  cursor: not-allowed;
}

.c-text-button {
  min-height: 44px;
  padding: 0.5rem;
  border: 0;
  background: transparent;
  color: var(--color-link);
  font-size: 0.875rem;
  text-decoration: underline;
}

.c-icon-button {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: var(--color-base);
}

.c-icon-button:hover {
  background: var(--color-surface);
}

.c-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.c-field > label {
  font-weight: 600;
}

.c-input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-base);
  font-size: 1rem;
}

textarea.c-input {
  resize: vertical;
}

.c-input[readonly] {
  background: var(--color-page);
}

.c-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 1.5rem;
}

.c-choice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
}

.c-choice input {
  width: 20px;
  height: 20px;
  accent-color: var(--color-accent);
}

.c-message {
  color: var(--color-red);
}

.c-message[data-state='done'] {
  color: var(--color-green);
}

.c-message[data-state='info'] {
  color: var(--color-text);
}

.c-tabs {
  display: inline-flex;
  align-self: flex-start;
  gap: 0.25rem;
  padding: 4px;
  border-radius: 12px;
  background: var(--color-line);
}

.c-tabs__tab {
  min-height: 40px;
  padding: 0.375rem 1.125rem;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--color-muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.c-tabs__tab:hover {
  color: var(--color-text);
}

.c-tabs__tab[aria-selected='true'] {
  background: var(--color-base);
  color: var(--color-link);
  font-weight: 700;
}

.c-segment {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.c-segment__label {
  font-size: 0.875rem;
  font-weight: 600;
}

.c-segment__group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.125rem;
  padding: 3px;
  border-radius: 10px;
  background: var(--color-line);
}

.c-segment__item {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 38px;
  padding-inline: 0.875rem;
  border-radius: 8px;
  color: var(--color-muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

.c-segment__item input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.c-segment__item:has(input:checked) {
  background: var(--color-base);
  color: var(--color-link);
  font-weight: 700;
}

.c-segment__item:has(input:focus-visible) {
  outline: 2px solid var(--color-link);
  outline-offset: 2px;
}

.c-avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 0.9375rem;
  font-weight: 800;
}

.c-avatar[data-tone='cool'] {
  background: var(--color-surface);
  color: var(--color-link);
}

.c-avatar[data-tone='warm'] {
  background: var(--color-sun-soft);
  color: var(--color-sun-text);
}

.c-badge {
  display: inline-block;
  justify-self: start;
  padding: 0.25rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
}

.c-badge[data-tone='open'] {
  background: var(--color-sun-soft);
  color: var(--color-sun-text);
}

.c-count {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  margin-left: 0.625rem;
  padding-inline: 0.375rem;
  border-radius: 999px;
  background: var(--color-line);
  color: var(--color-muted);
  font-size: 0.8125rem;
  font-weight: 700;
}

.p-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
}

.p-page-head__eyebrow {
  color: var(--color-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.p-page-head__title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.4;
}

.p-page-head__dot {
  flex: none;
  width: 10px;
  height: 10px;
  margin-top: 0.75rem;
  border-radius: 50%;
  background: var(--color-sun);
}

.p-page-foot {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-muted);
  font-size: 0.875rem;
}

.p-page-foot__dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
}

.p-stats {
  display: flex;
  gap: 1.5rem;
}

.p-stats__item + .p-stats__item {
  padding-left: 1.5rem;
  border-left: 1px solid var(--color-line);
}

.p-stats dt {
  color: var(--color-muted);
  font-size: 0.75rem;
}

.p-stats__number {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.4;
}

.p-stats__unit {
  margin-left: 0.25rem;
  color: var(--color-muted);
  font-size: 0.75rem;
}

.p-home-create {
  gap: 1.5rem;
  padding: 1.75rem;
  border: 1px solid var(--color-line);
  border-radius: 20px;
  background: var(--color-surface);
}

.p-home-create__head {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.p-home-create__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px 14px 14px 4px;
  background: var(--color-sun);
  color: var(--color-text);
}

.p-home-create__text {
  flex: 1;
  min-width: 0;
}

.p-home-create__text h2 {
  font-size: 1.375rem;
  font-weight: 800;
  line-height: 1.5;
}

.p-home-create__note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-line);
  color: var(--color-muted);
  font-size: 0.875rem;
}

.p-home-create__note svg {
  color: var(--color-green);
}

.p-home-create__sep {
  width: 1px;
  height: 14px;
  margin-inline: 0.5rem;
  background: var(--color-border);
}

.p-capture-box {
  gap: 1.25rem;
}

.p-extension-entry {
  padding: 1.25rem;
  border: 1px solid var(--color-line);
  border-radius: 16px;
  background: var(--color-base);
}

.p-extension-entry h3 {
  font-size: 1rem;
}

.p-extension-steps {
  display: grid;
  gap: 0.75rem;
  padding: 0;
  list-style: none;
}

.p-extension-steps__item {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  padding: 0.875rem;
  border: 1px solid var(--color-line);
  border-radius: 12px;
  background: var(--color-surface);
}

.p-extension-steps__item[data-state='current'] {
  border-color: var(--color-primary);
  background: var(--color-soft);
}

.p-extension-steps__item[data-state='done'] {
  border-color: var(--color-green);
}

.p-extension-steps__number {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--color-base);
  color: var(--color-text);
  font-weight: 800;
}

.p-extension-steps__body {
  display: grid;
  gap: 0.25rem;
}

.p-extension-steps__body span {
  color: var(--color-muted);
  font-size: 0.875rem;
}

.p-settings-grid {
  display: grid;
  gap: 1rem;
}

.p-settings-delete:not(:disabled) {
  border-color: var(--color-red);
  color: var(--color-red);
}

.p-settings-panel {
  padding: 1.5rem;
  border: 1px solid var(--color-line);
  border-radius: 16px;
  background: var(--color-surface);
}

.p-settings-plan {
  display: grid;
  gap: 0.75rem;
}

.p-settings-plan div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.p-settings-plan dt {
  color: var(--color-muted);
}

.p-settings-plan dd {
  margin: 0;
  font-weight: 700;
}

.p-token-list {
  display: grid;
  gap: 0.75rem;
  padding: 0;
  list-style: none;
}

.p-token-list__item,
.p-token-list__empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--color-line);
  border-radius: 12px;
  background: var(--color-base);
}

.p-token-list__item > div {
  display: grid;
  gap: 0.25rem;
}

.p-connect {
  min-height: 100vh;
  padding: var(--section-gap) var(--page-padding);
  background: var(--color-surface);
}

.p-connect__panel {
  width: min(100%, 560px);
  margin: auto;
  padding: 2rem;
  border: 1px solid var(--color-line);
  border-radius: 18px;
  background: var(--color-base);
}

.p-drop {
  display: block;
  padding: 1.75rem 1rem;
  border: 2px dashed var(--color-border);
  border-radius: 16px;
  background: var(--color-base);
  text-align: center;
  cursor: pointer;
}

.p-drop:hover,
.p-drop[data-dragging='true'] {
  border-color: var(--color-primary);
  background: var(--color-surface);
}

.p-drop:focus-within {
  outline: 2px solid var(--color-link);
  outline-offset: 3px;
}

.p-drop__empty,
.p-drop__filled {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.p-drop__empty svg {
  color: var(--color-link);
}

.p-drop__preview {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--color-line);
  border-radius: 8px;
  background: var(--color-base);
}

.p-drop__meta {
  color: var(--color-muted);
  font-size: 0.875rem;
}

.p-drop__change {
  color: var(--color-link);
  font-size: 0.875rem;
  text-decoration: underline;
}

.p-section-title {
  display: flex;
  align-items: center;
  font-size: 1.25rem;
  font-weight: 800;
}

.p-more {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 44px;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
}

.p-more:hover {
  text-decoration: underline;
}

.p-request-table {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.p-request-table__head,
.p-request-list__row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 8rem 6rem 1.5rem;
  align-items: center;
  gap: 1rem;
  padding-inline: 1.25rem;
}

.p-request-table__head {
  color: var(--color-muted);
  font-size: 0.75rem;
}

.p-request-table__head span:nth-child(1) {
  grid-column: 2;
}

.p-request-table__head span:nth-child(2) {
  grid-column: 3;
}

.p-request-table__head span:nth-child(3) {
  grid-column: 4;
}

.p-request-list {
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: 16px;
  background: var(--color-base);
}

.p-request-list > li + li {
  border-top: 1px solid var(--color-line);
}

.p-request-list__row {
  min-height: 76px;
  padding-block: 0.875rem;
  color: var(--color-text);
  text-decoration: none;
}

.p-request-list__row:hover {
  background: var(--color-surface);
}

.p-request-list__main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.p-request-list__name {
  font-size: 0.9375rem;
  font-weight: 700;
}

.p-request-list__sub,
.p-request-list__none,
.p-request-list__expires {
  color: var(--color-muted);
  font-size: 0.875rem;
}

.p-request-list__expires {
  color: var(--color-text);
}

.p-request-list__go {
  display: grid;
  place-items: center;
  color: var(--color-muted);
}

.p-request-list__thumb {
  width: 64px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--color-surface);
}


.c-button--wide {
  width: 100%;
  min-height: 56px;
  border-radius: 12px;
  font-size: 0.9375rem;
}

.c-button--large {
  width: 100%;
  min-height: 52px;
  border-radius: 12px;
}

.c-input--large {
  min-height: 52px;
  border-radius: 12px;
}

.p-empty {
  max-width: 520px;
  gap: 1.5rem;
  margin: 3rem auto;
  padding: 2.5rem 2rem;
  border: 1px solid var(--color-line);
  border-radius: 20px;
  background: var(--color-base);
}

.p-login {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--color-base);
}

.p-login__hero {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  min-width: 0;
  padding: 2.625rem 3.5rem 2.5rem;
  background: var(--color-surface);
}

.p-login__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.p-login__lead {
  gap: 1.25rem;
  margin-top: 2rem;
}

.p-login__eyebrow {
  color: var(--color-link);
  font-size: 0.8125rem;
  font-weight: 700;
}

.p-login__title {
  font-size: clamp(2rem, 3.75vw, 3rem);
  font-weight: 800;
  line-height: 1.3;
}

.p-login__copy {
  color: var(--color-muted);
  font-size: 0.9375rem;
  line-height: 1.9;
}

.p-mock {
  position: relative;
  width: 100%;
  max-width: 609px;
  padding-bottom: 2.5rem;
}

.p-mock__window {
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: 12px;
  background: var(--color-base);
  box-shadow: 0 12px 28px var(--color-line);
}

.p-mock__bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 36px;
  padding-inline: 1rem;
  border-bottom: 1px solid var(--color-line);
  color: var(--color-muted);
  font-size: 0.75rem;
}

.p-mock__dots {
  display: inline-flex;
  gap: 6px;
}

.p-mock__dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-line);
}

.p-mock__url {
  flex: 1;
}

.p-mock__page {
  padding: 1rem 1.5rem 1.5rem;
}

.p-mock__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--color-muted);
  font-size: 0.75rem;
}

.p-mock__nav strong {
  color: var(--color-text);
  font-size: 1.0625rem;
}

.p-mock__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.p-mock__lead {
  color: var(--color-muted);
  font-size: 0.8125rem;
}

.p-mock__frame {
  position: relative;
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--color-primary);
  border-radius: 6px;
  background: var(--color-surface);
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.6;
}

.p-mock__pin {
  position: absolute;
  top: -16px;
  right: -16px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 17px 17px 17px 4px;
  background: var(--color-primary);
  color: var(--color-base);
  font-size: 0.875rem;
  font-weight: 700;
}

.p-mock__more {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.125rem 0.75rem;
  border-radius: 4px;
  background: var(--color-line);
  color: var(--color-muted);
  font-size: 0.75rem;
}

.p-mock__art {
  position: relative;
  min-height: 136px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--color-line);
}

.p-mock__window-shape {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 67px;
  height: 85px;
  border-radius: 34px 34px 0 0;
  background: var(--color-base);
}

.p-mock__plant {
  position: absolute;
  top: 56px;
  left: 20px;
  width: 4px;
  height: 40px;
  border-radius: 2px;
  background: var(--color-border);
}

.p-mock__plant::before {
  position: absolute;
  top: -12px;
  left: 2px;
  width: 25px;
  height: 13px;
  border-radius: 13px 13px 13px 0;
  background: var(--color-border);
  content: '';
}

.p-mock__note {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(266px, 72%);
  padding: 1rem 1.125rem;
  border: 1px solid var(--color-sun);
  border-radius: 12px;
  background: var(--color-sun-soft);
  box-shadow: 0 10px 24px var(--color-line);
  font-size: 0.8125rem;
  line-height: 1.7;
}

.p-mock__who {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.p-mock__who .c-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--color-sun);
  color: var(--color-sun-text);
  font-size: 0.8125rem;
}

.p-mock__who span:last-child {
  margin-left: auto;
  color: var(--color-muted);
  font-size: 0.75rem;
}

.p-mock__state {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  color: var(--color-sun-text);
  font-weight: 700;
}

.p-mock__state-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-sun-text);
}

.p-login__panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-width: 0;
  padding: clamp(2rem, 13vh, 7.5rem) 2rem 2rem;
}

.p-login__form {
  width: 100%;
  max-width: 362px;
  gap: 1.25rem;
}

.p-login__label {
  color: var(--color-link);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.p-login__heading {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.4;
}

.p-login__google {
  color: var(--color-primary);
  font-size: 1.125rem;
  font-weight: 800;
}

.p-login__divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-muted);
  font-size: 0.8125rem;
}

.p-login__divider::before,
.p-login__divider::after {
  flex: 1;
  height: 1px;
  background: var(--color-line);
  content: '';
}

.p-login__notice {
  position: relative;
  padding: 1rem 1rem 1rem 2.25rem;
  border-radius: 12px;
  background: var(--color-page);
  color: var(--color-muted);
  font-size: 0.8125rem;
  line-height: 1.8;
}

.p-login__notice-dot {
  position: absolute;
  top: 1.45rem;
  left: 1rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-sun);
}

.p-login__links {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.p-login__local {
  text-align: center;
}

.p-login__local summary {
  color: var(--color-muted);
  font-size: 0.8125rem;
}

.p-unlock {
  display: grid;
  min-height: 100vh;
  place-content: center;
  padding: 2rem 1rem;
}

.p-auth-card {
  width: min(100%, 26.25rem);
  padding: 1.75rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  box-shadow: 0 10px 24px var(--color-line);
}

.p-account {
  position: relative;
  font-size: 0.875rem;
}

.p-account[open] .c-button {
  position: absolute;
  z-index: 20;
  right: 0;
  min-width: 180px;
}

.p-workspace__head {
  position: sticky;
  z-index: 5;
  top: 0;
  padding: 1rem var(--page-padding);
  border-bottom: 1px solid var(--color-line);
  background: var(--color-base);
}

.p-workspace__title {
  flex: 1;
  min-width: 200px;
}

.p-workspace__title h1 {
  font-size: 1.125rem;
}

.p-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.p-tab {
  max-width: 220px;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--color-base);
  overflow-wrap: anywhere;
  font-size: 0.875rem;
}

.p-tab[aria-selected='true'] {
  border-color: var(--color-link);
  background: var(--color-surface);
  color: var(--color-link);
  font-weight: 700;
}

.p-workspace__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
}

.p-canvas {
  min-width: 0;
  background: var(--color-surface);
}

.p-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--color-line);
  background: var(--color-base);
}

.p-toolbar__hint {
  margin-left: auto;
}

.c-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

[data-color='red'] {
  --annotation-color: var(--color-red);
}

[data-color='blue'] {
  --annotation-color: var(--color-annotation-blue);
}

[data-color='green'] {
  --annotation-color: var(--color-green);
}

[data-color='purple'] {
  --annotation-color: var(--color-purple);
}

[data-color='yellow'] {
  --annotation-color: var(--color-yellow);
}

[data-color='black'] {
  --annotation-color: var(--color-text);
}

.c-swatch {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--color-base);
  color: var(--color-text);
  font-size: 0.875rem;
}

.c-swatch::before {
  position: absolute;
  inset: 4px;
  border: 4px solid var(--annotation-color);
  border-radius: 50%;
  content: '';
}

.c-swatch[aria-pressed='true'] {
  border-color: var(--color-accent);
  font-weight: 800;
}

.p-canvas__body {
  padding: 1.5rem;
}

.c-stage {
  position: relative;
  width: 100%;
  border: 1px solid var(--color-line);
  background: var(--color-base);
  user-select: none;
  touch-action: none;
}

.c-stage[data-writable='true'] {
  cursor: crosshair;
}

.c-stage__image {
  width: 100%;
}

.c-stage__layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.c-annotation {
  position: absolute;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 2px solid var(--annotation-color);
  background: transparent;
  color: var(--color-base);
  box-shadow: 0 0 0 1px var(--color-base), inset 0 0 0 1px var(--color-base);
  pointer-events: auto;
  cursor: pointer;
}

.c-annotation::before {
  position: absolute;
  inset: 0;
  background: var(--annotation-color);
  opacity: 0.12;
  content: '';
  pointer-events: none;
}

.c-annotation[data-kind='pin'] {
  width: 44px;
  height: 44px;
  border: 2px solid var(--color-base);
  border-radius: 50% 50% 50% 0;
  background: var(--annotation-color);
  transform: translate(-25%, -75%);
}

.c-annotation[data-color='yellow'] {
  color: var(--color-text);
}

.c-annotation__number {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding-inline: 0.25rem;
  background: var(--annotation-color);
  font-size: 0.875rem;
  font-weight: 700;
}

.c-annotation[data-kind='pin'] .c-annotation__number {
  inset: 0;
  height: auto;
  border-radius: inherit;
}

.c-annotation[data-selected='true'] {
  outline: 2px dashed var(--color-accent);
  outline-offset: 3px;
}

.c-annotation:focus-visible {
  outline: 2px solid var(--color-link);
}

.c-annotation[data-draft] {
  pointer-events: none;
}

.c-handle {
  position: absolute;
  z-index: 2;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  touch-action: none;
  cursor: nwse-resize;
}

.c-handle::before {
  position: absolute;
  inset: 16px;
  border: 2px solid var(--color-link);
  background: var(--color-base);
  content: '';
}

.c-handle[data-handle='ne'],
.c-handle[data-handle='sw'] {
  cursor: nesw-resize;
}

.p-comments {
  --comments-top: 0;
  --comments-bottom: 0;
  position: sticky;
  top: var(--comments-top);
  min-width: 0;
  max-height: calc(100vh - var(--comments-top) - var(--comments-bottom));
  max-height: calc(100dvh - var(--comments-top) - var(--comments-bottom));
  padding: 1.5rem;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scroll-padding-block: 1rem;
  background: var(--color-base);
}

.p-comments__head {
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.p-comment-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  color: var(--color-muted);
  font-size: 0.875rem;
}

.c-filter-button {
  min-height: 36px;
  padding: 0.25rem 0.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: inherit;
}

.c-filter-button[aria-pressed='true'] {
  border-color: var(--color-link);
  background: var(--color-surface);
  color: var(--color-link);
  font-weight: 700;
}

.p-comment-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.c-comment {
  min-width: 0;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-line);
}

.c-comment[data-selected='true'] {
  background: var(--color-surface);
}

.c-comment__page {
  margin: 0 0 0.5rem;
  color: var(--color-muted);
  font-size: 0.875rem;
}

.c-comment__select {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 0.25rem;
  border: 0;
  background: transparent;
  text-align: left;
}

.c-comment__summary {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: start;
  gap: 0.5rem;
}

.c-comment__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.c-comment__number {
  display: grid;
  flex: none;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 2px solid var(--annotation-color);
  border-radius: 50%;
  font-size: 0.875rem;
  font-weight: 700;
}

.c-comment__mark {
  width: 14px;
  height: 14px;
  margin-top: 0.45rem;
  border: 3px solid var(--annotation-color);
  border-radius: 50%;
}

.c-comment__body {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.c-status {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.c-status::before {
  display: inline-block;
  flex: none;
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 50%;
  content: '';
}

.c-status[data-status='open'] {
  color: var(--color-red);
}

.c-status[data-status='done'] {
  color: var(--color-link);
}

.c-status[data-status='done']::before {
  border-radius: 0;
  background: currentColor;
}

.c-status[data-status='verified'] {
  color: var(--color-green);
}

.c-status[data-status='verified']::before {
  border-radius: 0;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.l-app__main--flush {
  max-width: none;
  margin: 0;
  padding: 0;
}

.p-danger {
  align-self: flex-start;
  padding-inline: 0;
  color: var(--color-red);
}

.c-comment__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 0.25rem 0.75rem;
}

.c-annotation[data-status='done'],
.c-annotation[data-status='verified'] {
  border-style: dashed;
}

.c-annotation[data-status='verified'] {
  opacity: 0.55;
}

.c-annotation__mark {
  margin-left: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.p-editor {
  position: fixed;
  z-index: 15;
  width: 320px;
  max-height: calc(100% - 32px);
  padding: 1rem;
  overflow: auto;
  border: 1px solid var(--color-link);
  border-radius: 16px;
  background: var(--color-base);
  box-shadow: 0 4px 0 var(--color-surface);
}

.p-editor .l-stack {
  gap: 0.75rem;
}

.p-editor .c-small {
  font-size: 0.875rem;
}

.p-workspace[data-editing='true'] [data-share-open],
.p-workspace[data-editing='true'] [data-export-open] {
  background: var(--color-base);
  color: var(--color-text);
  border-color: var(--color-line);
}

.p-toast {
  position: fixed;
  z-index: 30;
  right: 1.5rem;
  bottom: 1.5rem;
  width: min(420px, calc(100% - 3rem));
  max-height: 45%;
  padding: 1rem;
  overflow: auto;
  border: 1px solid var(--color-link);
  border-radius: 16px;
  background: var(--color-base);
  box-shadow: 0 4px 0 var(--color-surface);
}

.c-dialog {
  width: calc(100% - 32px);
  max-width: 540px;
  max-height: calc(100% - 32px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--color-line);
  border-radius: 16px;
  background: var(--color-base);
  color: var(--color-text);
}

.c-dialog::backdrop {
  background: var(--color-text);
  opacity: 0.35;
}

.c-dialog__body {
  padding: 1.5rem;
}

.c-dialog[data-dialog='export'] {
  inset: 0 0 0 auto;
  max-width: 600px;
  max-height: 100%;
  height: 100%;
  margin: 0;
  border-radius: 0;
}

.p-share-option {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-line);
}

.p-share-option__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.p-share-option__state {
  color: var(--color-muted);
  font-size: 0.875rem;
  font-weight: 700;
}

.p-share-option__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.p-share-option__link {
  min-height: 0;
  padding: 0;
  color: var(--color-link);
  font-size: 0.875rem;
}

.p-dialog-danger {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-line);
}

.p-export__preview {
  min-height: 250px;
  font-size: 0.875rem;
}

.p-cta {
  position: fixed;
  z-index: 9;
  right: 1.5rem;
  bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: min(360px, calc(100% - 3rem));
  padding: 0.75rem;
  border: 1px solid var(--color-line);
  border-radius: 16px;
  background: var(--color-base);
  box-shadow: 0 4px 0 var(--color-surface);
}

.p-cta .c-small {
  flex: 1;
}

.p-cta .c-button {
  flex: none;
}

.p-workspace[data-editing='true'] .p-cta {
  display: none;
}

.p-hint {
  position: relative;
  height: 150px;
  border: 1px solid var(--color-line);
  border-radius: 12px;
  background: var(--color-surface);
}

.p-hint__line {
  position: absolute;
  inset: 30px 25% 30px 12%;
  border-block: 16px solid var(--color-base);
}

.p-hint__box {
  position: absolute;
  top: 25px;
  left: 10%;
  width: 55%;
  height: 90px;
  border: 2px solid var(--color-red);
  transform-origin: top left;
}

.p-hint__cursor {
  position: absolute;
  top: 105px;
  left: 64%;
  color: var(--color-text);
}

.c-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
}

.p-loading {
  align-items: center;
  padding-block: 3rem;
  background: var(--color-surface);
  text-align: center;
}

@keyframes hint-draw {
  from {
    transform: scale(0.1);
  }
  to {
    transform: scale(1);
  }
}

@keyframes spinner-turn {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .p-hint__box {
    animation: hint-draw 1.8s ease-in-out infinite alternate;
  }
  .c-spinner {
    animation: spinner-turn 1s linear infinite;
  }
}

.p-mobile-only {
  display: none;
}

@media (max-width: 1000px) {
  .p-workspace__grid {
    grid-template-columns: minmax(0, 1fr) 260px;
  }
  .p-comments {
    padding: 1rem;
  }
  .p-canvas__body {
    padding: 1rem;
  }
}

@media (max-width: 767px) {
  :root {
    --page-padding: 1rem;
  }
  .l-header {
    min-height: 60px;
  }
  .l-header > .c-small {
    display: none;
  }
  .l-app {
    display: block;
  }
  .l-app__sidebar {
    display: none;
  }
  .l-app__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem var(--page-padding);
    background: var(--color-base);
  }
  .l-app__main {
    padding: var(--section-gap) var(--page-padding);
  }
  .p-page-head__title {
    font-size: 1.5rem;
  }
  .p-page-head__dot {
    margin-top: 0.5rem;
  }
  .p-home-create {
    padding: 1.25rem;
  }
  .p-home-create__text h2 {
    font-size: 1.125rem;
  }
  .p-request-table__head {
    display: none;
  }
  .p-request-list__row {
    grid-template-columns: 64px minmax(0, 1fr) auto;
    gap: 0.25rem 0.75rem;
    padding-inline: 1rem;
  }
  .p-request-list__row .c-avatar,
  .p-request-list__thumb {
    grid-row: 1 / span 2;
  }
  .p-request-list__main {
    grid-column: 2;
  }
  .p-request-list__row .c-badge,
  .p-request-list__none {
    grid-column: 3;
    grid-row: 1;
  }
  .p-request-list__expires {
    grid-column: 2;
    grid-row: 2;
  }
  .p-request-list__go {
    display: none;
  }
  .p-workspace__head {
    position: relative;
  }
  .p-workspace__grid {
    display: block;
    padding-bottom: 70px;
  }
  .p-toolbar {
    padding: 0.75rem 1rem;
  }
  .p-canvas__body {
    padding: 1rem;
  }
  .c-stage {
    touch-action: pan-y pinch-zoom;
  }
  .c-stage[data-rect-mode='true'] {
    touch-action: none;
  }
  .p-mobile-only {
    display: inline-flex;
  }
  .p-comments {
    position: static;
    max-height: none;
    padding: 1.5rem var(--page-padding) 7rem;
    overflow: visible;
  }
  .p-comments-toggle {
    position: fixed;
    z-index: 8;
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    background: var(--color-base);
  }
  .p-comments-toggle[data-in-view='true'] {
    display: none;
  }
  .p-workspace[data-role='receiver'] .p-comments-toggle,
  .p-workspace[data-role='writer'] .p-comments-toggle {
    bottom: 4.75rem;
  }
  .p-cta {
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    min-height: 3.75rem;
    padding: 0.5rem 1rem;
    border-width: 1px 0 0;
    border-radius: 0;
    box-shadow: 0 -4px 0 var(--color-surface);
  }
  .p-cta .c-small {
    font-size: 0.8125rem;
  }
  .p-editor {
    inset: auto 0 0;
    width: 100%;
    max-height: 72%;
    border-radius: 12px 12px 0 0;
  }
  .p-editor__keys {
    display: none;
  }
  .p-toast {
    right: 1rem;
    bottom: 1rem;
    width: calc(100% - 2rem);
  }
}

@media (max-width: 900px) {
  .p-login {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }
  .p-login__hero {
    gap: 1.25rem;
    padding: 1.5rem var(--page-padding) 2rem;
  }
  .p-login__lead {
    margin-top: 0.5rem;
  }
  .p-login__title {
    font-size: 1.75rem;
  }
  .p-mock {
    display: none;
  }
  .p-login__panel {
    padding: 2rem var(--page-padding);
  }
}

@media (max-width: 767px) {
  .p-empty {
    margin: 1.5rem auto;
    padding: 1.5rem 1.25rem;
  }
}

.p-legal {
  --legal-width: 52rem;
  width: min(var(--legal-width), calc(100% - 2rem));
  margin: 2rem auto;
  padding: clamp(1rem, 4vw, 2.5rem);
  border: 1px solid var(--color-line);
  border-radius: 1rem;
  background: var(--color-base);
  line-height: 1.9;
}

.p-legal__toc {
  margin-block: 2rem;
  padding: 1rem;
  border-radius: 0.5rem;
  background: var(--color-surface);
}

.p-legal__toc-title {
  margin-bottom: 0.75rem;
}

.p-legal__toc-list {
  display: grid;
  gap: 0.5rem;
}

.p-legal__toc-item[data-level='3'] {
  padding-left: 1rem;
}

.p-legal__toc-item[data-level='4'] {
  padding-left: 2rem;
}

.p-legal__body {
  margin-bottom: 2rem;
}

.p-legal__heading {
  margin-block: 2rem 1rem;
  font-size: 1.125rem;
  scroll-margin-top: 1rem;
}

.p-legal__paragraph {
  margin-block: 0.75rem;
  white-space: pre-line;
}

.p-legal__list {
  margin-block: 1rem;
  padding-left: 1.75rem;
  list-style-type: revert;
}

.p-legal__item {
  margin-block: 0.5rem;
}

.p-legal__table-wrap {
  margin-block: 1.5rem;
  overflow-x: auto;
}

.p-legal__table {
  --legal-table-min-width: 30rem;
  width: 100%;
  min-width: var(--legal-table-min-width);
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.p-legal__cell {
  padding: 0.75rem;
  border: 1px solid var(--color-line);
  text-align: left;
  vertical-align: top;
}

.p-legal__cell[scope='col'] {
  background: var(--color-surface);
}

.p-legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.5rem 1rem 5rem;
  text-align: center;
}

.u-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

[hidden] {
  display: none;
}
