:root {
    --gf-purple: #673ab7;
    --gf-purple-dark: #5629a3;
    --gf-blue: #4285f4;
    --gf-bg: #f0ebf8;
    --gf-ink: #202124;
    --gf-muted: #5f6368;
    --gf-line: #dadce0;
}
* { box-sizing: border-box; }
html, body.gf-body {
    margin: 0;
    background: var(--gf-bg);
    color: var(--gf-ink);
    font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
}
.app-main.gf-shell {
    background: var(--gf-bg);
    padding: 0 !important;
    min-height: calc(100vh - 4.5rem);
}
.gf-shell .gf-top { position: sticky; top: 0; z-index: 15; }
.gf-shell .gf-wrap { padding-right: 72px; }
.gf-shell .gf-float { right: 12px; }
.gf-top {
    position: sticky; top: 0; z-index: 40;
    background: #fff;
    border-bottom: 1px solid var(--gf-line);
    display: flex; align-items: center; gap: 10px;
    padding: 8px 16px;
    min-height: 64px;
}
.gf-doc-icon {
    width: 40px; height: 40px; border-radius: 8px;
    background: var(--gf-purple); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; text-decoration: none;
}
.gf-top-title {
    border: 0; background: transparent; font-size: 18px; font-weight: 400;
    color: var(--gf-ink); min-width: 160px; max-width: 280px; outline: none;
    padding: 4px 6px; border-radius: 4px;
}
.gf-top-title:hover, .gf-top-title:focus { background: #f1f3f4; }
.gf-top-actions { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.gf-icon {
    width: 40px; height: 40px; border: 0; background: none; border-radius: 50%;
    color: var(--gf-muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
    font-size: 20px; text-decoration: none;
}
.gf-icon:hover { background: #f1f3f4; color: var(--gf-ink); }
.gf-publish {
    background: var(--gf-purple); color: #fff; border: 0; border-radius: 4px;
    font-weight: 500; font-size: 14px; padding: 8px 24px; cursor: pointer; margin-left: 8px;
}
.gf-publish:hover { background: var(--gf-purple-dark); }
.gf-tabs {
    background: #fff; display: flex; justify-content: center; gap: 28px;
    border-bottom: 1px solid var(--gf-line);
}
.gf-tabs button, .gf-tabs a {
    appearance: none; background: none; border: 0; color: var(--gf-muted);
    font-weight: 500; font-size: 14px; padding: 14px 4px 12px; cursor: pointer;
    text-decoration: none; position: relative; font-family: inherit;
}
.gf-tabs .is-on { color: var(--gf-purple); }
.gf-tabs .is-on::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
    background: var(--gf-purple); border-radius: 3px 3px 0 0;
}
.gf-wrap {
    max-width: 770px; margin: 12px auto 80px; padding: 0 12px 0 8px;
    position: relative;
}
.gf-float {
    position: absolute; right: -60px; top: 12px;
    width: 48px; background: #fff; border-radius: 8px;
    box-shadow: 0 1px 2px 0 rgba(60,64,67,.3), 0 2px 6px 2px rgba(60,64,67,.15);
    display: flex; flex-direction: column; padding: 4px 0; z-index: 15;
}
.gf-float button {
    height: 48px; border: 0; background: none; color: var(--gf-muted); cursor: pointer; font-size: 22px;
}
.gf-float button:hover { color: var(--gf-purple); }
.gf-card {
    background: #fff; border-radius: 8px; margin-bottom: 12px;
    box-shadow: 0 1px 2px 0 rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);
    position: relative; overflow: visible;
}
.gf-card.is-on { box-shadow: 0 1px 2px 0 rgba(60,64,67,.3), 0 2px 6px 2px rgba(60,64,67,.15); }
.gf-card.is-on::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--gf-blue);
}
.gf-strip { height: 10px; background: var(--gf-purple); border-radius: 8px 8px 0 0; }
.gf-body { padding: 0 24px 16px; }
.gf-grip {
    display: grid; grid-template-columns: 4px 4px; gap: 3px 4px;
    width: 12px; margin: 8px auto 4px; cursor: grab; padding: 4px;
}
.gf-grip i {
    width: 4px; height: 4px; background: #dadce0; border-radius: 50%; display: block;
}
.gf-qrow { display: flex; gap: 16px; align-items: flex-start; padding-top: 8px; }
.gf-q {
    flex: 1; border: 0; border-bottom: 1px solid transparent; background: #f8f9fa;
    font-size: 16px; padding: 12px 8px; outline: none; border-radius: 4px 4px 0 0;
    font-family: inherit;
}
.gf-q:focus { border-bottom-color: var(--gf-purple); box-shadow: 0 2px 0 var(--gf-purple); background: #fff; }
.gf-title {
    width: 100%; border: 0; border-bottom: 1px solid #e0e0e0; background: #f8f9fa;
    font-size: 32px; padding: 12px 8px 8px; margin-top: 16px; outline: none; font-family: inherit;
}
.gf-title:focus { border-bottom-color: var(--gf-purple); box-shadow: 0 2px 0 var(--gf-purple); background: #fff; }
.gf-desc {
    width: 100%; border: 0; border-bottom: 1px solid #e0e0e0; background: transparent;
    font-size: 14px; padding: 10px 8px; margin-top: 8px; outline: none; resize: vertical;
    min-height: 40px; font-family: inherit; color: var(--gf-muted);
}
.gf-desc:focus { border-bottom-color: var(--gf-purple); box-shadow: 0 2px 0 var(--gf-purple); color: var(--gf-ink); }
.gf-type-wrap { position: relative; width: 240px; flex-shrink: 0; }
.gf-type-btn {
    width: 100%; display: flex; align-items: center; gap: 10px;
    border: 1px solid var(--gf-line); background: #fff; border-radius: 4px;
    padding: 8px 10px; cursor: pointer; font-size: 14px; color: var(--gf-ink); font-family: inherit;
}
.gf-type-btn:hover { background: #f8f9fa; }
.gf-type-btn .caret { margin-left: auto; color: var(--gf-muted); }
.gf-type-menu {
    display: none; position: absolute; right: 0; top: 110%; z-index: 80;
    width: 280px; background: #fff; border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,.2); padding: 8px 0; max-height: 360px; overflow: auto;
}
.gf-float { overflow: visible; }
.gf-add-menu {
    display: none; position: absolute; right: 56px; top: 0; z-index: 90;
    width: 260px; background: #fff; border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,.2); padding: 8px 0; max-height: 420px; overflow: auto;
}
.gf-add-menu.open { display: block; }
.gf-add-menu button {
    width: 100%; display: flex; align-items: center; gap: 12px;
    border: 0; background: none; padding: 10px 16px; cursor: pointer;
    font-size: 14px; text-align: left; font-family: inherit; color: var(--gf-ink);
}
.gf-add-menu button:hover { background: #f1f3f4; color: var(--gf-purple); }
.gf-add-menu .sep { height: 1px; background: var(--gf-line); margin: 6px 0; }
.gf-type-menu.open { display: block; }
.gf-type-menu button {
    width: 100%; display: flex; align-items: center; gap: 12px;
    border: 0; background: none; padding: 10px 16px; cursor: pointer;
    font-size: 14px; text-align: left; font-family: inherit; color: var(--gf-ink);
}
.gf-type-menu button:hover, .gf-type-menu button.is-sel { background: #f1f3f4; }
.gf-type-menu .sep { height: 1px; background: var(--gf-line); margin: 6px 0; }
.gf-dash { border: 0; border-bottom: 1px dotted #bdbdbd; color: #80868b; padding: 8px 0; margin: 8px 0 4px; }
.gf-opt { display: flex; align-items: center; gap: 12px; margin: 8px 0; }
.gf-opt-mark {
    width: 20px; height: 20px; border: 2px solid #5f6368; border-radius: 50%; flex-shrink: 0;
}
.gf-opt-mark.sq { border-radius: 2px; }
.gf-opt input[type="radio"],
.gf-opt input[type="checkbox"] {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--gf-purple);
}
.gf-opt input:not([type="radio"]):not([type="checkbox"]) {
    flex: 1; border: 0; border-bottom: 1px solid transparent; padding: 6px 4px;
    font-size: 14px; outline: none; font-family: inherit;
}
.gf-opt input:not([type="radio"]):not([type="checkbox"]):hover,
.gf-opt input:not([type="radio"]):not([type="checkbox"]):focus { border-bottom-color: var(--gf-line); }
.gf-opt input:not([type="radio"]):not([type="checkbox"]):focus { border-bottom-color: var(--gf-purple); }
.gf-choice {
    cursor: pointer;
    font-size: 15px;
    line-height: 1.4;
    color: var(--gf-ink);
}
.gf-x { border: 0; background: none; color: var(--gf-muted); cursor: pointer; width: 36px; height: 36px; border-radius: 50%; font-size: 18px; }
.gf-x:hover { background: #f1f3f4; }
.gf-add {
    border: 0; background: none; color: var(--gf-muted); cursor: pointer;
    padding: 8px 0 8px 32px; font-size: 14px; font-family: inherit;
}
.gf-add b { color: var(--gf-blue); font-weight: 500; }
.gf-add:hover { color: var(--gf-purple); }
.gf-foot {
    display: flex; align-items: center; justify-content: flex-end; gap: 2px;
    border-top: 1px solid #e8eaed; margin: 12px -24px 0; padding: 6px 12px 4px;
}
.gf-req {
    display: flex; align-items: center; gap: 10px; margin-left: 8px; padding-left: 14px;
    border-left: 1px solid #e8eaed; font-size: 13px; letter-spacing: .04em;
    text-transform: uppercase; color: var(--gf-ink);
}
.gf-switch { position: relative; width: 36px; height: 20px; }
.gf-switch input { opacity: 0; width: 0; height: 0; }
.gf-switch span {
    position: absolute; inset: 0; background: #bdc1c6; border-radius: 20px; cursor: pointer;
}
.gf-switch span::after {
    content: ""; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px;
    background: #fff; border-radius: 50%; transition: .15s;
}
.gf-switch input:checked + span { background: var(--gf-purple); }
.gf-switch input:checked + span::after { transform: translateX(16px); }
.gf-lock { font-size: 12px; color: var(--gf-purple); font-weight: 500; letter-spacing: .04em; text-transform: uppercase; padding: 16px 24px 0; }
.gf-lock-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; padding: 8px 24px 20px; }
.gf-alert { background: #fce8e6; color: #c5221f; padding: 12px 16px; border-radius: 8px; margin-bottom: 12px; }
.gf-ok { background: #e6f4ea; color: #137333; padding: 12px 16px; border-radius: 8px; margin-bottom: 12px; }
.gf-set .gf-body { padding: 20px 24px 28px; }
.gf-set label { display: block; font-size: 12px; color: var(--gf-muted); margin: 12px 0 4px; }
.gf-set input[type=text], .gf-set input[type=number], .gf-set select, .gf-set textarea {
    width: 100%; border: 0; border-bottom: 1px solid var(--gf-line); padding: 8px 4px;
    font-size: 14px; outline: none; font-family: inherit; background: transparent;
}
.gf-set input:focus, .gf-set select:focus, .gf-set textarea:focus { border-bottom-color: var(--gf-purple); box-shadow: 0 2px 0 var(--gf-purple); }
.gf-check { display: flex; align-items: center; gap: 8px; margin: 16px 0; font-size: 14px; }
.gf-fill-q { font-size: 16px; font-weight: 400; margin: 0 0 16px; }
.gf-star { color: #d93025; }
.gf-submit {
    background: var(--gf-purple); color: #fff; border: 0; border-radius: 4px;
    padding: 10px 24px; font-size: 14px; font-weight: 500; cursor: pointer;
}
.gf-submit:hover { background: var(--gf-purple-dark); }
.gf-footer-note { text-align: center; color: var(--gf-muted); font-size: 12px; margin-top: 24px; }
.gf-pay {
    background: #e8def8; color: #21005e; padding: 12px 14px; border-radius: 4px; margin: 12px 0 4px;
}
@media (max-width: 900px) {
    .gf-float { position: fixed; right: 10px; bottom: 16px; top: auto; flex-direction: row; width: auto; }
    .gf-add-menu { right: 0; bottom: 52px; top: auto; }
    .gf-qrow, .gf-lock-grid { display: block; }
    .gf-type-wrap { width: 100%; margin-top: 10px; }
}
