:root {
  font-family:
    system-ui,
    -apple-system,
    'Noto Sans JP',
    sans-serif;
  color: #182b35;
  background: #f3f5f4;
  font-size: 15px;
  line-height: 1.7;
  --green: #126451;
  --line: #d9e2de;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
[hidden] {
  display: none !important;
}
a {
  color: inherit;
}
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 18px max(24px, calc((100vw - 1320px) / 2));
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  font-weight: 750;
  line-height: 1.4;
}
.brand small {
  display: block;
  color: #65776e;
  font-size: 12px;
  font-weight: 500;
  margin-top: 3px;
}
.brand-mark {
  background: var(--green);
  color: #fff;
  width: 40px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  font-size: 25px;
  font-style: italic;
}
.local-badge {
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 4px 12px;
  color: #496354;
  font-size: 12px;
}
main {
  max-width: 1320px;
  margin: auto;
  padding: 32px 24px 64px;
}
h1 {
  font-size: 30px;
  line-height: 1.4;
  margin: 4px 0 8px;
}
h2 {
  font-size: 20px;
  line-height: 1.5;
}
p {
  margin: 8px 0 16px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.16em;
  font-weight: 750;
  color: var(--green);
  margin-bottom: 8px;
}
.workspace-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}
.workspace-heading p:not(.eyebrow) {
  color: #65776e;
}
.workspace {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
}
aside,
.editor-panel,
.login-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
aside {
  padding: 18px;
  align-self: start;
  max-height: calc(100vh - 180px);
  overflow: auto;
}
.editor-panel {
  padding: 28px;
}
label {
  display: block;
  font-size: 14px;
  font-weight: 650;
  margin: 0 0 18px;
}
label small {
  font-weight: 400;
  color: #60736a;
  margin-left: 6px;
}
input,
textarea,
select,
button {
  font: inherit;
}
input:not([type='checkbox']):not([type='file']),
textarea,
select {
  display: block;
  width: 100%;
  border: 1px solid #afbeb5;
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff;
  color: #182b35;
  margin-top: 6px;
}
input:read-only,
select:disabled {
  background: #f0f3f1;
  color: #53645c;
}
textarea {
  font-family: ui-monospace, monospace;
  font-size: 14px;
  line-height: 1.8;
  resize: vertical;
}
button,
.upload-button {
  cursor: pointer;
  border: 1px solid #b8c7be;
  background: #fff;
  color: #254536;
  border-radius: 6px;
  padding: 10px 16px;
  font-weight: 650;
  line-height: 1.5;
  min-height: 44px;
}
button.primary {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
button:hover:not(:disabled) {
  filter: brightness(0.92);
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
:focus-visible {
  outline: 3px solid #e6ad3d;
  outline-offset: 3px;
}
.two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 20px;
}
.check-label input {
  width: 20px;
  height: 20px;
  accent-color: var(--green);
}
.editor-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.editor-heading h2 {
  margin: 0;
}
.status-pill {
  font-size: 12px;
  background: #eef3ed;
  color: #4c6657;
  border-radius: 20px;
  padding: 4px 10px;
}
.help {
  font-size: 12px;
  color: #60736a;
}
.photo-tools,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.upload-button {
  margin: 0;
  position: relative;
  overflow: hidden;
}
.upload-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  cursor: pointer;
}
.upload-button:focus-within {
  outline: 3px solid #e6ad3d;
}
.actions {
  margin: 24px 0 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
details {
  margin: 20px 0;
  color: #3f5549;
}
summary {
  cursor: pointer;
  font-size: 13px;
}
.markdown-help p {
  font-size: 13px;
}
.article-item {
  display: block;
  width: 100%;
  text-align: left;
  margin-top: 10px;
  padding: 14px 12px;
  font-weight: 600;
  font-size: 13px;
  background: #fafcfb;
  border-color: #e2e8e4;
}
.article-item.active {
  border-color: var(--green);
  background: #edf7f1;
}
.article-item small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: #5f7767;
  margin-top: 6px;
}
.warning,
#message.error {
  background: #fff1e6;
  color: #873b17;
  padding: 14px;
  border-radius: 6px;
}
#message:not(:empty) {
  border-left: 4px solid var(--green);
  background: #e6f1ea;
  padding: 14px;
  margin-bottom: 24px;
}
#message.error {
  border-left-color: #a64723;
}
#preview {
  margin-top: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  overflow-wrap: anywhere;
}
#preview img {
  max-width: 100%;
  height: auto;
}
#preview table {
  display: block;
  max-width: 100%;
  overflow: auto;
}
#preview pre {
  white-space: pre-wrap;
}
.preview-banner {
  font-size: 12px;
  color: var(--green);
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}
#preview-state {
  float: right;
  font-weight: 700;
}
#empty {
  padding: 40px 12px;
  color: #5b7264;
}
#empty ol {
  line-height: 2.5;
}
.login-card {
  max-width: 560px;
  margin: 50px auto;
  padding: 38px;
}
.login-card .primary {
  width: 100%;
  margin: 14px 0;
}
.login-card h1 {
  font-size: 27px;
}
footer {
  border-top: 1px solid var(--line);
  max-width: 1272px;
  margin: auto;
  padding: 24px;
  font-size: 12px;
  color: #65776e;
  display: flex;
  justify-content: space-between;
}
code {
  background: #f1f5f2;
  padding: 2px 4px;
}
@media (max-width: 850px) {
  .workspace {
    grid-template-columns: 1fr;
  }
  aside {
    max-height: 280px;
  }
  .editor-panel {
    padding: 20px;
  }
  .workspace-heading {
    align-items: flex-start;
  }
  h1 {
    font-size: 25px;
  }
}
@media (max-width: 520px) {
  main {
    padding: 22px 12px 40px;
  }
  .site-header {
    padding: 14px 16px;
    gap: 8px;
  }
  .brand {
    font-size: 13px;
  }
  .local-badge {
    font-size: 10px;
    padding: 4px 8px;
  }
  .site-header button {
    font-size: 11px;
    padding: 8px;
  }
  .two-cols {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .check-label {
    padding: 0;
  }
  .workspace-heading {
    flex-direction: column;
    gap: 8px;
  }
  .editor-panel {
    padding: 16px;
  }
  .actions button {
    width: 100%;
  }
  .photo-tools button {
    font-size: 12px;
    padding: 9px;
  }
  .login-card {
    padding: 24px;
    margin: 25px auto;
  }
  .login-card h1 {
    font-size: 23px;
  }
  footer {
    display: block;
  }
  footer span {
    display: block;
  }
  .editor-heading {
    gap: 8px;
  }
  .status-pill {
    font-size: 10px;
  }
  .preview-banner span {
    float: none;
    display: block;
  }
  #preview {
    padding: 14px;
  }
}
