:root {
  --bg: #fff;
  --sidebar: #f7f7f9;
  --subtle: #fafafb;
  --hover: #f2f2f5;
  --line: #ebebef;
  --line-strong: #dedee5;
  --text: #1c1c21;
  --text-2: #4d4d57;
  --muted: #8b8b96;
  --accent: #5b5bd6;
  --accent-soft: #efeffc;
  --blue: #4c84e6;
  --green: #2e9d69;
  --orange: #d9822b;
  --red: #d6455d;
  --pink: #d6457a;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

a.btn {
  text-decoration: none;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.icon {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* App shell */

.shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 10px;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
}

.ws {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 12px;
  font-weight: 600;
}

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, #7272ec, #4848c4);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 8px;
  border-radius: 6px;
  color: var(--text-2);
}

.nav-item.on {
  background: #e9e9ef;
  color: var(--text);
  font-weight: 500;
}

.nav-item .count {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.nav-section {
  padding: 16px 8px 4px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
}

.me {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 8px;
  color: var(--text-2);
}

.me small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #8e7cc3;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
}

.avatar.b {
  background: #4fa3a5;
}

.content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 46px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  white-space: nowrap;
}

.crumbs b {
  overflow: hidden;
  color: var(--text);
  font-weight: 500;
  text-overflow: ellipsis;
}

.actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page {
  padding: 28px 32px;
}

.narrow {
  max-width: 620px;
}

/* Controls */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 1px rgb(0 0 0 / 4%);
  color: var(--text);
  font: inherit;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}

.btn.primary {
  border-color: transparent;
  background: var(--accent);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 18%),
    0 1px 2px rgb(60 60 180 / 30%);
  color: #fff;
}

.btn.danger {
  color: var(--red);
}

.btn.lg {
  height: 34px;
  padding: 0 16px;
}

.btn.block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

kbd {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 5px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #fff;
  color: var(--muted);
  font:
    500 11px Inter,
    system-ui,
    sans-serif;
}

.btn.primary kbd {
  border-color: rgb(255 255 255 / 25%);
  background: rgb(255 255 255 / 16%);
  color: #fff;
}

.link {
  color: var(--accent);
}

.hint {
  color: var(--muted);
  font-size: 12px;
}

/* Status */

.st {
  position: relative;
  display: inline-block;
  flex: none;
  width: 14px;
  height: 14px;
  border: 1.5px solid #a3a3ad;
  border-radius: 50%;
}

.st.draft {
  border-style: dashed;
}

.st.previewed {
  border-color: var(--blue);
  background: conic-gradient(var(--blue) 0 180deg, transparent 0);
  box-shadow: inset 0 0 0 2px #fff;
}

.st.diff {
  border-color: var(--orange);
  background: conic-gradient(var(--orange) 0 270deg, transparent 0);
  box-shadow: inset 0 0 0 2px #fff;
}

.st.busy {
  border-color: var(--accent);
  border-top-color: transparent;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.st.scheduled {
  border-color: var(--accent);
}

.st.scheduled::after {
  position: absolute;
  top: 2px;
  left: 4.5px;
  width: 3px;
  height: 4px;
  border: solid var(--accent);
  border-width: 0 0 1.5px 1.5px;
  content: "";
}

.st.published {
  border-color: var(--green);
  background: var(--green);
}

.st.published::after {
  position: absolute;
  top: 1.5px;
  left: 3.5px;
  width: 3px;
  height: 6px;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  content: "";
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 500;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 20px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text-2);
  font-size: 11.5px;
  white-space: nowrap;
}

.chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
}

.chip.news .dot {
  background: var(--blue);
}

.chip.update .dot {
  background: var(--green);
}

.chip.app .dot {
  background: var(--pink);
}

/* List */

.views {
  display: flex;
  gap: 2px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
}

.view {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-2);
  font-size: 12.5px;
}

.view.on {
  border-color: var(--line-strong);
  background: #fff;
  box-shadow: 0 1px 1px rgb(0 0 0 / 4%);
  color: var(--text);
  font-weight: 500;
}

.view .n {
  color: var(--muted);
}

.group {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: var(--subtle);
  font-weight: 500;
}

.group .n {
  color: var(--muted);
  font-weight: 400;
}

.item {
  display: grid;
  grid-template-columns: 44px 16px minmax(0, 1fr) auto 20px 56px;
  align-items: center;
  gap: 12px;
  height: 42px;
  padding: 0 20px;
  border-bottom: 1px solid #f1f1f4;
}

.item:hover {
  background: var(--subtle);
}

.item .id {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.item .title {
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item .chips {
  display: flex;
  gap: 6px;
}

.item .date {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.footnote {
  padding: 14px 20px;
  color: var(--muted);
  font-size: 12px;
}

/* Article editor */

.article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  flex: 1;
}

.doc {
  max-width: 760px;
  padding: 36px 48px 48px;
}

.doc-title {
  margin-bottom: 6px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.saved {
  color: var(--muted);
  font-size: 12px;
}

.toolbar {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin: 20px 0 18px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgb(0 0 0 / 4%);
}

.tool {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 8px;
  border-radius: 5px;
  color: var(--text-2);
  font-size: 12.5px;
}

.tool:hover {
  background: var(--hover);
}

.sep {
  width: 1px;
  height: 16px;
  margin: 0 3px;
  background: var(--line);
}

.editor {
  font-size: 14.5px;
  line-height: 1.85;
}

.editor p,
.editor ul,
.editor table {
  margin: 0 0 12px;
}

.editor h3 {
  margin: 24px 0 6px;
  font-size: 16px;
  font-weight: 600;
}

.editor ul {
  padding-left: 22px;
}

.editor table {
  border-collapse: collapse;
}

.editor td {
  padding: 4px 12px;
  border: 1px solid var(--line-strong);
}

.editor .img {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 150px;
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(135deg, #f3f0fd, #eef5fb);
  color: var(--muted);
  font-size: 12.5px;
}

.editor .bad {
  outline: 2px solid var(--red);
  outline-offset: 4px;
  border-radius: 4px;
}

.props {
  padding: 18px 16px;
  border-left: 1px solid var(--line);
  background: var(--subtle);
}

.props-title {
  margin: 0 0 6px;
  padding: 0 6px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
}

.prop {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  min-height: 32px;
  padding: 0 6px;
}

.prop-label {
  color: var(--muted);
  font-size: 12.5px;
}

.prop-value {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-self: start;
  padding: 3px 6px;
  border-radius: 5px;
  font-weight: 500;
}

.prop-value:hover {
  background: var(--hover);
}

.prop-note {
  padding: 0 6px 8px 104px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}

.toggle {
  position: relative;
  width: 26px;
  height: 15px;
  border-radius: 8px;
  background: #d6d6de;
}

.toggle::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgb(0 0 0 / 20%);
  content: "";
}

.toggle.on {
  background: var(--accent);
}

.toggle.on::after {
  left: 13px;
}

.props-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  padding: 16px 6px 0;
  border-top: 1px solid var(--line);
}

/* Callouts */

.callout {
  display: flex;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid;
  border-radius: 8px;
  color: var(--text-2);
}

.callout strong {
  display: block;
  margin-bottom: 2px;
  color: var(--text);
  font-weight: 600;
}

.callout ul {
  margin: 4px 0 0;
  padding-left: 18px;
}

.callout .ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  border-radius: 50%;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
}

.callout.info {
  border-color: #dce5fa;
  background: #f4f7fe;
}

.callout.info .ic {
  background: var(--blue);
}

.callout.warn {
  border-color: #f3e0c4;
  background: #fdf8f0;
}

.callout.warn .ic {
  background: var(--orange);
}

.callout.err {
  border-color: #f4d2d9;
  background: #fdf3f5;
}

.callout.err .ic {
  background: var(--red);
}

.callout.ok {
  border-color: #cfeadd;
  background: #f1faf5;
}

.callout.ok .ic {
  background: var(--green);
}

/* Progress */

.card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgb(0 0 0 / 3%);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: var(--subtle);
  border-radius: 0 0 10px 10px;
}

.card h2 {
  font-size: 15px;
  font-weight: 600;
}

.progress {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #ececf1;
}

.progress > div {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}

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

.steps li {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 7px 0;
}

.steps li .st {
  margin-top: 2px;
}

.steps .todo {
  color: var(--muted);
}

.steps .sub {
  color: var(--muted);
  font-size: 12px;
}

.steps .time {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* Preview */

.shots {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 20px;
  border-radius: 10px;
  background: #f4f4f7;
}

.shot {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.shot img {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgb(20 20 40 / 8%);
}

.shot.pc {
  flex: 1 1 auto;
  max-width: 560px;
  min-width: 0;
}

.shot.sp {
  flex: none;
  width: 180px;
}

/* Dialog */

.backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(18 18 30 / 32%);
  backdrop-filter: blur(2px);
}

.dialog {
  width: 460px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow:
    0 24px 48px rgb(16 16 40 / 18%),
    0 2px 6px rgb(0 0 0 / 6%);
}

.dialog-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
}

.dialog h2 {
  font-size: 15px;
  font-weight: 600;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.choice {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.choice.on {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.choice b {
  font-weight: 500;
}

.radio {
  width: 14px;
  height: 14px;
  margin-top: 2px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
}

.choice.on .radio {
  border: 4px solid var(--accent);
}

.when {
  display: inline-flex;
  gap: 6px;
  margin-top: 8px;
}

.field {
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  font-variant-numeric: tabular-nums;
}

.dialog ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-2);
}

/* Login */

.center {
  display: grid;
  place-items: center;
  min-height: 100vh;
  background: radial-gradient(circle at 50% 0%, #efeffc 0, #fff 55%);
}

.login {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 340px;
  padding: 32px 28px;
  text-align: center;
}

.login .mark {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  font-size: 18px;
}

.login h1 {
  font-size: 17px;
  font-weight: 600;
}

.login p {
  color: var(--text-2);
}

.g {
  color: #4285f4;
  font-weight: 800;
}

/* Slack */

.slack-page {
  min-height: 100vh;
  padding: 40px 20px;
  background: #f4f4f7;
}

.slack {
  max-width: 640px;
  margin: 0 auto;
  padding: 8px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-family: "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  font-size: 14px;
}

.slack .msg {
  display: flex;
  gap: 12px;
  padding: 12px 20px;
}

.slack .avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, #7272ec, #4848c4);
  font-size: 15px;
}

.slack .name {
  font-weight: 700;
}

.slack .name small {
  margin-left: 6px;
  color: var(--muted);
  font-weight: 400;
}

.slack .att {
  margin-top: 6px;
  padding: 4px 12px;
  border-left: 4px solid var(--green);
}

.slack .att.warn {
  border-left-color: var(--orange);
}

.slack .att.info {
  border-left-color: var(--muted);
}

.slack .link {
  color: #1264a3;
}

a.item,
a.nav-item,
.crumbs a {
  color: inherit;
  text-decoration: none;
}

a.item:hover {
  background: #f7f7f9;
}

.item .title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

button.tool {
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}

button.tool:hover {
  background: #f1f1f4;
}

.doc-title-input {
  width: 100%;
  border: 0;
  outline: none;
  background: none;
  font-family: inherit;
}

.editor[contenteditable] {
  min-height: 320px;
  outline: none;
}

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

.editor .embed {
  display: block;
  margin: 0 0 12px;
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  color: var(--text-2);
  text-align: center;
  user-select: none;
}

.editor blockquote {
  margin: 0 0 12px;
  padding-left: 12px;
  border-left: 3px solid var(--line-strong);
  color: var(--text-2);
}

select.field,
input.field {
  font: inherit;
}

.toggle-input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}
