/* Distraction-free lines writing — full-screen WritingView */
.w-shell--embedded {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 1rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-height: 100%;
  height: 100%;
  box-sizing: border-box;
  background: transparent;
}

.w-shell {
  width: min(100%, 640px);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.w-header {
  text-align: center;
  flex-shrink: 0;
}

.w-close {
  position: absolute;
  top: 0;
  right: 0;
  border: none;
  background: transparent;
  color: #6b6b88;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

.w-close:disabled {
  opacity: 0.4;
  cursor: wait;
}

.w-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b6b88;
  margin: 0 0 0.35rem;
}

.w-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 600;
  color: #f4f4fa;
  margin: 0;
  line-height: 1.25;
}

.w-reps {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: #9898b8;
}

.w-target {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--view-primary, #a88938) 6%, transparent),
    rgba(255, 255, 255, 0.015)
  );
  border: 1px solid color-mix(in srgb, var(--view-primary, #a88938) 14%, transparent);
  border-radius: 14px;
  padding: 1.25rem 1.35rem;
  text-align: center;
}

.w-target-label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6b6b88;
  margin: 0 0 0.75rem;
}

.w-target-phrase {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.1rem, 3.5vw, 1.45rem);
  font-weight: 600;
  color: #ffffff;
  line-height: 1.45;
  quotes: none;
  user-select: none;
  -webkit-user-select: none;
}

.w-section-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #c9c9e0;
  margin: 0 0 0.75rem;
}

.w-performance {
  background: #0e0e18;
  border-radius: 14px;
  padding: 1rem 1.1rem;
  border: 1px solid #1e1e32;
}

.w-progress-wrap {
  height: 6px;
  background: #1a1a2e;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.4rem;
}

.w-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #8a7348, #c9a86c);
  border-radius: 3px;
  transition: width 0.15s ease;
}

.w-progress-text {
  font-size: 0.78rem;
  color: #9898b8;
  margin: 0 0 1rem;
}

.w-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

@media (min-width: 480px) {
  .w-stats { grid-template-columns: repeat(4, 1fr); }
}

.w-stat {
  background: #141422;
  border: 1px solid #252540;
  border-radius: 10px;
  padding: 0.65rem 0.5rem;
  text-align: center;
}

.w-stat-val {
  display: block;
  font-size: 1.35rem;
  font-weight: 600;
  color: #f0f0f8;
  line-height: 1.2;
}

.w-stat-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: #b8b8d0;
  margin-top: 0.15rem;
}

.w-stat-sub {
  display: block;
  font-size: 0.62rem;
  color: #6b6b88;
  margin-top: 0.1rem;
}

.w-input-section {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.w-input-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #c9c9e0;
}

.w-completed-count {
  font-size: 0.78rem;
  color: #7ec99a;
  margin: 0;
}

.w-input {
  width: 100%;
  min-height: 0;
  padding: 0.85rem 1rem;
  background: #11111c;
  border: 2px solid #2a2a42;
  border-radius: 12px;
  color: #f4f4fa;
  font-family: "DM Sans", ui-monospace, monospace;
  font-size: 1rem;
  line-height: 1.4;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.w-input:focus {
  border-color: #c9a86c;
}

.w-input:disabled {
  opacity: 0.6;
}

.w-footer {
  display: flex;
  justify-content: center;
  padding-bottom: 0.5rem;
}

.w-btn {
  padding: 0.8rem 2.5rem;
  border-radius: 999px;
  border: 1px solid #3a3a5c;
  background: #1a1a2e;
  color: #9898b8;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: not-allowed;
  opacity: 0.55;
}

.w-btn--primary:not([disabled]) {
  background: #c9a86c;
  border-color: #c9a86c;
  color: #0f0f1a;
  cursor: pointer;
  opacity: 1;
}

.w-btn--primary:not([disabled]):hover {
  background: #d4b87a;
}

.w-error {
  color: #e07070;
  text-align: center;
  font-size: 0.88rem;
  margin: 0;
}

/* Task card entry point */
.action-lines-open-btn {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid #c9a86c;
  background: rgba(201, 168, 108, 0.12);
  color: #c9a86c;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.action-lines-open-btn:hover {
  background: rgba(201, 168, 108, 0.2);
}

.action-lines-meta {
  font-size: 0.82rem;
  color: var(--text-muted, #9898b8);
  margin: 0 0 0.65rem;
  line-height: 1.4;
}

/* Writing tab — lines assignment list */
.writing-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.5rem 0 1.5rem;
  min-height: 100%;
  box-sizing: border-box;
}

.writing-list-header {
  text-align: center;
  padding: 0.5rem 0.75rem 0;
}

.writing-list-header h2 {
  font-family: "Playfair Display", Georgia, serif;
  color: var(--view-primary, #c4a055);
  font-size: 1.25rem;
  margin: 0 0 0.35rem;
}

.writing-list-header p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted, #9898b8);
}

.writing-lines-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.writing-lines-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  width: 100%;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--view-primary, #c4a055) 18%, transparent);
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--view-primary, #c4a055) 5%, transparent),
    rgba(255, 255, 255, 0.02)
  );
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.writing-lines-card:hover,
.writing-lines-card:focus-visible {
  border-color: color-mix(in srgb, var(--view-primary, #c4a055) 45%, transparent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--view-primary, #c4a055) 12%, transparent);
}

.writing-lines-card--draft {
  border-color: color-mix(in srgb, #7ec99a 45%, transparent);
}

.writing-lines-card--active {
  border-color: color-mix(in srgb, var(--view-primary, #c4a055) 55%, transparent);
}

.writing-lines-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.writing-lines-card-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: #f0f0f8;
  line-height: 1.3;
}

.writing-lines-card-progress {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--view-primary, #c4a055);
  letter-spacing: 0.02em;
}

.writing-lines-card-phrase {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 0.92rem;
  color: #c9c9e0;
  line-height: 1.45;
  font-style: italic;
}

.writing-lines-card-action {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--view-primary, #c4a055);
  margin-top: 0.15rem;
}
