:root {
	--pd-black: #1A1A1B;
	--pd-red: #D31118;
	--pd-bg: #F9F7F5;
	--pd-line: #D8D4CE;
	--pd-muted: #6B6760;
	--pd-header-h: 52px;
	--pd-footer-h: 0px;
	--pd-header-max: 960px;
	--pd-font-ui: "Lexend", Verdana, Arial, Helvetica, sans-serif;
	--pd-font-display: "Merriweather", Georgia, "Times New Roman", Times, serif;
	/* LOCKED: Story View manuscript face — do not change without explicit user request */
	--pd-font-draft: "Courier New", Courier, monospace;
	--pd-draft-size: 15px;
	--pd-draft-lh: 1.65;
	--pd-draft-h-size: 16px;
	--pd-draft-h-lh: 1.45;
}

* {
	box-sizing: border-box;
}

html, body {
	margin: 0;
	padding: 0;
	height: 100%;
	height: 100dvh;
	background: var(--pd-bg);
	color: var(--pd-black);
	font-family: var(--pd-font-ui);
	font-size: 15px;
	line-height: 1.45;
}

.pd-header {
	position: sticky;
	top: 0;
	z-index: 50;
	height: var(--pd-header-h);
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 12px;
	padding: 0 14px;
	background: var(--pd-bg);
	border-bottom: 1px solid var(--pd-black);
}

.pd-logo {
	height: 32px;
	width: auto;
	max-width: min(100%, var(--pd-header-max));
	display: block;
}

.pd-workspace {
	--pd-col-gutter: 5px;
	display: grid;
	grid-template-columns: var(--pd-grid-cols, 0.22fr 5px 0.40fr 5px 0.38fr);
	height: calc(100vh - var(--pd-header-h) - var(--pd-footer-h));
	height: calc(100dvh - var(--pd-header-h) - var(--pd-footer-h));
	min-height: 0;
	overflow: hidden;
}

.pd-col-resizer {
	position: relative;
	z-index: 5;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: var(--pd-line);
	cursor: col-resize;
	touch-action: none;
	user-select: none;
}

.pd-col-resizer[hidden] {
	display: none !important;
}

.pd-col-resizer::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: -3px;
	right: -3px;
}

.pd-col-resizer:hover,
.pd-col-resizer:focus-visible,
body.pd-resizing .pd-col-resizer {
	background: var(--pd-muted);
}

body.pd-resizing {
	cursor: col-resize;
	user-select: none;
}

body.pd-resizing iframe,
body.pd-resizing .pd-draft-edit,
body.pd-resizing .pd-chat-log {
	pointer-events: none;
}

.pd-pane {
	min-height: 0;
	min-width: 0;
	border-right: 0;
	background: var(--pd-bg);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.pd-pane[data-panel="work"] {
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}

.pd-pane[hidden] {
	display: none !important;
}

.pd-pane-label {
	padding: 10px 12px 6px;
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--pd-muted);
	border-bottom: 1px solid var(--pd-line);
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.pd-btn-link {
	border: 0;
	background: transparent;
	color: var(--pd-red);
	font: inherit;
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
	padding: 0;
	text-decoration: underline;
}

.pd-placeholder {
	margin: 12px;
	color: var(--pd-muted);
	font-size: 13px;
}

.pd-pane-center {
	position: relative;
	background: #fff;
}

.pd-chat-download {
	appearance: none;
	position: absolute;
	top: 8px;
	right: 22px;
	z-index: 20;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	margin: 0;
	padding: 0;
	border: 1px solid var(--pd-line);
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.92);
	color: var(--pd-black);
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.pd-chat-download svg {
	display: block;
	width: 16px;
	height: 16px;
}

.pd-chat-download:hover {
	border-color: var(--pd-black);
	background: #fff;
}

.pd-provider-label {
	display: none;
}

.pd-chat-log {
	flex: 1 1 0;
	min-height: 0;
	overflow: auto;
	padding: 44px 25px 12px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.pd-msg {
	max-width: 100%;
	padding: 10px 12px;
	border-radius: 6px;
	word-break: break-word;
	cursor: text;
	position: relative;
}

.pd-msg-user {
	align-self: flex-end;
	max-width: 72%;
	background: var(--pd-black);
	color: #fff;
	font-family: var(--pd-font-ui);
	white-space: pre-wrap;
}

.pd-msg-assistant {
	align-self: stretch;
	width: 100%;
	max-width: 100%;
	background: transparent;
	border: none;
	border-radius: 0;
	padding: 4px 0;
	color: var(--pd-black);
	font-family: var(--pd-font-display);
	font-size: 16px;
	line-height: 1.6;
	font-weight: 400;
	box-shadow: none;
}

.pd-msg-error {
	align-self: stretch;
	width: 100%;
	max-width: 100%;
	border: 1px solid var(--pd-red);
	border-radius: 6px;
	padding: 10px 12px;
	color: var(--pd-red);
	font-family: var(--pd-font-ui);
	white-space: pre-wrap;
	background: #fff;
}

.pd-msg-thinking {
	cursor: default;
	color: var(--pd-muted);
	font-style: italic;
	border: none;
	font-family: var(--pd-font-ui);
	box-shadow: none;
	padding: 4px 0;
}

/* Chat Markdown style key — style HTML from renderer, not provider output. */
.pd-msg-body-md {
	white-space: normal;
}

.pd-msg-body-md > *:first-child {
	margin-top: 0;
}

.pd-msg-body-md > *:last-child {
	margin-bottom: 0;
}

.pd-msg-body-md p {
	margin: 0 0 14px;
	font-size: 16px;
	line-height: 1.6;
	font-weight: 400;
}

.pd-msg-body-md strong {
	font-weight: 700;
}

.pd-msg-body-md em {
	font-style: italic;
}

.pd-msg-body-md h1,
.pd-msg-body-md h2,
.pd-msg-body-md h3,
.pd-msg-body-md h4,
.pd-msg-body-md h5,
.pd-msg-body-md h6 {
	font-size: 17px;
	font-weight: 700;
	line-height: 1.35;
	margin: 22px 0 8px;
	color: inherit;
	background: none;
	border: none;
	padding: 0;
}

.pd-msg-body-md ul,
.pd-msg-body-md ol {
	margin: 0 0 14px;
	padding-left: 22px;
}

.pd-msg-body-md li {
	margin: 5px 0;
	line-height: 1.5;
	font-size: 16px;
}

.pd-msg-body-md blockquote {
	margin: 12px 0 16px;
	padding: 0 0 0 14px;
	border: none;
	border-left: 3px solid var(--pd-line);
	background: none;
	color: var(--pd-muted);
	font-style: italic;
}

.pd-msg-body-md blockquote p {
	margin: 0;
}

.pd-msg-body-md a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.pd-msg-body-md code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.9em;
	font-style: normal;
}

.pd-msg-body-md pre {
	margin: 12px 0 14px;
	padding: 10px 12px;
	overflow: auto;
	border: 1px solid var(--pd-line);
	border-radius: 4px;
	font-size: 13px;
	line-height: 1.45;
	background: #faf9f7;
}

.pd-msg-body-md pre code {
	font-size: inherit;
}

.pd-msg-meta,
.pd-msg-model {
	display: block;
	margin: 0;
	font-family: var(--pd-font-ui);
	font-size: 11px;
	letter-spacing: 0.02em;
	color: var(--pd-muted);
	opacity: 0.9;
	text-align: left;
	flex: 0 0 auto;
}

.pd-msg-model {
	opacity: 0.85;
}

.pd-msg-local {
	opacity: 0.9;
	font-weight: 500;
}

.pd-msg-footer {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 8px;
	margin-top: 6px;
	width: 100%;
}

.pd-msg-copy {
	appearance: none;
	margin: 0;
	padding: 4px;
	border: none;
	background: transparent;
	color: var(--pd-muted);
	font-family: var(--pd-font-ui);
	font-size: 11px;
	line-height: 1;
	cursor: pointer;
	opacity: 0.65;
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.pd-msg-copy svg {
	width: 14px;
	height: 14px;
	display: block;
}

.pd-msg-copy:hover {
	opacity: 1;
	color: var(--pd-black);
}

.pd-msg-user .pd-msg-copy {
	color: rgba(255, 255, 255, 0.72);
}

.pd-msg-user .pd-msg-copy:hover {
	color: #fff;
}

.pd-msg-user .pd-msg-meta,
.pd-msg-user .pd-msg-model {
	color: rgba(255, 255, 255, 0.72);
	text-align: left;
}

.pd-thinking-label {
	display: inline-block;
	background: linear-gradient(
		90deg,
		var(--pd-muted) 0%,
		var(--pd-muted) 35%,
		#c4bfb6 50%,
		var(--pd-muted) 65%,
		var(--pd-muted) 100%
	);
	background-size: 200% 100%;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
	animation: pd-thinking-shimmer 1.4s ease-in-out infinite;
}

@keyframes pd-thinking-shimmer {
	0% {
		background-position: 100% 0;
	}
	100% {
		background-position: -100% 0;
	}
}

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
	.pd-thinking-label {
		color: var(--pd-muted);
		-webkit-text-fill-color: unset;
		animation: pd-thinking-pulse 1.2s ease-in-out infinite;
	}

	@keyframes pd-thinking-pulse {
		0%, 100% { opacity: 0.55; }
		50% { opacity: 1; }
	}
}

.pd-toast {
	position: fixed;
	top: 12px;
	left: 50%;
	z-index: 200;
	transform: translateX(-50%) translateY(-120%);
	padding: 10px 16px;
	background: var(--pd-black);
	color: #fff;
	font-family: var(--pd-font-ui);
	font-size: 13px;
	border-radius: 4px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
	transition: transform 0.28s ease;
	pointer-events: none;
}

.pd-toast.is-visible {
	transform: translateX(-50%) translateY(0);
}

.pd-chat-form {
	flex: 0 0 auto;
	border-top: 1px solid var(--pd-line);
	padding: 10px 12px;
	background: #fff;
	position: relative;
}

.pd-phrase-strip {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	min-height: 28px;
	margin: 0 0 10px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--pd-line);
}

.pd-phrase-learned {
	display: contents;
}

.pd-phrase-redraft {
	appearance: none;
	margin: 0;
	padding: 4px 10px;
	border: 1px solid var(--pd-black);
	border-radius: 999px;
	background: var(--pd-black);
	color: #fff;
	font-family: var(--pd-font-ui);
	font-size: 12px;
	line-height: 1.25;
	cursor: pointer;
	flex: 0 0 auto;
	white-space: nowrap;
}

.pd-phrase-redraft:hover {
	background: #333;
	border-color: #333;
}

.pd-safe-send {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-left: auto;
	font-size: 12px;
	line-height: 1.25;
	color: var(--pd-muted);
	cursor: pointer;
	user-select: none;
	white-space: nowrap;
}

.pd-safe-send input {
	margin: 0;
	accent-color: var(--pd-black);
}

.pd-safe-send span {
	color: var(--pd-black);
}

.pd-send-hold {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	margin: 0 0 8px;
	padding: 4px 0;
	font-size: 12px;
	color: var(--pd-muted);
}

.pd-send-hold[hidden] {
	display: none !important;
}

.pd-send-hold-label {
	color: var(--pd-black);
}

.pd-send-hold-undo {
	appearance: none;
	margin: 0;
	padding: 2px 8px;
	border: 1px solid var(--pd-line);
	background: #fff;
	color: var(--pd-black);
	font: inherit;
	font-size: 11px;
	letter-spacing: 0.04em;
	cursor: pointer;
}

.pd-send-hold-undo:hover {
	border-color: var(--pd-black);
}

.pd-msg-pending-send {
	opacity: 0.85;
}

.pd-explore-strip {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
	margin: 0 0 8px;
	padding: 6px 0;
	border-bottom: 1px solid var(--pd-line);
	font-size: 12px;
	line-height: 1.35;
	color: var(--pd-muted);
}

.pd-explore-strip[hidden] {
	display: none !important;
}

.pd-explore-anchor {
	flex: 1 1 auto;
	min-width: 0;
	color: var(--pd-black);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pd-explore-actions {
	display: flex;
	gap: 6px;
	flex: 0 0 auto;
}

.pd-explore-action {
	appearance: none;
	margin: 0;
	padding: 3px 8px;
	border: 1px solid var(--pd-line);
	background: #fff;
	color: var(--pd-black);
	font: inherit;
	font-size: 11px;
	letter-spacing: 0.03em;
	cursor: pointer;
	white-space: nowrap;
}

.pd-explore-lock {
	background: var(--pd-black);
	color: #fff;
	border-color: var(--pd-black);
}

.pd-explore-action:hover {
	opacity: 0.9;
}

.pd-explore-action[hidden] {
	display: none !important;
}

.pd-phrase-pill {
	appearance: none;
	margin: 0;
	padding: 3px 10px;
	border: 1px solid var(--pd-line);
	border-radius: 999px;
	background: #fff;
	color: var(--pd-muted);
	font-family: var(--pd-font-ui);
	font-size: 12px;
	line-height: 1.25;
	cursor: pointer;
	flex: 0 0 auto;
	max-width: 12em;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pd-phrase-pill:hover {
	border-color: var(--pd-black);
	color: var(--pd-black);
}

.pd-phrase-more-wrap {
	position: relative;
	margin-left: auto;
	flex: 0 0 auto;
}

.pd-phrase-more {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	margin: 0;
	padding: 0;
	border: 1px solid transparent;
	border-radius: 4px;
	background: transparent;
	color: var(--pd-muted);
	cursor: pointer;
}

.pd-phrase-more:hover,
.pd-phrase-more[aria-expanded="true"] {
	border-color: var(--pd-line);
	color: var(--pd-black);
	background: var(--pd-bg);
}

.pd-phrase-more svg {
	display: block;
	width: 16px;
	height: 16px;
}

.pd-phrase-popover {
	position: absolute;
	right: 0;
	bottom: calc(100% + 6px);
	z-index: 45;
	width: min(280px, calc(100vw - 32px));
	padding: 8px;
	border: 1px solid var(--pd-black);
	background: #fff;
	box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
}

.pd-phrase-popover-list {
	max-height: 220px;
	overflow: auto;
	margin: 0 0 8px;
}

.pd-phrase-row {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 4px 2px;
	font-size: 12px;
	color: var(--pd-black);
}

.pd-phrase-row-label {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pd-phrase-row button {
	appearance: none;
	margin: 0;
	padding: 2px 6px;
	border: 1px solid var(--pd-line);
	border-radius: 3px;
	background: #fff;
	color: var(--pd-muted);
	font-family: var(--pd-font-ui);
	font-size: 11px;
	cursor: pointer;
	flex: 0 0 auto;
}

.pd-phrase-row button.is-on,
.pd-phrase-row button:hover {
	border-color: var(--pd-black);
	color: var(--pd-black);
}

.pd-phrase-add {
	display: flex;
	gap: 6px;
	align-items: center;
}

.pd-phrase-add-input {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	padding: 6px 8px;
	border: 1px solid var(--pd-line);
	font: inherit;
	font-size: 12px;
	background: var(--pd-bg);
	color: var(--pd-black);
}

.pd-phrase-add-btn {
	appearance: none;
	margin: 0;
	padding: 6px 10px;
	border: 1px solid var(--pd-black);
	background: var(--pd-black);
	color: #fff;
	font-family: var(--pd-font-ui);
	font-size: 12px;
	cursor: pointer;
	flex: 0 0 auto;
}

.pd-phrase-empty {
	padding: 6px 4px;
	font-size: 12px;
	color: var(--pd-muted);
}

.pd-attach-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 8px;
	flex-wrap: wrap;
}

.pd-attach-input {
	font-size: 12px;
	max-width: 100%;
}

.pd-attach-list {
	font-size: 12px;
	color: var(--pd-muted);
	flex: 1 1 auto;
	min-width: 0;
}

.pd-msg-attach {
	margin-top: 6px;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.pd-msg-attach a {
	color: var(--pd-red);
	font-size: 12px;
}

.pd-msg-user .pd-msg-attach a {
	color: #ffd0d0;
}

.pd-chat-input {
	width: 100%;
	resize: none;
	border: 1px solid var(--pd-black);
	padding: 12px;
	min-height: 72px;
	font: inherit;
	line-height: 1.4;
	background: var(--pd-bg);
	color: var(--pd-black);
	box-sizing: border-box;
}

.pd-chat-input:focus {
	outline: 2px solid #808080;
	outline-offset: 1px;
	border-color: #808080;
}

.pd-draft-meta {
	flex: 0 0 auto;
	padding: 8px 12px;
	font-size: 12px;
	color: var(--pd-muted);
	border-bottom: 1px solid var(--pd-line);
}

.pd-story-head {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 10px 12px 6px;
	border-bottom: 1px solid var(--pd-line);
}

.pd-story-head-title {
	font-family: var(--pd-font-ui);
	font-size: 14px;
	font-weight: 400;
	letter-spacing: normal;
	text-transform: none;
	color: var(--pd-black);
	line-height: 1.3;
}

.pd-story-head-tools {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	margin-left: auto;
}

.pd-draft-zoom {
	display: inline-flex;
	align-items: center;
	gap: 2px;
}

.pd-draft-zoom-btn,
.pd-icon-btn {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	margin: 0;
	padding: 0;
	border: 1px solid transparent;
	border-radius: 4px;
	background: transparent;
	color: var(--pd-black);
	cursor: pointer;
}

.pd-draft-zoom-btn:hover,
.pd-icon-btn:hover {
	border-color: var(--pd-line);
	background: var(--pd-bg);
}

.pd-draft-zoom-btn:disabled,
.pd-icon-btn:disabled {
	opacity: 0.35;
	cursor: default;
}

.pd-draft-zoom-btn svg,
.pd-icon-btn svg {
	display: block;
	width: 16px;
	height: 16px;
}

.pd-draft-edit {
	flex: 1 1 auto;
	width: 100%;
	margin: 0;
	padding: 12px;
	border: 0;
	outline: none;
	overflow: auto;
	word-break: break-word;
	font-family: var(--pd-font-draft) !important;
	font-size: var(--pd-draft-size) !important;
	line-height: var(--pd-draft-lh) !important;
	font-weight: 400 !important;
	font-style: normal !important;
	background: #fff;
	color: var(--pd-black);
	box-shadow: none;
	min-height: 120px;
	white-space: pre-wrap !important;
	overflow-wrap: break-word;
	word-wrap: break-word;
}

/* Plain Courier only — no markdown weight/style, no paragraph gaps */
#pd-draft-edit,
#pd-draft-edit * {
	font-family: var(--pd-font-draft) !important;
	font-size: var(--pd-draft-size) !important;
	line-height: var(--pd-draft-lh) !important;
	font-weight: 400 !important;
	font-style: normal !important;
	color: var(--pd-black) !important;
	background: transparent !important;
	text-decoration: none !important;
}

#pd-draft-edit strong,
#pd-draft-edit b,
#pd-draft-edit em,
#pd-draft-edit i,
#pd-draft-edit h1,
#pd-draft-edit h2,
#pd-draft-edit h3,
#pd-draft-edit h4,
#pd-draft-edit h5,
#pd-draft-edit h6,
#pd-draft-edit a,
#pd-draft-edit code {
	font-weight: 400 !important;
	font-style: normal !important;
	font-size: inherit !important;
}

#pd-draft-edit p,
#pd-draft-edit div {
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
	background: none !important;
	display: block;
}

#pd-draft-edit p + p,
#pd-draft-edit div + div {
	margin-top: 0 !important;
}

.pd-draft-edit:focus {
	outline: none;
	border: 0;
	box-shadow: none;
}

.pd-draft-edit:empty::before {
	content: attr(data-placeholder);
	color: var(--pd-muted);
	pointer-events: none;
}

.pd-draft-actions {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	padding: 8px 12px;
	border-top: 1px solid var(--pd-line);
}

.pd-draft-actions .pd-btn {
	margin: 0;
	max-width: none;
	text-align: center;
	box-sizing: border-box;
}

#pd-draft-save {
	width: 7.5em;
	min-width: 7.5em;
}

#pd-draft-dismiss {
	width: auto;
	min-width: 7.5em;
}

.pd-dropup {
	position: relative;
	display: inline-flex;
}

.pd-dropup-menu {
	position: absolute;
	left: 0;
	bottom: calc(100% + 4px);
	z-index: 40;
	min-width: 100%;
	padding: 4px;
	background: #fff;
	border: 1px solid var(--pd-black);
	box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
}

.pd-dropup-item {
	display: block;
	width: 100%;
	margin: 0;
	padding: 8px 12px;
	border: 0;
	background: transparent;
	color: var(--pd-black);
	font-family: var(--pd-font-ui);
	font-size: 13px;
	text-align: left;
	cursor: pointer;
	white-space: nowrap;
}

.pd-dropup-item:hover {
	background: var(--pd-bg);
}

.pd-dropup-down .pd-dropup-menu {
	top: calc(100% + 4px);
	bottom: auto;
	left: auto;
	right: 0;
	min-width: 5.5em;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.pd-btn:disabled,
.pd-btn[disabled] {
	opacity: 0.45;
	cursor: not-allowed;
}

.pd-field-label {
	display: block;
	margin: 10px 12px 4px;
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--pd-muted);
}

.pd-input {
	display: block;
	width: calc(100% - 24px);
	max-width: 100%;
	margin: 0 12px 8px;
	padding: 8px;
	border: 1px solid var(--pd-line);
	background: #fff;
	color: var(--pd-black);
	font: inherit;
	box-sizing: border-box;
}

.pd-story-row {
	display: flex;
	align-items: center;
	gap: 4px;
	margin: 0 12px 8px;
	width: calc(100% - 24px);
	box-sizing: border-box;
}

.pd-story-row .pd-story,
.pd-story-row .pd-story-edit {
	flex: 1 1 auto;
	min-width: 0;
	width: auto;
	margin: 0;
}

.pd-story-row .pd-story[hidden],
.pd-story-row .pd-story-edit[hidden] {
	display: none !important;
}

select.pd-story {
	cursor: pointer;
}

.pd-story-icon {
	appearance: none;
	flex: 0 0 auto;
	margin: 0;
	padding: 6px 8px;
	border: 1px solid var(--pd-line);
	background: #fff;
	color: var(--pd-black);
	font: inherit;
	font-size: 13px;
	line-height: 1;
	cursor: pointer;
}

.pd-story-icon:hover {
	border-color: var(--pd-black);
}

.pd-story-icon:disabled {
	opacity: 0.35;
	cursor: default;
}

.pd-story-row.is-editing .pd-story-icon {
	display: none;
}

.pd-archive-copy {
	margin: 0 0 14px;
	font-size: 14px;
	line-height: 1.45;
	color: var(--pd-black);
	font-family: var(--pd-font-display);
}

.pd-lock-input {
	resize: vertical;
	min-height: 72px;
}

.pd-btn {
	margin: 0 12px 10px;
	padding: 6px 10px;
	border: 1px solid var(--pd-black);
	background: var(--pd-black);
	color: #fff;
	font: inherit;
	cursor: pointer;
	max-width: calc(100% - 24px);
}

.pd-btn-muted {
	background: #fff;
	color: var(--pd-black);
}

.pd-hint {
	margin: 0 12px 8px;
	font-size: 11px;
	line-height: 1.4;
	color: var(--pd-muted);
	font-family: var(--pd-font-ui);
}

.pd-memory-list {
	margin: 0 12px 12px;
	padding: 8px;
	max-height: 220px;
	overflow: auto;
	border: 1px solid var(--pd-line);
	background: #fff;
	font-size: 12px;
	line-height: 1.4;
	color: var(--pd-muted);
	font-family: var(--pd-font-ui);
	flex-shrink: 0;
	min-height: 3em;
}

.pd-memory-item {
	margin-bottom: 8px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--pd-line);
}

.pd-memory-item:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: none;
}

.pd-memory-item strong {
	display: block;
	color: var(--pd-black);
	font-size: 11px;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	margin-bottom: 3px;
}

.pd-memory-item p {
	margin: 0;
	color: var(--pd-black);
	font-family: var(--pd-font-display);
	font-size: 13px;
	line-height: 1.45;
}

.pd-ctx-menu {
	position: fixed;
	z-index: 60;
	min-width: 200px;
	max-width: min(280px, calc(100vw - 16px));
	max-height: min(70vh, 420px);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 6px 0;
	background: #fff;
	border: 1px solid var(--pd-line);
	border-radius: 8px;
	box-shadow: 0 8px 28px rgba(26, 26, 27, 0.18);
	font-family: var(--pd-font-ui);
	font-size: 13px;
}

.pd-ctx-menu[hidden] {
	display: none !important;
}

.pd-ctx-item {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	margin: 0;
	padding: 8px 14px;
	border: none;
	background: transparent;
	color: var(--pd-black);
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.pd-ctx-item:hover,
.pd-ctx-item:focus {
	background: #f3f1ec;
	outline: none;
}

.pd-ctx-icon {
	flex: 0 0 16px;
	width: 16px;
	text-align: center;
	color: var(--pd-muted);
	font-size: 12px;
	line-height: 1;
}

.pd-ctx-sep {
	height: 1px;
	margin: 6px 0;
	background: var(--pd-line);
	border: none;
}

.pd-save-panel {
	position: fixed;
	inset: 0;
	z-index: 50;
	background: rgba(26, 26, 27, 0.28);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.pd-save-panel[hidden] {
	display: none !important;
}

.pd-save-panel-inner {
	width: min(480px, 100%);
	background: #fff;
	border: 1px solid var(--pd-line);
	padding: 16px;
	box-shadow: 0 12px 40px rgba(26, 26, 27, 0.16);
	font-family: var(--pd-font-ui);
}

.pd-save-quote {
	display: block;
	width: 100%;
	box-sizing: border-box;
	margin: 0 0 14px;
	padding: 10px 12px;
	border: none;
	border-left: 3px solid var(--pd-line);
	border-radius: 0;
	resize: vertical;
	font-family: var(--pd-font-display);
	font-size: 14px;
	line-height: 1.5;
	color: var(--pd-black);
	min-height: 88px;
	max-height: 200px;
	background: #faf9f7;
}

.pd-save-quote:focus {
	outline: none;
	border-left-color: var(--pd-black);
}

.pd-save-cats {
	display: flex;
	flex-wrap: nowrap;
	gap: 4px;
	margin: 0 0 6px;
	overflow-x: auto;
}

.pd-save-cat {
	appearance: none;
	border: 1px solid var(--pd-line);
	background: #fff;
	color: var(--pd-black);
	padding: 4px 8px;
	font: inherit;
	font-size: 11px;
	cursor: pointer;
	flex: 0 0 auto;
	white-space: nowrap;
}

.pd-save-cat.is-active {
	background: var(--pd-black);
	color: #fff;
	border-color: var(--pd-black);
}

.pd-save-cat-hint {
	margin: 0 0 12px;
	font-size: 12px;
	line-height: 1.4;
	color: var(--pd-muted);
	min-height: 1.4em;
}

.pd-save-about-hint {
	margin: 4px 0 0;
}

.pd-save-lock-row {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 12px 0;
	font-size: 12px;
	line-height: 1.35;
	color: var(--pd-muted);
	cursor: pointer;
}

.pd-save-lock-row input {
	margin-top: 2px;
}

.pd-save-actions {
	display: flex;
	gap: 8px;
}

.pd-save-actions .pd-btn {
	max-width: none;
	flex: 1 1 auto;
}

.pd-file-search {
	margin: 8px 12px 12px;
	padding: 8px;
	max-height: 180px;
	overflow: auto;
	border: 1px solid var(--pd-line);
	background: #fff;
	font-size: 12px;
	line-height: 1.35;
	color: var(--pd-muted);
	flex-shrink: 0;
	min-height: 3em;
}

.pd-file-hit {
	margin-bottom: 8px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--pd-line);
}

.pd-file-hit strong {
	display: block;
	color: var(--pd-black);
	margin-bottom: 4px;
}

.pd-boot-error {
	position: fixed;
	left: 12px;
	right: 12px;
	bottom: 12px;
	padding: 10px 12px;
	background: #fff;
	border: 1px solid var(--pd-red);
	color: var(--pd-red);
	z-index: 100;
}

.pd-mobile-tabs {
	display: none;
}

.pd-ai-stats {
	margin: 0 12px 16px;
	padding: 10px;
	border: 1px solid var(--pd-line);
	background: #fff;
	font-size: 13px;
	line-height: 1.4;
	color: var(--pd-black);
}

.pd-ai-stats-provider {
	font-weight: 700;
	text-transform: lowercase;
}

.pd-ai-stats-model {
	color: var(--pd-muted);
	margin: 2px 0 8px;
	word-break: break-word;
}

.pd-ai-stats-row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 14px;
	margin-top: 4px;
}

.pd-ai-stats-empty {
	color: var(--pd-muted);
	font-size: 12px;
}

@media (max-width: 900px) {
	:root {
		--pd-mobile-tabs-h: 40px;
	}

	.pd-mobile-tabs {
		display: flex;
		position: sticky;
		top: var(--pd-header-h);
		z-index: 40;
		height: var(--pd-mobile-tabs-h);
		border-bottom: 1px solid var(--pd-black);
		background: var(--pd-bg);
	}

	.pd-mobile-tab {
		flex: 1;
		border: 0;
		border-right: 1px solid var(--pd-line);
		background: transparent;
		color: var(--pd-muted);
		font: inherit;
		font-size: 12px;
		letter-spacing: 0.06em;
		text-transform: uppercase;
		cursor: pointer;
	}

	.pd-mobile-tab:last-child {
		border-right: 0;
	}

	.pd-mobile-tab.is-active {
		color: var(--pd-black);
		font-weight: 700;
		box-shadow: inset 0 -2px 0 var(--pd-red);
	}

	.pd-workspace {
		display: flex;
		flex-direction: column;
		grid-template-columns: none;
		grid-template-rows: none;
		height: calc(100vh - var(--pd-header-h) - var(--pd-mobile-tabs-h) - var(--pd-footer-h));
		height: calc(100dvh - var(--pd-header-h) - var(--pd-mobile-tabs-h) - var(--pd-footer-h));
		min-height: 0;
		overflow: hidden;
	}

	.pd-col-resizer {
		display: none;
	}

	.pd-pane {
		display: none;
		flex: 1 1 auto;
		min-height: 0;
		border-right: 0;
		border-bottom: 0;
		overflow: hidden;
	}

	.pd-pane.is-active {
		display: flex;
	}

	.pd-pane[data-panel="work"].is-active,
	.pd-pane[data-panel="manuscript"].is-active {
		overflow: auto;
	}

	.pd-pane[data-panel="conversation"].is-active {
		overflow: hidden;
	}

	.pd-chat-form {
		padding: 8px 12px;
		padding-bottom: max(8px, env(safe-area-inset-bottom));
	}

	.pd-chat-input {
		max-height: 28vh;
	}

	.pd-input,
	.pd-btn {
		width: calc(100% - 24px);
		max-width: calc(100% - 24px);
	}

	.pd-draft-actions .pd-btn {
		width: auto;
		max-width: none;
	}

	#pd-draft-save,
	#pd-draft-dismiss {
		width: 7.5em;
		min-width: 7.5em;
	}

}

@media (min-width: 901px) {
	.pd-mobile-tabs {
		display: none !important;
	}

	.pd-pane {
		display: flex !important;
	}
}

/* —— Auth / guest land —— */
body.is-guest .pd-app {
	display: none !important;
}

body.is-signed-in .pd-guest-land {
	display: none !important;
}

body.is-signed-in #pd-auth-shell {
	display: none !important;
}

.pd-guest-land {
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 28px;
	padding: 24px;
	background: var(--pd-bg);
}

.pd-guest-logo-btn {
	border: 0;
	background: transparent;
	padding: 0;
	cursor: pointer;
}

.pd-guest-logo {
	display: block;
	width: min(720px, 70vw);
	height: auto;
}

body.is-signed-in {
	--pd-footer-h: 36px;
	overflow: hidden;
}

body.is-signed-in .pd-app-footer {
	display: block;
}

.pd-site-footer {
	text-align: center;
	font-size: 12px;
	line-height: 1.5;
	color: var(--pd-muted);
	font-family: var(--pd-font-ui);
}

.pd-app-footer {
	display: none;
	padding: 10px 14px 14px;
}

body.is-guest .pd-app-footer {
	display: none !important;
}

.pd-auth-shell {
	position: fixed;
	inset: 0;
	z-index: 80;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(26, 26, 27, 0.45);
}

.pd-auth-shell[hidden] {
	display: none !important;
}

.pd-auth-modal {
	position: relative;
	width: min(400px, 100%);
	padding: 22px 20px 18px;
	background: #fff;
	border: 1px solid var(--pd-line);
	box-shadow: 0 12px 40px rgba(26, 26, 27, 0.2);
}

.pd-auth-close {
	position: absolute;
	top: 8px;
	right: 10px;
	border: 0;
	background: transparent;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	color: var(--pd-muted);
}

.pd-auth-title {
	margin: 0 0 14px;
	font-size: 18px;
	font-weight: 500;
	font-family: var(--pd-font-ui);
	text-align: center;
}

.pd-auth-tabs {
	display: flex;
	gap: 0;
	margin-bottom: 14px;
	border-bottom: 1px solid var(--pd-line);
}

.pd-auth-tab {
	flex: 1;
	border: 0;
	background: transparent;
	padding: 8px;
	font: inherit;
	font-size: 13px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--pd-muted);
	cursor: pointer;
}

.pd-auth-tab.is-active {
	color: var(--pd-black);
	font-weight: 600;
	box-shadow: inset 0 -2px 0 var(--pd-red);
}

.pd-auth-form .pd-input {
	width: 100%;
	max-width: none;
	margin: 0 0 10px;
}

.pd-auth-form .pd-field-label {
	margin: 0 0 4px;
}

.pd-auth-submit {
	width: 100%;
	max-width: none;
	margin: 8px 0 0;
}

.pd-header-right {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-left: auto;
}

.pd-user-email {
	font-size: 12px;
	color: var(--pd-muted);
	max-width: 180px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pd-sign-out {
	appearance: none;
	border: 1px solid var(--pd-line);
	background: #fff;
	color: var(--pd-black);
	font: inherit;
	font-size: 12px;
	padding: 4px 8px;
	cursor: pointer;
}

.pd-sign-out:hover {
	border-color: var(--pd-black);
}

.pd-btn-new-project {
	display: block;
	width: calc(100% - 24px);
	margin: 0 12px 12px;
	background: #fff;
	color: var(--pd-black);
	border: 1px solid var(--pd-line);
	max-width: calc(100% - 24px);
}

.pd-btn-new-project:hover {
	border-color: var(--pd-black);
}

.pd-btn-new-project:disabled {
	opacity: 0.35;
	cursor: default;
}

.pd-story-icon-gear {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 5px 7px;
}

.pd-settings-modal-inner {
	width: min(520px, 100%);
	max-height: min(85vh, 720px);
	overflow-y: auto;
	background: #fff;
	border: 1px solid var(--pd-line);
	padding: 16px;
	box-shadow: 0 12px 40px rgba(26, 26, 27, 0.16);
	font-family: var(--pd-font-ui);
	box-sizing: border-box;
}

.pd-settings-modal-inner .pd-input,
.pd-settings-modal-inner .pd-lock-input {
	width: 100%;
	max-width: 100%;
	margin: 0 0 8px;
	box-sizing: border-box;
}

.pd-settings-modal-inner .pd-btn {
	margin: 0 0 14px;
	max-width: 100%;
}

.pd-settings-modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}

.pd-settings-modal-head .pd-field-label {
	margin: 0;
}

.pd-settings-close {
	appearance: none;
	border: none;
	background: transparent;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	color: var(--pd-black);
	padding: 0 4px;
}

.pd-new-project-inner {
	width: min(640px, 100%);
	background: #fff;
	border: 1px solid var(--pd-line);
	padding: 20px;
	box-shadow: 0 12px 40px rgba(26, 26, 27, 0.16);
	font-family: var(--pd-font-ui);
	box-sizing: border-box;
}

.pd-new-project-heading {
	margin: 0 0 16px;
	font-family: var(--pd-font-display);
	font-size: 22px;
	font-weight: 600;
	color: var(--pd-black);
}

.pd-new-project-title-input {
	display: block;
	width: 100%;
	box-sizing: border-box;
	margin: 0 0 16px;
}

.pd-start-cards {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin: 0 0 12px;
}

.pd-start-card {
	display: block;
	cursor: pointer;
	margin: 0;
}

.pd-start-card-input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.pd-start-card-body {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 96px;
	padding: 12px 10px;
	border: 1px solid var(--pd-line);
	background: #fff;
	text-align: center;
	box-sizing: border-box;
}

.pd-start-card-input:checked + .pd-start-card-body {
	border-color: #2563eb;
	box-shadow: 0 0 0 1px #2563eb;
}

.pd-start-card-icon {
	font-size: 22px;
	line-height: 1;
	color: var(--pd-muted);
	font-family: var(--pd-font-display);
}

.pd-start-card-label {
	font-size: 13px;
	line-height: 1.35;
	color: var(--pd-black);
}

.pd-new-project-hint {
	margin: 0 0 16px;
	font-size: 12px;
	color: var(--pd-muted);
}

.pd-new-project-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 12px;
}

.pd-btn-text {
	appearance: none;
	border: none;
	background: transparent;
	font: inherit;
	font-size: 14px;
	color: var(--pd-black);
	cursor: pointer;
	padding: 6px 8px;
}

.pd-btn-create-project {
	margin: 0;
	max-width: none;
}

.pd-btn-create-project:disabled {
	opacity: 0.45;
	cursor: default;
}

.pd-pipeline-bar {
	display: none !important;
}

.pd-msg-moment-tools {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 8px;
	margin-top: 4px;
}

.pd-msg-reply-btn {
	appearance: none;
	border: 0;
	background: transparent;
	color: var(--pd-muted);
	font: inherit;
	font-size: 12px;
	cursor: pointer;
	padding: 2px 4px;
}

.pd-msg-reply-btn:hover {
	color: var(--pd-black);
}

.pd-msg-explore-btn {
	appearance: none;
	border: 0;
	background: transparent;
	color: var(--pd-muted);
	font: inherit;
	font-size: 11px;
	letter-spacing: 0.04em;
	cursor: pointer;
	padding: 2px 4px;
}

.pd-msg-explore-btn:hover {
	color: var(--pd-black);
}

.pd-msg-reply-draft {
	margin-top: 6px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.pd-msg-reply-draft textarea {
	width: 100%;
	min-height: 56px;
	font: inherit;
	font-size: 13px;
	padding: 6px 8px;
	border: 1px solid var(--pd-line);
	resize: vertical;
	box-sizing: border-box;
}

.pd-msg-reply-draft-actions {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
}

.pd-layout-popover {
	--pd-layout-caret-right: 24px;
	position: fixed;
	top: calc(var(--pd-header-h) + 8px);
	right: 12px;
	z-index: 80;
	width: min(220px, calc(100vw - 24px));
	background: #fff;
	border: 1px solid var(--pd-line);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	padding: 12px 12px 12px;
}

.pd-layout-popover-caret {
	position: absolute;
	top: -7px;
	right: var(--pd-layout-caret-right);
	width: 12px;
	height: 12px;
	background: #fff;
	border-left: 1px solid var(--pd-line);
	border-top: 1px solid var(--pd-line);
	transform: translateX(50%) rotate(45deg);
	pointer-events: none;
}

.pd-layout-popover[hidden] {
	display: none !important;
}

.pd-layout-list {
	list-style: none;
	margin: 10px 0 0;
	padding: 0;
}

.pd-layout-item {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 4px;
	border-bottom: 1px solid var(--pd-line);
	font-size: 13px;
	cursor: grab;
}

.pd-layout-item:last-child {
	border-bottom: 0;
}

.pd-layout-item.is-dragging {
	opacity: 0.45;
}

.pd-layout-item.is-drag-over {
	background: rgba(0, 0, 0, 0.04);
}

.pd-layout-handle {
	flex: 0 0 auto;
	color: var(--pd-muted);
	font-size: 11px;
	letter-spacing: -0.08em;
	user-select: none;
	cursor: grab;
}

.pd-layout-item label {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	min-width: 0;
}

.pd-header-icon {
	appearance: none;
	border: 1px solid transparent;
	background: transparent;
	color: var(--pd-muted);
	padding: 4px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.pd-header-icon:hover {
	color: var(--pd-black);
	border-color: var(--pd-line);
}

.pd-work-status {
	margin: 0 12px 16px;
	padding: 10px 0 0;
	border-top: 1px solid var(--pd-line);
	font-size: 12px;
	line-height: 1.45;
	color: var(--pd-muted);
}

.pd-work-status-title {
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--pd-muted);
	margin: 0 0 6px;
}

.pd-work-status-line {
	color: var(--pd-black);
	margin: 0 0 4px;
}

.pd-work-status-list {
	margin: 6px 0 0;
	padding: 0;
	list-style: none;
}

.pd-work-status-list li {
	margin: 0 0 2px;
}

.pd-work-tree {
	margin: 0 12px 16px;
	font-size: 12px;
	line-height: 1.4;
	color: var(--pd-black);
}

.pd-work-tree.is-flash .pd-work-group {
	animation: pd-work-flash 1.2s ease;
}

@keyframes pd-work-flash {
	0% { background: transparent; }
	30% { background: #f3f1ec; }
	100% { background: transparent; }
}

.pd-work-empty {
	color: var(--pd-muted);
	margin: 0;
}

.pd-work-group {
	margin: 0 0 10px;
	padding: 4px 0;
	border-radius: 2px;
}

.pd-work-kind {
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--pd-muted);
	margin: 0 0 4px;
}

.pd-work-object {
	margin: 0 0 6px 0;
}

.pd-work-object-label {
	font-weight: 600;
	margin: 0 0 2px;
}

.pd-work-statements {
	margin: 0;
	padding: 0 0 0 12px;
	list-style: disc;
}

.pd-work-statements li {
	margin: 0 0 2px;
}

.pd-work-hard {
	font-weight: 600;
}

.pd-work-statements li.pd-work-stmt {
	cursor: pointer;
	border-radius: 2px;
	padding: 1px 2px;
}

.pd-work-statements li.pd-work-stmt:hover,
.pd-work-statements li.pd-work-stmt.is-focus {
	background: #f3f1ec;
}

.pd-work-focus-banner {
	margin: 0 12px 10px;
	padding: 8px 10px;
	border: 1px solid var(--pd-line);
	font-size: 12px;
	line-height: 1.4;
	background: #fafafa;
}

.pd-work-focus-banner button {
	margin-left: 8px;
	font: inherit;
	font-size: 11px;
	cursor: pointer;
	border: 1px solid var(--pd-line);
	background: #fff;
	padding: 2px 8px;
}

.pd-work-detail {
	position: fixed;
	z-index: 80;
	width: min(340px, calc(100vw - 24px));
	max-height: min(70vh, 480px);
	overflow: auto;
	background: #fff;
	border: 1px solid var(--pd-line);
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
	padding: 14px 16px 16px;
}

.pd-work-detail-close {
	position: absolute;
	top: 6px;
	right: 8px;
	border: 0;
	background: transparent;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	color: var(--pd-muted);
}

.pd-work-detail-statement {
	margin: 0 0 10px;
	font-size: 13px;
	line-height: 1.45;
	color: var(--pd-black);
	padding-right: 18px;
}

.pd-work-detail-meta {
	margin: 0 0 12px;
	font-size: 12px;
	line-height: 1.4;
}

.pd-work-detail-meta dt {
	color: var(--pd-muted);
	font-size: 11px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	margin: 8px 0 2px;
}

.pd-work-detail-meta dd {
	margin: 0;
	color: var(--pd-black);
}

.pd-work-detail-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 10px;
}

.pd-work-detail-actions button {
	font: inherit;
	font-size: 12px;
	cursor: pointer;
	border: 1px solid var(--pd-line);
	background: #fff;
	padding: 5px 10px;
}

.pd-work-detail-history {
	border-top: 1px solid var(--pd-line);
	padding-top: 8px;
	font-size: 12px;
	color: var(--pd-muted);
}

.pd-work-detail-history li {
	margin: 0 0 6px;
}

.pd-msg-flash {
	animation: pd-msg-flash 1.4s ease;
}

@keyframes pd-msg-flash {
	0% { background: transparent; }
	25% { background: #f3f1ec; }
	100% { background: transparent; }
}

.pd-draft-versions-btn {
	font-size: 12px;
	padding: 4px 8px;
	margin-right: 4px;
}

.pd-versions-inner {
	max-width: 420px;
}

.pd-versions-list {
	list-style: none;
	margin: 0 0 16px;
	padding: 0;
	max-height: 50vh;
	overflow: auto;
}

.pd-versions-list li {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px;
	padding: 10px 0;
	border-bottom: 1px solid var(--pd-line);
	font-size: 13px;
}

.pd-versions-list .pd-ver-meta {
	flex: 1 1 160px;
	color: var(--pd-muted);
	font-size: 12px;
}

.pd-versions-list button {
	font: inherit;
	font-size: 12px;
	cursor: pointer;
	border: 1px solid var(--pd-line);
	background: #fff;
	padding: 4px 8px;
}

.pd-ms-view-switch {
	display: inline-flex;
	border: 1px solid var(--pd-line);
	margin-right: 8px;
}

.pd-ms-view-btn {
	font: inherit;
	font-size: 11px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	border: 0;
	background: #fff;
	padding: 4px 8px;
	cursor: pointer;
	color: var(--pd-muted);
}

.pd-ms-view-btn.is-active {
	background: #f3f1ec;
	color: var(--pd-black);
}

.pd-mindmap {
	flex: 1 1 auto;
	min-height: 200px;
	margin: 0 12px 12px;
	border: 1px solid var(--pd-line);
	background: #fafafa;
	position: relative;
	overflow: auto;
}

.pd-mindmap-canvas {
	position: relative;
	min-width: 100%;
	min-height: 280px;
	padding: 24px;
}

.pd-mindmap-node {
	position: absolute;
	max-width: 160px;
	padding: 8px 10px;
	border: 1px solid var(--pd-line);
	background: #fff;
	font-size: 12px;
	line-height: 1.35;
	cursor: pointer;
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.pd-mindmap-node:hover {
	border-color: var(--pd-black);
}

.pd-mindmap-hint {
	margin: 0 12px 8px;
	font-size: 11px;
	color: var(--pd-muted);
}

.pd-composer-replies {
	margin: 0 12px 8px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.pd-composer-replies[hidden] {
	display: none !important;
}

.pd-composer-reply-block {
	border: 1px solid var(--pd-line);
	background: #fafafa;
	padding: 8px 10px;
	font-size: 12px;
	line-height: 1.4;
}

.pd-composer-reply-re {
	color: var(--pd-muted);
	margin: 0 0 4px;
	font-style: italic;
}

.pd-composer-reply-text {
	margin: 0;
	white-space: pre-wrap;
	color: var(--pd-black);
}

.pd-composer-reply-remove {
	appearance: none;
	border: 0;
	background: transparent;
	color: var(--pd-muted);
	font: inherit;
	font-size: 11px;
	cursor: pointer;
	padding: 0;
	margin-top: 4px;
}

.pd-msg-moment {
	position: relative;
	margin: 0 0 0.75em;
}

.pd-msg-moment:last-child {
	margin-bottom: 0;
}
