[data-theme="light"] {
  --theme-bg: #ffffff;
  --theme-text: #1d1d1f;
  --theme-textSecondary: #86868b;
  --theme-link: #0071e3;
  --theme-linkHover: #0077ed;
  --theme-border: #d2d2d7;
  --theme-borderLight: #e8e8ed;
  --theme-codeBg: #f5f5f7;
  --theme-inputBg: #ffffff;
  --theme-buttonBg: #1d1d1f;
  --theme-buttonText: #ffffff;
  --theme-buttonHover: #000000;
  --theme-focusRing: rgba(0, 113, 227, 0.1);
  --theme-focusBorder: #0071e3;
}

[data-theme="dark"] {
  --theme-bg: #1d1d1f;
  --theme-text: #f5f5f7;
  --theme-textSecondary: #98989d;
  --theme-link: #2997ff;
  --theme-linkHover: #40a9ff;
  --theme-border: #48484a;
  --theme-borderLight: #38383a;
  --theme-codeBg: #2c2c2e;
  --theme-inputBg: #2c2c2e;
  --theme-buttonBg: #555;
  --theme-buttonText: #ffffff;
  --theme-buttonHover: #777;
  --theme-focusRing: rgba(41, 151, 255, 0.2);
  --theme-focusBorder: #2997ff;
}



.Page { 
  background: var(--theme-bg);
  color: var(--theme-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  margin: 0px;
  min-height: 100vh;
  padding: 0px;
}

.Container { 
  margin: 0 auto;
  max-width: 750px;
  padding: 40px 24px;
}

.CenteredContainer { 
  align-items: center;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.CenteredContainer_media (max-width: 768px) { 
  align-items: stretch;
  justify-content: flex-start;
}

.ContentBox { 
  max-width: 750px;
  width: 100%;
}

.Title { 
  color: var(--theme-text);
  font-size: 48px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 8px 0;
}

.DraftTitle { 
  color: var(--theme-text);
  font-family: "Imperial Script", cursive;
  font-size: 72px;
  font-weight: 400;
  margin: 0 0 24px 0;
  text-align: center;
}

.Form { 
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.Textarea { 
  background: var(--theme-inputBg);
  border: 1px solid var(--theme-border);
  border-radius: 12px;
  box-sizing: border-box;
  color: var(--theme-text);
  font-family: inherit;
  font-size: 16px;
  height: 70vh;
  line-height: 1.6;
  max-height: calc(100vh - 250px);
  padding: 20px;
  resize: vertical;
  width: 100%;
}

.Textarea:focus { 
  outline: none;
}

.Textarea::placeholder { 
  color: var(--theme-textSecondary);
}

.Button { 
  align-items: center;
  align-self: flex-start;
  background: var(--theme-buttonBg);
  border: none;
  border-radius: 12px;
  color: var(--theme-buttonText);
  cursor: pointer;
  display: inline-flex;
  font-size: 17px;
  font-weight: 500;
  justify-content: center;
  padding: 14px 28px;
  transition: all 0.2s ease;
}

.Button:hover { 
  background: var(--theme-buttonHover);
}

.Button:active { 
  transform: scale(0.98);
}

.Content { 
  color: var(--theme-text);
  font-size: 17px;
  line-height: 1.8;
}

.Content h1 { 
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  margin-top: 0px;
}

.Content h2 { 
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  margin-top: 32px;
}

.Content h3 { 
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
  margin-top: 24px;
}

.Content p { 
  margin: 0 0 16px 0;
}

.Content a { 
  color: var(--theme-link);
  text-decoration: none;
}

.Content a:hover { 
  text-decoration: underline;
}

.Content code { 
  background: var(--theme-codeBg);
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  padding: 2px 6px;
}

.Content pre { 
  background: var(--theme-codeBg);
  border-radius: 8px;
  margin-bottom: 16px;
  overflow: auto;
  padding: 20px;
}

.Content pre code { 
  background: none;
  padding: 0px;
}

.Content blockquote { 
  border-left: 3px solid var(--theme-border);
  color: var(--theme-textSecondary);
  margin: 0 0 16px 0;
  padding-left: 20px;
}

.Content ul { 
  margin-bottom: 16px;
  padding-left: 24px;
}

.Content ol { 
  margin-bottom: 16px;
  padding-left: 24px;
}

.Content li { 
  margin-bottom: 8px;
}

.Content img { 
  border-radius: 8px;
  height: auto;
  max-width: 100%;
}

.Content hr { 
  border: none;
  border-top: 1px solid var(--theme-borderLight);
  margin: 32px 0;
}

.Content table { 
  border-collapse: collapse;
  margin-bottom: 16px;
  width: 100%;
}

.Content th { 
  border-bottom: 2px solid var(--theme-borderLight);
  font-weight: 600;
  padding: 12px 16px;
  text-align: left;
}

.Content td { 
  border-bottom: 1px solid var(--theme-borderLight);
  padding: 12px 16px;
}

.Content tr:last-child td { 
  border-bottom: none;
}

.BackLink { 
  color: var(--theme-textSecondary);
  display: block;
  font-size: 15px;
  margin-bottom: 16px;
  text-decoration: none;
}

.BackLink:hover { 
  text-decoration: underline;
}

.NavLink { 
  color: var(--theme-textSecondary);
  font-size: 15px;
  margin-bottom: 16px;
  text-decoration: none;
}

.NavLink:hover { 
  text-decoration: underline;
}

.ErrorMessage { 
  padding: 60px 20px;
  text-align: center;
}

.ErrorTitle { 
  color: var(--theme-text);
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 8px;
}

.ErrorText { 
  color: var(--theme-textSecondary);
  font-size: 17px;
  margin-bottom: 24px;
}

.DeleteButton { 
  align-items: center;
  align-self: flex-start;
  background: #ff3b30;
  border: none;
  border-radius: 12px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-size: 17px;
  font-weight: 500;
  justify-content: center;
  padding: 14px 28px;
  transition: all 0.2s ease;
}

.DeleteButton:hover { 
  background: #d70015;
}

.DeleteButton:active { 
  transform: scale(0.98);
}

.ButtonGroup { 
  align-items: center;
  display: flex;
  gap: 12px;
}

.ButtonLink { 
  align-items: center;
  background: var(--theme-buttonBg);
  border: none;
  border-radius: 12px;
  color: var(--theme-buttonText);
  cursor: pointer;
  display: inline-flex;
  font-size: 17px;
  font-weight: 500;
  justify-content: center;
  padding: 14px 28px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.ButtonLink:hover { 
  background: var(--theme-buttonHover);
}

.ButtonLink:active { 
  transform: scale(0.98);
}

.PasswordInput { 
  background: var(--theme-inputBg);
  border: 1px solid var(--theme-border);
  border-radius: 12px;
  box-sizing: border-box;
  color: var(--theme-text);
  font-family: inherit;
  font-size: 17px;
  max-width: 320px;
  padding: 16px 20px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}

.PasswordInput:focus { 
  border-color: var(--theme-focusBorder);
  box-shadow: 0 0 0 4px var(--theme-focusRing);
  outline: none;
}

.PasswordInput::placeholder { 
  color: var(--theme-textSecondary);
}

.Subtitle { 
  color: var(--theme-textSecondary);
  font-size: 17px;
  margin-bottom: 24px;
  margin-top: 0px;
}

.FormError { 
  color: #ff3b30;
  font-size: 15px;
  margin: 0 0 16px 0;
}

.StatsGrid { 
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-bottom: 32px;
}

.StatCard { 
  background: var(--theme-codeBg);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.StatValue { 
  color: var(--theme-text);
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 4px;
}

.StatLabel { 
  color: var(--theme-textSecondary);
  font-size: 14px;
}

.DraftList { 
  list-style: none;
  margin: 0px;
  padding: 0px;
}

.DraftItem { 
  align-items: flex-start;
  border-bottom: 1px solid var(--theme-borderLight);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 16px 0;
}

.DraftItem:last-child { 
  border-bottom: none;
}

.DraftInfo { 
  flex: 1;
  min-width: 0px;
}

.DraftId { 
  color: var(--theme-link);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px;
  text-decoration: none;
}

.DraftId:hover { 
  text-decoration: underline;
}

.DraftPreview { 
  color: var(--theme-textSecondary);
  font-size: 14px;
  margin: 4px 0 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.DraftMeta { 
  color: var(--theme-textSecondary);
  font-size: 12px;
  margin-top: 4px;
}

.SmallDeleteButton { 
  align-items: center;
  background: #ff3b30;
  border: none;
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 500;
  justify-content: center;
  padding: 8px 16px;
  transition: all 0.2s ease;
}

.SmallDeleteButton:hover { 
  background: #d70015;
}

.SmallDeleteButton:active { 
  transform: scale(0.98);
}

.SectionTitle { 
  color: var(--theme-text);
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 16px 0;
}

.EmptyState { 
  color: var(--theme-textSecondary);
  font-size: 17px;
  padding: 40px 0;
  text-align: center;
}
