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

[hidden] { display: none !important; }

:root {
  --bg: #edf4fb;
  --bg-soft: rgba(255,255,255,.72);
  --bg-strong: rgba(255,255,255,.94);
  --bg-hover: #f5f9fd;
  --border: rgba(207,217,222,.72);
  --border-strong: rgba(29,155,240,.16);
  --text: #0f1419;
  --text-sub: #536471;
  --blue: #1d9bf0;
  --blue-dark: #197ed8;
  --blue-soft: #e7f3fd;
  --green: #00ba7c;
  --green-soft: #e7fbf3;
  --amber: #b86f1c;
  --amber-soft: rgba(255,243,224,.92);
  --amber-border: rgba(184,111,28,.2);
  --red: #f4212e;
  --red-soft: #fff1f2;
  --shadow: 0 10px 30px rgba(15,20,25,.08);
  --shadow-lg: 0 24px 56px rgba(15,20,25,.16);
  --radius: 24px;
  --fab-size: 58px;
  --composer-text-lines: 7;
  --composer-text-size: 1rem;
  --composer-text-line-height: 1.72;
}

html {
  background: #f7fbff;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(29,155,240,.14), transparent 30%),
    radial-gradient(circle at top right, rgba(0,186,124,.08), transparent 26%),
    linear-gradient(180deg, #f8fbff 0%, #edf4fb 38%, #eef3f7 100%);
  color: var(--text);
  font-family: "Avenir Next", "SF Pro Display", "Hiragino Sans", "Yu Gothic UI", sans-serif;
  font-size: 14px;
}

body.composer-open {
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: .56;
}

.header,
.notice-panel,
.filter-bar,
.grid,
.grid-actions {
  width: min(1120px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.header {
  position: sticky;
  top: 0;
  z-index: 140;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px 14px;
  background: rgba(255,255,255,.8);
  border-bottom: 1px solid rgba(255,255,255,.4);
  backdrop-filter: blur(18px);
}

.header-left,
.header-actions,
.filter-group,
.composer-topbar,
.composer-heading-row,
.composer-status-wrap,
.composer-actions,
.composer-meta-row {
  display: flex;
  align-items: center;
}

.header-left {
  gap: 18px;
}

.brand-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.header-logo {
  font-family: "Avenir Next Condensed", "Avenir Next", "SF Pro Display", sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.04em;
  color: var(--blue);
}

.header-sub {
  color: var(--text-sub);
  font-size: .82rem;
}

.draft-state-badge,
.composer-save-status,
.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 700;
}

.draft-state-badge.pending {
  background: var(--blue-soft);
  color: var(--blue);
}

.draft-state-badge.posted {
  background: var(--green-soft);
  color: var(--green);
}

.header-actions {
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn-primary,
.btn-secondary,
.btn-copy,
.btn-icon,
.btn-delete,
.btn-post,
.btn-share,
.filter-btn,
.tag-chip,
.btn-fab {
  border-radius: 999px;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.btn-primary,
.btn-secondary,
.btn-copy,
.btn-icon,
.btn-delete,
.btn-post,
.btn-share {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  font-size: .88rem;
  font-weight: 700;
  white-space: nowrap;
}

.btn-compact {
  min-height: 36px;
  padding: 0 14px;
  font-size: .82rem;
}

.btn-primary,
.btn-post {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 12px 24px rgba(29,155,240,.2);
}

.btn-primary:hover,
.btn-post:hover {
  background: var(--blue-dark);
}

.btn-post-intent {
  border-color: rgba(29,155,240,.28);
  background: linear-gradient(135deg, rgba(29,155,240,.12), rgba(255,255,255,.96));
  color: var(--blue);
}

.btn-post-intent:hover {
  border-color: rgba(29,155,240,.42);
  background: linear-gradient(135deg, rgba(29,155,240,.18), rgba(255,255,255,.98));
  color: var(--blue-dark);
}

.btn-secondary,
.btn-copy,
.btn-icon,
.btn-delete,
.btn-share {
  background: rgba(255,255,255,.78);
  border: 1px solid var(--border);
  color: var(--text-sub);
}

.btn-secondary:hover,
.btn-copy:hover,
.btn-icon:hover {
  border-color: rgba(29,155,240,.4);
  color: var(--blue);
  background: rgba(255,255,255,.94);
}

.btn-share {
  border-color: rgba(29,155,240,.28);
  background: linear-gradient(135deg, rgba(29,155,240,.08), rgba(255,255,255,.96));
  color: var(--blue);
}

.btn-share:hover {
  border-color: rgba(29,155,240,.42);
  background: linear-gradient(135deg, rgba(29,155,240,.14), rgba(255,255,255,.98));
  color: var(--blue-dark);
}

.notice-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  min-height: 44px;
  padding: 0 46px 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(231,243,253,.92));
  box-shadow: inset 0 0 0 1px rgba(29,155,240,.12), 0 10px 24px rgba(15,20,25,.06);
  color: var(--text);
  font-size: .88rem;
  font-weight: 800;
  letter-spacing: .01em;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.notice-toggle::before,
.notice-toggle::after {
  position: absolute;
  top: 50%;
  pointer-events: none;
  transition: transform .18s ease, background .18s ease, opacity .18s ease;
}

.notice-toggle::before {
  content: "";
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(29,155,240,.12);
  transform: translateY(-50%);
}

.notice-toggle::after {
  content: "";
  right: 18px;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  transform: translateY(-58%) rotate(-45deg);
}

.notice-toggle:hover {
  background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(218,238,252,.96));
  box-shadow: inset 0 0 0 1px rgba(29,155,240,.18), 0 14px 28px rgba(15,20,25,.08);
  color: var(--blue);
  transform: translateY(-1px);
}

.notice-toggle:hover::before {
  background: rgba(29,155,240,.18);
}

.notice-toggle[aria-expanded="true"] {
  background: linear-gradient(135deg, rgba(231,243,253,.98), rgba(255,255,255,.96));
  box-shadow: inset 0 0 0 1px rgba(29,155,240,.22), 0 12px 26px rgba(15,20,25,.07);
  color: var(--blue);
}

.notice-toggle[aria-expanded="true"]::before {
  background: rgba(29,155,240,.18);
}

.notice-toggle[aria-expanded="true"]::after {
  transform: translateY(-72%) rotate(45deg);
}

.notice-toggle:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(29,155,240,.22), 0 0 0 4px rgba(29,155,240,.14), 0 12px 26px rgba(15,20,25,.07);
}

.btn-delete:hover,
.danger-outline:hover {
  border-color: rgba(244,33,46,.4);
  color: var(--red);
  background: var(--red-soft);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-sub);
  box-shadow: none;
}

.btn-ghost:hover {
  background: rgba(247,249,249,.92);
  color: var(--text);
}

.btn-install {
  border-color: rgba(29,155,240,.28);
  background: linear-gradient(135deg, rgba(29,155,240,.12), rgba(255,255,255,.96));
  color: var(--blue);
}

.import-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.notice-panel {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,.84), rgba(246,250,255,.92));
  box-shadow: var(--shadow);
}

.notice-heading,
.notice-item,
.composer-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.notice-heading {
  align-items: center;
  flex-wrap: nowrap;
}

.notice-item,
.composer-section-head {
  align-items: flex-start;
}

.notice-heading > div,
.notice-item > div {
  min-width: 0;
}

.notice-heading > div {
  flex: 1;
}

.notice-kicker,
.composer-kicker {
  color: var(--blue);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.notice-title,
.composer-title {
  font-size: 1.08rem;
  line-height: 1.3;
}

.notice-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.notice-item {
  justify-content: flex-start;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(29,155,240,.08);
}

.notice-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--blue-soft);
  font-size: 1rem;
}

.notice-item h3 {
  font-size: .88rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.notice-item p,
.composer-section-head p,
.composer-danger-label,
.card-preview-empty {
  margin-top: 4px;
  color: var(--text-sub);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.filter-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
}

.filter-group {
  gap: 8px;
}

.status-bar,
.tag-bar {
  overflow-x: auto;
  scrollbar-width: none;
}

.status-bar::-webkit-scrollbar,
.tag-bar::-webkit-scrollbar {
  display: none;
}

.tag-bar-wrap {
  margin-left: auto;
}

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

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  background: rgba(255,255,255,.44);
  color: var(--text-sub);
  min-height: 38px;
  padding: 0 10px 0 16px;
  font-size: .84rem;
  font-weight: 700;
  flex-shrink: 0;
}

.filter-btn-label {
  white-space: nowrap;
}

.filter-btn-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(15,20,25,.08);
  color: var(--text);
  font-size: .76rem;
  line-height: 1;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.filter-btn:hover {
  background: rgba(255,255,255,.72);
  color: var(--text);
}

.filter-btn.active {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 12px 20px rgba(29,155,240,.2);
}

.filter-btn.active .filter-btn-count {
  background: rgba(255,255,255,.2);
  color: #fff;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 16px;
  padding-bottom: calc(var(--fab-size) + 8px + env(safe-area-inset-bottom, 0px));
}

.grid-actions {
  display: flex;
  justify-content: flex-end;
}

.empty {
  grid-column: 1 / -1;
  padding: 72px 24px;
  text-align: center;
  color: var(--text-sub);
  background: rgba(255,255,255,.74);
  border: 1px dashed var(--border);
  border-radius: 28px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(252,254,255,.72));
  box-shadow: var(--shadow);
  cursor: pointer;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(15,20,25,.12);
}

.card.posted {
  background: linear-gradient(180deg, rgba(249,255,252,.92), rgba(247,252,250,.78));
}

.card-top,
.card-actions,
.card-tags {
  display: flex;
  align-items: center;
}

.card-top {
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.card-head {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 10px;
}

.card-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.card-posted-at {
  color: var(--text-sub);
  font-size: .78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.card-preview-wrap {
  position: relative;
  min-height: 8.3rem;
  padding-bottom: 42px;
}

.card-preview {
  color: var(--text);
  font-size: .98rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-preview-empty {
  font-size: .96rem;
  line-height: 1.55;
}

.card-count-pill {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 1;
  box-shadow: 0 10px 24px rgba(15,20,25,.08);
}

.card-media-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.card-media-slot {
  position: relative;
  aspect-ratio: 1;
}

.card-media-slot .image-thumb-button {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 18px;
}

.card-media-spacer {
  display: block;
  width: 100%;
  height: 100%;
}

.image-thumb-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: transparent;
}

.image-thumb-badge,
.image-edit-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(15,20,25,.8);
  color: #fff;
  font-size: .7rem;
  font-weight: 800;
}

.image-thumb-badge {
  position: absolute;
  left: 8px;
  bottom: 8px;
}

.image-edit-badge {
  margin-top: 8px;
}

.card-media-thumb,
.composer-image-thumb,
.composer-image-thumb.is-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-media-thumb {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(29,155,240,.12), rgba(0,186,124,.1));
  border: 1px solid rgba(207,217,222,.56);
}

.composer-image-thumb.is-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.composer-image-thumb.is-placeholder {
  padding: 10px;
  color: var(--text-sub);
  font-size: .72rem;
  font-weight: 700;
  text-align: center;
}

.card-media-more {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(15,20,25,.76);
  color: #fff;
  font-size: .76rem;
  font-weight: 800;
}

.card-tags {
  gap: 8px;
  flex-wrap: wrap;
}

.card-tags-under-status {
  margin-top: -2px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: var(--blue-soft);
  color: var(--blue);
  padding: 7px 12px;
  font-size: .75rem;
  font-weight: 700;
}

.tag-chip.readonly {
  cursor: default;
}

.tag-chip.removeable {
  padding-right: 10px;
}

.tag-chip:hover.removeable {
  background: #d8ecfc;
}

.tag-chip-empty {
  color: var(--text-sub);
  font-size: .78rem;
}

.meta-pill {
  min-height: 28px;
  background: rgba(247,249,249,.95);
  border: 1px solid rgba(207,217,222,.48);
  color: var(--text-sub);
}

.card-actions {
  justify-content: flex-end;
  gap: 10px;
  margin-top: auto;
}

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

.card-primary-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 1;
}

.card-primary-actions-wide {
  flex-wrap: wrap;
}

.card-actions-posted {
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.card-lock-pill,
.btn-card-status,
.btn-card-unlock,
.composer-status-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.card-lock-pill {
  background: rgba(15,20,25,.86);
  border-color: transparent;
  color: #fff;
}

.btn-card-unlock {
  color: var(--text);
}

.btn-card-unlock:hover {
  border-color: rgba(29,155,240,.28);
  color: var(--blue);
}

.card-lock-pill svg,
.btn-card-status svg,
.btn-card-unlock svg,
.composer-status-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.composer-topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 8px;
  width: 100%;
}

.btn-composer-post-desktop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  order: -1;
}

.composer-mobile-actions {
  display: none;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  min-width: 42px;
  padding: 0;
}

.btn-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-card-delete:hover {
  border-color: rgba(244,33,46,.4);
  color: var(--red);
  background: var(--red-soft);
}

.btn-post-intent {
  min-width: 94px;
}

.card-primary-actions .btn-post,
.card-primary-actions .btn-post-intent {
  flex: 1;
}

.composer-status-button.is-unlock {
  color: var(--text);
}

.composer-status-button.is-unlock:hover {
  color: var(--blue);
}

.composer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: rgba(15,20,25,.26);
  backdrop-filter: blur(10px);
}

.composer {
  position: relative;
  width: min(760px, 100%);
  height: 100vh;
  max-height: 100vh;
  background: rgba(250,252,255,.98);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.composer-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: max(14px, env(safe-area-inset-top, 0px)) 16px 14px;
  border-bottom: 1px solid rgba(207,217,222,.48);
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(18px);
}

.composer-save-status {
  border: 1px solid var(--amber-border);
  background: var(--amber-soft);
  color: var(--amber);
}

.composer-save-status.saving {
  border-color: rgba(184,111,28,.28);
  background: rgba(255,236,204,.98);
  color: var(--amber);
}

.composer-textarea-wrap {
  position: relative;
}

.composer-counter {
  position: absolute;
  right: 14px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(247,249,249,.96);
  border: 1px solid rgba(207,217,222,.48);
  color: var(--text-sub);
  font-size: .78rem;
  font-weight: 700;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}

.composer-counter.over {
  color: var(--red);
  border-color: rgba(244,33,46,.28);
  background: rgba(255,241,242,.96);
}

.composer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 20px calc(112px + env(safe-area-inset-bottom, 0px));
}

.composer-heading-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.composer-heading-row {
  justify-content: space-between;
  gap: 12px;
}

.composer-editor,
.composer-section {
  display: flex;
  flex-direction: column;
  margin-top: 18px;
}

.composer-label {
  color: var(--text-sub);
  font-size: .78rem;
  font-weight: 700;
}

.composer-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.composer-textarea,
.composer-tag-input {
  width: 100%;
  border: 1px solid rgba(207,217,222,.84);
  border-radius: 22px;
  background: rgba(255,255,255,.98);
  color: var(--text);
}

.composer-textarea {
  height: calc((var(--composer-text-size) * var(--composer-text-line-height) * var(--composer-text-lines)) + 54px);
  min-height: calc((var(--composer-text-size) * var(--composer-text-line-height) * var(--composer-text-lines)) + 54px);
  max-height: calc((var(--composer-text-size) * var(--composer-text-line-height) * var(--composer-text-lines)) + 54px);
  padding: 18px 18px 54px;
  font-size: var(--composer-text-size);
  line-height: var(--composer-text-line-height);
  resize: none;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.composer-textarea:focus,
.composer-tag-input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(29,155,240,.12);
}

.composer-textarea[readonly] {
  background: rgba(247,249,249,.95);
  color: var(--text-sub);
}

.btn-composer-post-fab {
  display: none;
  position: fixed;
  right: max(20px, calc(env(safe-area-inset-right, 0px) + 16px));
  bottom: max(20px, calc(env(safe-area-inset-bottom, 0px) + 16px));
  z-index: 360;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: var(--fab-size);
  min-height: var(--fab-size);
  padding: 0 22px;
  border: none;
  background: linear-gradient(180deg, #27a5ff, #1d8fe0);
  color: #fff;
  box-shadow: 0 20px 40px rgba(29,155,240,.32);
}

.btn-composer-post-fab:hover {
  transform: translateY(-2px);
}

.composer-meta-row {
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.composer-section {
  padding: 16px;
  border-radius: 24px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(207,217,222,.4);
}

.composer-section-note {
  margin-top: 10px;
  color: var(--text-sub);
  font-size: .8rem;
  line-height: 1.6;
}

.composer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.composer-image-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-top: 14px;
}

.btn-file-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  appearance: none;
  cursor: pointer;
  line-height: 1;
  user-select: none;
  box-shadow: 0 10px 24px rgba(15,20,25,.06);
}

.btn-file-trigger:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(29,155,240,.14);
}

.btn-file-trigger:active {
  transform: translateY(0);
  box-shadow: 0 6px 16px rgba(15,20,25,.08);
}

.btn-file-trigger:disabled {
  opacity: .56;
  cursor: not-allowed;
  box-shadow: none;
}

.composer-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.composer-image-empty {
  padding: 18px;
  border-radius: 20px;
  border: 1px dashed rgba(207,217,222,.84);
  background: rgba(247,249,249,.72);
  color: var(--text-sub);
  line-height: 1.6;
}

.composer-image-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(248,251,255,.96), rgba(255,255,255,.88));
  border: 1px solid rgba(207,217,222,.56);
}

.composer-image-preview {
  width: 88px;
  height: 88px;
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(29,155,240,.12), rgba(0,186,124,.1));
}

.composer-image-card .image-thumb-button {
  width: 88px;
  height: 88px;
  overflow: hidden;
  border-radius: 20px;
}

.composer-image-meta {
  min-width: 0;
}

.composer-image-name {
  overflow: hidden;
  color: var(--text);
  font-size: .86rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-image-size {
  margin-top: 6px;
  color: var(--text-sub);
  font-size: .78rem;
}

.btn-image-remove {
  justify-self: end;
}

.composer-tag-form {
  margin-top: 14px;
}

.composer-tag-input {
  min-height: 44px;
  padding: 0 16px;
}

.btn-fab {
  position: fixed;
  right: max(20px, calc(env(safe-area-inset-right, 0px) + 16px));
  bottom: max(20px, calc(env(safe-area-inset-bottom, 0px) + 16px));
  z-index: 250;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: var(--fab-size);
  min-height: var(--fab-size);
  padding: 0 22px;
  border: none;
  background: linear-gradient(180deg, #27a5ff, #1d8fe0);
  color: #fff;
  box-shadow: 0 20px 40px rgba(29,155,240,.32);
}

.btn-fab:hover {
  transform: translateY(-2px);
}

.btn-fab-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.btn-fab-label {
  font-size: .92rem;
  font-weight: 800;
}

#toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 999;
  transform: translateX(-50%) translateY(20px);
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(15,20,25,.92);
  color: #fff;
  font-size: .84rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}

#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15,20,25,.36);
  backdrop-filter: blur(10px);
}

.modal {
  width: min(960px, 100%);
  max-height: min(92vh, 920px);
  overflow: auto;
  padding: 18px;
  border-radius: 28px;
  background: rgba(255,255,255,.97);
  box-shadow: var(--shadow-lg);
}

.modal-header,
.image-modal-footer,
.image-modal-heading,
.image-editor-toolbar,
.image-editor-actions,
.image-editor-panel-head,
.share-prep-body,
.editor-range-field {
  display: flex;
}

.modal-header,
.image-modal-footer,
.image-editor-panel-head {
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-title {
  font-size: 1.1rem;
}

.modal-close {
  min-width: 40px;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,.8);
  color: var(--text-sub);
}

.image-modal-heading {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.image-modal-meta,
.image-editor-note,
.share-prep-body p,
.image-editor-panel-note {
  color: var(--text-sub);
  font-size: .82rem;
  line-height: 1.6;
}

.image-modal {
  max-width: 860px;
}

.image-modal-stage {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.image-modal-img {
  width: 100%;
  max-height: min(64vh, 680px);
  object-fit: contain;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(29,155,240,.08), rgba(0,186,124,.08));
}

.image-modal-nav {
  min-width: 52px;
  min-height: 52px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,.86);
  color: var(--text);
}

.image-modal-footer {
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 18px;
}

.share-prep-modal {
  max-width: 620px;
}

.share-prep-body {
  margin-top: 16px;
}

.image-editor-modal {
  max-width: 1080px;
}

.image-editor-toolbar {
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding: 12px 0 4px;
}

.image-editor-tool,
.image-editor-preset,
.image-editor-action {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,.86);
  color: var(--text-sub);
  font-weight: 700;
}

.image-editor-tool.active {
  background: var(--blue);
  border-color: transparent;
  color: #fff;
}

.image-editor-toolbar-divider {
  width: 1px;
  height: 28px;
  background: rgba(207,217,222,.84);
}

.image-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 340px);
  gap: 18px;
  margin-top: 16px;
}

.image-editor-stage,
.image-editor-panel-section {
  border-radius: 24px;
  border: 1px solid rgba(207,217,222,.5);
  background: rgba(248,251,255,.96);
}

.image-editor-stage {
  min-height: 420px;
  padding: 12px;
}

#image-editor-canvas {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(29,155,240,.06), rgba(0,186,124,.05));
  touch-action: none;
}

.image-editor-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.image-editor-panel-section {
  padding: 14px;
}

.image-editor-panel-head {
  align-items: flex-start;
}

.editor-range-field {
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  color: var(--text);
  font-size: .84rem;
  font-weight: 700;
}

.editor-range-value {
  color: var(--text-sub);
}

.image-editor-actions {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.image-editor-preview {
  width: 100%;
  margin-top: 14px;
  border-radius: 20px;
  background: rgba(255,255,255,.72);
}

@media (max-width: 900px) {
  .header,
  .header-left {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions,
  .header-left {
    width: 100%;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .filter-bar {
    flex-direction: column;
  }

  .tag-bar-wrap {
    width: 100%;
    margin-left: 0;
  }

  .composer-image-grid {
    grid-template-columns: 1fr;
  }

  .image-editor-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .header,
  .notice-panel,
  .filter-bar,
  .grid,
  .grid-actions {
    width: min(100%, calc(100% - 24px));
  }

  .header {
    position: static;
    gap: 12px;
    padding: 14px 12px;
  }

  .header-logo {
    font-size: 1.34rem;
  }

  .header-actions {
    gap: 8px;
  }

  .header-actions .btn-secondary,
  .header-actions .import-label {
    min-height: 38px;
    padding: 0 14px;
  }

  .notice-panel {
    padding: 16px;
    border-radius: 24px;
  }

  .notice-list {
    grid-template-columns: 1fr;
  }

  .notice-heading {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .notice-title {
    font-size: 1rem;
  }

  .notice-toggle {
    width: fit-content;
    max-width: 100%;
    padding-left: 16px;
    padding-right: 48px;
    align-self: flex-start;
  }

  .notice-item {
    padding: 12px 13px;
    align-items: flex-start;
  }

  .status-bar,
  .tag-bar {
    width: 100%;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-bottom: calc(var(--fab-size) + 20px + env(safe-area-inset-bottom, 0px));
  }

  .card {
    border-radius: 24px;
    padding: 16px;
  }

  .card-media-strip.is-empty {
    display: none;
  }

  .composer {
    width: 100%;
  }

  .composer-topbar {
    position: sticky;
    top: 0;
    z-index: 2;
  }

  .composer-topbar-actions {
    justify-content: flex-end;
  }

  .btn-composer-post-desktop {
    display: none;
  }

  .composer-heading-row {
    flex-direction: column;
  }

  .composer-body {
    padding: 18px 14px calc(118px + env(safe-area-inset-bottom, 0px));
  }

  .composer-mobile-actions {
    position: fixed;
    right: max(16px, calc(env(safe-area-inset-right, 0px) + 12px));
    bottom: max(16px, calc(env(safe-area-inset-bottom, 0px) + 12px));
    z-index: 360;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
  }

  .btn-composer-share-mobile {
    min-height: 44px;
    padding: 0 16px;
    box-shadow: 0 12px 24px rgba(15,20,25,.12);
  }

  .btn-composer-post-fab {
    position: static;
    display: inline-flex;
    right: auto;
    bottom: auto;
  }

  .composer-textarea {
    height: calc((var(--composer-text-size) * var(--composer-text-line-height) * 8) + 54px);
    min-height: calc((var(--composer-text-size) * var(--composer-text-line-height) * 8) + 54px);
    max-height: calc((var(--composer-text-size) * var(--composer-text-line-height) * 8) + 54px);
  }

  .card-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .card-primary-actions {
    width: 100%;
  }

  .card-primary-actions {
    justify-content: stretch;
  }

  .btn-fab {
    position: fixed;
    right: max(20px, calc(env(safe-area-inset-right, 0px) + 16px));
    bottom: max(92px, calc(env(safe-area-inset-bottom, 0px) + 84px));
    width: var(--fab-size);
    min-width: var(--fab-size);
    padding: 0;
  }

  .btn-fab-label {
    display: none;
  }

  #toast {
    bottom: calc(var(--fab-size) + env(safe-area-inset-bottom, 0px) + 28px);
  }

  .modal-overlay {
    padding: 10px;
  }

  .modal {
    padding: 14px;
    border-radius: 22px;
  }

  .image-modal-stage {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    gap: 8px;
  }

  .image-modal-nav {
    min-width: 40px;
    min-height: 40px;
  }

  .image-editor-stage {
    min-height: 300px;
  }
}

.copyright {
  text-align: center;
  font-size: 12px;
  color: var(--text-sub);
  padding: 16px 0 calc(16px + env(safe-area-inset-bottom, 0px));
}
