:root {
  --bg-top: #ffd79f;
  --bg-bottom: #f5f7fb;
  --ink: #17191c;
  --ink-soft: #5d6470;
  --line: #d8dde6;
  --card: #ffffff;
  --accent: #eb5e28;
  --accent-ink: #ffffff;
  --profile-avatar-size: 28px;
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Sans KR", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1000px 420px at 15% -5%, #ffefe0 0%, transparent 65%),
    linear-gradient(160deg, var(--bg-top), var(--bg-bottom));
  min-height: 100vh;
}

.app-shell {
  max-width: 550px;
  margin: 0 auto;
  padding: 20px 16px 34px;
}

.hero {
  margin-bottom: 14px;
}

.eyebrow {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.11em;
  font-weight: 700;
  color: var(--ink-soft);
}

h1 {
  margin: 4px 0 6px;
  font-family: "Space Grotesk", "Noto Sans KR", sans-serif;
  font-size: clamp(28px, 8vw, 36px);
  line-height: 1.04;
}

.hero-text {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.panel {
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-xl);
  padding: 14px;
  box-shadow: 0 6px 16px rgba(15, 18, 25, 0.04);
}

h2 {
  margin: 0 0 10px;
  font-size: 16px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 7px;
}

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

input[type="text"],
input[type="url"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 11px 12px;
  color: var(--ink);
}

textarea {
  resize: vertical;
  min-height: 112px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid color-mix(in oklab, var(--accent), white 30%);
  outline-offset: 1px;
}

.url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.url-row .btn {
  white-space: nowrap;
}

.status {
  min-height: 19px;
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--ink-soft);
}

.status.is-error {
  color: #ac1f1f;
}

.status.is-success {
  color: #0c6b3a;
}

.editor-grid {
  display: grid;
  gap: 8px;
}

.image-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.option-row {
  display: grid;
  gap: 8px;
}

.reply-editor-list {
  display: grid;
  gap: 8px;
}

.reply-editor-item {
  border: 1px solid #d8dee8;
  border-radius: 12px;
  padding: 10px;
  background: #fff;
  display: grid;
  gap: 8px;
}

.reply-editor-title {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: #1f2328;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reply-editor-fields {
  display: grid;
  gap: 4px;
}

.reply-editor-label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: #536471;
}

.reply-editor-textarea {
  min-height: 88px;
}

.check-option {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.check-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}

.capture-area {
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.tweet-card {
  background: var(--card);
  border: 1px solid #dce3ea;
  border-radius: 18px;
  padding: 14px 14px 12px;
  box-shadow: none;
}

.tweet-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: var(--profile-avatar-size);
  height: var(--profile-avatar-size);
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 14px;
  font-family: "Space Grotesk", sans-serif;
  background: linear-gradient(135deg, #272f40, #090a0d);
}

.avatar-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-meta {
  min-width: 0;
}

.name,
.handle {
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.name {
  font-weight: 700;
  font-size: 14px;
}

.handle {
  font-size: 12px;
  color: #697081;
}

.platform-mark {
  margin-left: auto;
  font-family: "Space Grotesk", sans-serif;
  font-size: 20px;
  color: #14171a;
  line-height: 1;
}

.tweet-text {
  margin: 10px 0 10px;
  font-size: 17px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.tweet-translation {
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid #dce3ea;
  border-radius: 10px;
  background: #fff;
}

.tweet-translation-label {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  color: #536471;
}

.tweet-translation-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: #1f2328;
  white-space: pre-wrap;
  word-break: break-word;
}

.tweet-media {
  display: grid;
  gap: 8px;
  margin: 4px 0 10px;
}

.tweet-media[data-count="1"] {
  grid-template-columns: 1fr;
}

.tweet-media[data-count="2"] {
  grid-template-columns: 1fr 1fr;
}

.tweet-media[data-count="3"],
.tweet-media[data-count="4"] {
  grid-template-columns: 1fr 1fr;
}

.tweet-media[data-count="3"] .tweet-image:first-child {
  grid-column: 1 / -1;
}

.tweet-image {
  width: 100%;
  display: block;
  border-radius: 13px;
  border: 1px solid #eff1f5;
  background: #f6f8fb;
}

.tweet-media[data-count="2"] .tweet-image,
.tweet-media[data-count="3"] .tweet-image,
.tweet-media[data-count="4"] .tweet-image {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.tweet-media[data-layout="vertical"] {
  grid-template-columns: 1fr;
}

.tweet-media[data-layout="vertical"] .tweet-image:first-child {
  grid-column: auto;
}

.tweet-media[data-layout="vertical"] .tweet-image {
  aspect-ratio: auto;
  object-fit: contain;
}

.quote-card {
  margin: 4px 0 10px;
  border: 1px solid #d3dce6;
  border-radius: 12px;
  padding: 10px;
  background: #fff;
}

.capture-reply-list {
  display: grid;
  gap: 8px;
  margin: 0 0 10px;
}

.reply-item {
  border: 1px solid #d3dce6;
  border-radius: 12px;
  padding: 8px 10px;
  background: #fff;
}

.reply-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reply-item-avatar {
  width: var(--profile-avatar-size);
  height: var(--profile-avatar-size);
  border-radius: 999px;
  border: 1px solid #dce3ed;
  object-fit: cover;
  flex: 0 0 auto;
}

.reply-item-meta {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.reply-item-name,
.reply-item-handle {
  margin: 0;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reply-item-name {
  font-size: 13px;
  font-weight: 700;
  color: #1f2328;
}

.reply-item-handle {
  font-size: 12px;
  color: #536471;
}

.reply-item-text {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.reply-item-translation {
  margin: 6px 0 0;
  padding: 7px 9px;
  border: 1px solid #dce3ea;
  border-radius: 10px;
  background: #fff;
}

.reply-item-translation-label {
  margin: 0 0 3px;
  font-size: 11px;
  font-weight: 700;
  color: #536471;
}

.reply-item-translation-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #1f2328;
  white-space: pre-wrap;
  word-break: break-word;
}

.quote-head {
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.quote-avatar {
  width: var(--profile-avatar-size);
  height: var(--profile-avatar-size);
  border-radius: 999px;
  border: 1px solid #dce3ed;
  object-fit: cover;
  flex: 0 0 auto;
}

.quote-meta {
  display: flex;
  gap: 6px;
  align-items: baseline;
  min-width: 0;
}

.quote-name,
.quote-handle {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.quote-handle {
  color: #697081;
}

.quote-text {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.quote-media {
  display: grid;
  gap: 6px;
  grid-template-columns: 1fr;
  margin-top: 8px;
}

.quote-image {
  width: 100%;
  display: block;
  height: auto;
  border-radius: 10px;
  border: 1px solid #e8ecf4;
  object-fit: contain;
  aspect-ratio: auto;
  background: #f6f8fb;
}

.quote-media[data-count="2"],
.quote-media[data-count="3"],
.quote-media[data-count="4"] {
  grid-template-columns: 1fr 1fr;
}

.tweet-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  gap: 8px;
  margin: 10px 0 6px;
  padding-top: 10px;
  border-top: 1px solid #e4eaef;
}

.tweet-action-item {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #536471;
  font-size: 12px;
}

.tweet-action-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex: 0 0 auto;
}

.tweet-action-item span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tweet-foot {
  display: grid;
  gap: 3px;
  font-size: 12px;
  color: #536471;
}

.tweet-foot-meta {
  display: flex;
  gap: 6px;
}

.actions {
  position: sticky;
  bottom: 8px;
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 8px;
}

.btn {
  border: 0;
  border-radius: 13px;
  padding: 11px 12px;
  font-weight: 700;
  cursor: pointer;
}

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

.btn-accent {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.hidden {
  display: none;
}

@media (min-width: 740px) {
  .panel {
    padding: 16px;
  }

  .actions {
    position: static;
    max-width: 360px;
    margin-left: auto;
  }
}
